0d3b8feb6074f6caccc2d4aadd020961fbd7eb82 chmalee Wed Jun 10 14:39:38 2020 -0700 Add drag reorder of VCF samples to VCF trio display. Also fixes bug in haplotype sort that I didn't discover until adding drag reorder. Sometimes when sorting haplotypes it is the case that the initial best match to a child allele is the same for each parent. Previously I would just advance the first drawn parent to the next best match but now I also check whether advancing the first drawn is actually the best idea and potentially advance the other parent instead, refs #25582 diff --git src/hg/inc/vcfUi.h src/hg/inc/vcfUi.h index af8b34a..c480b0d 100644 --- src/hg/inc/vcfUi.h +++ src/hg/inc/vcfUi.h @@ -41,32 +41,33 @@ #define VCF_EXCLUDE_FILTER_VAR "excludeFilterValues" #define VCF_MIN_ALLELE_FREQ_VAR "minFreq" #define VCF_DEFAULT_MIN_ALLELE_FREQ 0.0 #define VCF_PHASED_CHILD_SAMPLE_SETTING "vcfChildSample" #define VCF_PHASED_PARENTS_SAMPLE_SETTING "vcfParentSamples" #define VCF_PHASED_SAMPLE_ORDER_VAR "vcfSampleOrder" #define VCF_PHASED_MAX_OTHER_SAMPLES 2 #define VCF_PHASED_DEFAULT_LABEL_VAR "doDefaultLabel" #define VCF_PHASED_ALIAS_LABEL_VAR "doAliasLabel" #define VCF_PHASED_HIDE_OTHER_VAR "hideParents" #define VCF_PHASED_TDB_USE_ALT_NAMES "vcfUseAltSampleNames" #define VCF_PHASED_HIGHLIGHT_INCONSISTENT "vcfHighlightDiffs" +#define VCF_PHASED_CHILD_BELOW_VAR "sortChildBelow" void vcfCfgHaplotypeCenter(struct cart *cart, struct trackDb *tdb, char *track, boolean parentLevel, struct vcfFile *vcff, char *thisName, char *thisChrom, int thisPos, char *formName); /* If vcff has genotype data, show status and controls for choosing the center variant * for haplotype clustering/sorting in hgTracks. */ -struct slPair *vcfPhasedGetSampleOrder(struct cart *cart, struct trackDb *tdb, boolean parentLevel); +struct slPair *vcfPhasedGetSampleOrder(struct cart *cart, struct trackDb *tdb, boolean parentLevel, boolean hideOtherSamples); /* Parse out a trio sample order from trackDb */ void vcfCfgUi(struct cart *cart, struct trackDb *tdb, char *name, char *title, boolean boxed); /* Complete track controls for VCF. */ char *vcfHaplotypeOrSample(struct cart *cart); /* Return "Sample" if the current organism is uniploid (like SARS-CoV-2), "Haplotype" otherwise. */ #endif//def VCF_UI