519e0946826199d1d9792fa8df5972843fce021c angie Tue Aug 9 14:39:38 2011 -0700 Feature #2821 (VCF parser): improved representation of alleles:parse ref and comma-sep'd alt allele string into count and array inside record, so callers don't all have to parse the comma-sep'd alternate allele string. diff --git src/inc/vcf.h src/inc/vcf.h index 1deadfd..2cd150a 100644 --- src/inc/vcf.h +++ src/inc/vcf.h @@ -57,32 +57,32 @@ unsigned char hapIxB; // Index of other haplotype's allele bool isPhased; // True if haplotypes are phased bool isHaploid; // True if there is only one haplotype (e.g. chrY) int infoCount; // Number of components named in FORMAT column struct vcfInfoElement *infoElements; // Array of info components }; struct vcfRecord /* A VCF data row (or list of rows). */ { struct vcfRecord *next; char *chrom; // Reference assembly sequence name unsigned int chromStart; // Start offset in chrom unsigned int chromEnd; // End offset in chrom char *name; // Variant name from ID column - char *ref; // Allele found in reference assembly - char *alt; // Alternate allele(s) + int alleleCount; // Number of alleles (reference + alternates) + char **alleles; // Alleles: reference first then alternate alleles char *qual; // . or Phred-scaled score, i.e. -10log_10 P(call in ALT is wrong) int filterCount; // Number of ;-separated filter codes in FILTER column char **filters; // Code(s) described in header for failed filters (or PASS or .) int infoCount; // Number of components of INFO column struct vcfInfoElement *infoElements; // Array of INFO column components char *format; // Optional column containing ordered list of genotype components char **genotypeUnparsedStrings; // Temporary array of unparsed optional genotype columns struct vcfGenotype *genotypes; // If built, array of parsed genotype components; // call vcfParseGenotypes(record) to build. struct vcfFile *file; // Pointer back to parent vcfFile }; struct vcfFile /* Info extracted from a VCF file. Manages all memory for contents. * Clearly borrowing structure from MarkD's gff3File. :) */