487dae9a4a149085ff20b7c73a399fce9c9c85ca angie Thu May 22 09:47:41 2014 -0700 For intergenic variants, I was assuming that each variant would havea firstAltAllele -- but for reference-only "variants", that's not the case so we need to check first. If there's no actual variation, drop the "variant". fixes #13310 - thanks Jonathan for finding. diff --git src/hg/lib/gpFx.c src/hg/lib/gpFx.c index c4d8811..3b4b0de 100644 --- src/hg/lib/gpFx.c +++ src/hg/lib/gpFx.c @@ -691,32 +691,32 @@ cc->aaOld = lmCloneString(lm, oldaa + pepPos); cc->aaNew = lmCloneString(lm, newaa + pepPos); } if (predIsNmd) // This transcript is already subject to nonsense-mediated decay, so the effect // is probably not a big deal: effect->soNumber = NMD_transcript_variant; else setSpecificCodingSoTerm(effect, oldaa, newaa, cdsBasesAdded); return effect; } -static boolean hasAltAllele(struct allele *alleles) -/* Make sure there's something to work on here... */ +boolean hasAltAllele(struct allele *alleles) +/* Return TRUE if alleles include at least one non-reference allele. */ { while (alleles != NULL && alleles->isReference) alleles = alleles->next; return (alleles != NULL); } char *firstAltAllele(struct allele *alleles) /* Ensembl always reports an alternate allele, even if that allele is not being used * to calculate any consequence. When allele doesn't really matter, just use the * first alternate allele that is given. */ { while (alleles != NULL && alleles->isReference) alleles = alleles->next; if (alleles == NULL) errAbort("firstAltAllele: no alt allele in list");