3640a4d6b3303a6bebc7c5b2fc5abcf7f4fae0b2 angie Wed Sep 28 11:56:00 2016 -0700 Partial support for changes in VCF4.2 and latest samtools mpileup output: - Tolerate 'Number=R' and new INFO attributes Source and Version - Tolerate mpileup's '<X>' alt (no alternate allele was observed) - The 4.3 spec includes '<*>' from gVCF, also meaning no alt al obsvd. - GT is no longer required; user's example has PL instead, so parse that into genotypes. - hgVai now annotates "variants" with <X> and <*> as no_sequence_alteration - annoFormatVep now uses html encoding for html output in various places so that "<X>" is displayed properly (custom track labels and various item names could also have undesirable characters). I am not encoding the extras' descriptions because those are internal and some have <a>'s. refs #15625 diff --git src/hg/lib/variant.c src/hg/lib/variant.c index e194c46..c1ddf93 100644 --- src/hg/lib/variant.c +++ src/hg/lib/variant.c @@ -81,31 +81,33 @@ if (nextAlleleString == NULL) errAbort("number of alleles in /-separated string doesn't match numAlleles"); char *thisAlleleString = nextAlleleString; // advance pointer to next variant string // probably there's some kent routine to do this behind the curtain nextAlleleString = strchr(thisAlleleString, '/'); if (nextAlleleString) // null out '/' and move to next char { *nextAlleleString = 0; nextAlleleString++; } boolean isRefAllele = (sameWord(thisAlleleString, refAllele) || - (isEmpty(refAllele) && sameString(thisAlleleString, "-"))); + (isEmpty(refAllele) && sameString(thisAlleleString, "-")) || + sameString(thisAlleleString, "<X>") || // samtools mpileup no variation + sameString(thisAlleleString, "<*>")); // gVCF no variation int alleleStringLength = strlen(thisAlleleString); if (isDash(thisAlleleString)) { alleleStringLength = 0; thisAlleleString[0] = '\0'; } // we have a new allele! struct allele *allele; lmAllocVar(lm, allele); slAddHead(&variant->alleles, allele); allele->variant = variant; allele->length = alleleStringLength; allele->sequence = lmCloneString(lm, thisAlleleString); allele->isReference = isRefAllele;