2f18fa9e25b5791684083c159a155694f105288a tdreszer Mon May 13 14:26:51 2013 -0700 Fixed Synonymous variant sorting, changed full sequence and all variant cart vars to global (instead of gene specific) and conditionally added the haplotype ID to a hover message at Kate's request. diff --git src/hg/hgGene/alleles.c src/hg/hgGene/alleles.c index 9e7925f..66b5a1e 100644 --- src/hg/hgGene/alleles.c +++ src/hg/hgGene/alleles.c @@ -19,48 +19,48 @@ struct haploExtras *he = haplotypeExtrasDefault(database, 0); section->extras = he; // Need to get genePred struct from geneId char where[128]; safef(where,sizeof(where),"name = '%s'",geneId); struct genePred *gp = genePredReaderLoadQuery(conn,he->geneTable, where); if (gp == NULL || gp->cdsStart == gp->cdsEnd) // Ain't interested in non-protein coding genes { haplotypeExtrasFree(&he); return FALSE; } he->chrom = gp->chrom; // Probably not needed he->justModel = lmCloneString(he->lm,geneId); -he->growTree = FALSE; // Tree growing not needed here +//he->growTree = FALSE; // Tree growing not needed here // Need to determine the correct vcf file and open it if (haplotypesDiscoverVcfFile(he, gp->chrom) == NULL) { haplotypeExtrasFree(&he); return FALSE; } struct vcfFile *vcff = vcfTabixFileMayOpen(he->inFile, NULL, 0, 0,VCF_IGNORE_ERRS, 0); if (vcff == NULL) { haplotypeExtrasFree(&he); return FALSE; } vcfFileMakeReusePool(vcff,1024 * 1024); // All or Limit to the 99% -boolean rareVars = sameOk(geneId,cartOptionalString(cart, HAPLO_RARE_VAR)); +boolean rareVars = cartUsualBoolean(cart, HAPLO_RARE_VAR, FALSE); if (rareVars) he->synonymous = TRUE; else he->variantMinPct = HAPLO_COMMON_VARIANT_MIN_PCT; // Lets show the population distribution he->populationsToo = cartUsualBoolean(cart, HAPLO_MAJOR_DIST, FALSE); he->populationsMinor = cartUsualBoolean(cart, HAPLO_MINOR_DIST, FALSE); if (he->populationsToo) he->populationMinPct = 5; else if (he->populationsMinor) { he->populationsMinor = FALSE; cartRemove(cart, HAPLO_MINOR_DIST ); }