94699b698cc07983f2b10c5b9d4523502a4e5467 angie Fri Oct 28 17:18:25 2016 -0700 Adapted from code contributed by Belinda Giardine: adding support for VCF from cancer somatic variant callers Strelka and Mutect2, when genotype columns are TUMOR and NORMAL and the hgTracks display shows allele counts for the tumor sample. For Strelka VCF, genotypes are parsed out of INFO SGT. refs #18275 diff --git src/inc/vcf.h src/inc/vcf.h index 103a7d0..45b146c 100644 --- src/inc/vcf.h +++ src/inc/vcf.h @@ -269,29 +269,32 @@ struct vcfInfoDef *vcfInfoDefForKey(struct vcfFile *vcff, const char *key); /* Return infoDef for key, or NULL if it wasn't specified in the header or VCF spec. */ void vcfParseGenotypes(struct vcfRecord *record); /* Translate record->genotypesUnparsedStrings[] into proper struct vcfGenotype[]. * This destroys genotypesUnparsedStrings. */ const struct vcfGenotype *vcfRecordFindGenotype(struct vcfRecord *record, char *sampleId); /* Find the genotype and associated info for the individual, or return NULL. * This calls vcfParseGenotypes if it has not already been called. */ struct vcfInfoDef *vcfInfoDefForGtKey(struct vcfFile *vcff, const char *key); /* Look up the type of genotype FORMAT component key, in the definitions from the header, * and failing that, from the keys reserved in the spec. */ +const struct vcfInfoElement *vcfGenotypeFindInfo(const struct vcfGenotype *gt, char *key); +/* Find the genotype infoElement for key, or return NULL. */ + char *vcfFilePooledStr(struct vcfFile *vcff, char *str); /* Allocate memory for a string from vcff's shared string pool. */ #define VCF_NUM_COLS 10 struct asObject *vcfAsObj(); // Return asObject describing fields of VCF char *vcfGetSlashSepAllelesFromWords(char **words, struct dyString *dy); /* Overwrite dy with a /-separated allele string from VCF words, * skipping the extra initial base that VCF requires for indel alleles if necessary. * Return dy->string for convenience. */ #endif // vcf_h