about std.csv and derived format

bioinfornatics bioinfornatics at fedoraproject.org
Wed Feb 29 03:51:28 PST 2012


Le mercredi 29 février 2012 à 12:42 +0100, bioinfornatics a écrit :
> Dear,
> 
> I would like to parse this file:
> http://genome.ucsc.edu/goldenPath/help/ItemRGBDemo.txt
> 
> struct Bed{
> 	string    chrom;	// 0
> 	size_t    chromStart;	// 1
> 	size_t    chromEnd;	// 2
> 	string    name;		// 3
> 	size_t    score;	// 4
> 	char      strand;	// 5
> 	size_t    thickStart;	// 6
> 	size_t    thickEnd;	// 7
> 	size_t[3] itemRgb;	// 8
>         size_t    blockCount;	// 9
>         size_t    blockSizes;	// 10
>         size_t    blockStarts;	// 11
> }
> 
> In more fields 3 to 11 are optional. Then you can have:
> * field 0 - 3
> * field 0 - 4
> * field 0 - 5
> ... to 0 - 12
> 


line 0 -> 2 into ItemRGBDemo.txt are metadata so they should be parsed
by hand.

browser position chr7:127471196-127495720
browser hide all
track name="ItemRGBDemo" description="Item RGB demonstration"
visibility=2 itemRgb="On"

My problem is:
- need to parse data in csv format
- how manage with optional field



More information about the Digitalmars-d-learn mailing list