mauranolab / mapping

2 stars 1 forks source link

Enable filtering #265

Closed mattmaurano closed 2 years ago

mattmaurano commented 3 years ago

Setting filterText. * for relevant bed tracks should enable the filter box

We could also add score-based filtering where appropriate

See http://genome.ucsc.edu/goldenPath/help/trackDb/trackDbHub.html#filter

Looks like it depends on a more recent version of daler/trackhub -- see #264

andremrsantos commented 2 years ago

A couple quick questions regarding this issue:

mattmaurano commented 2 years ago

Yes, we should apply these to all bigBed with sufficient columns, unless you find a reason not to.

Yes, use filterText.Name. This ought to work for any bed4+ (though the trackDb definition says "Filters are not supported in bed3 or bed4 files, even bed 3+x. The file must be at least a bed5", I think that's mistaken)

Take a look at each track type to identify reasonable score Max/Min

andremrsantos commented 2 years ago

In MakeTrackhub.py there are three bigBed tracks:

We could include scoreMin/Max to bigWig tracks [Coverage, Density & Cuts], but I believe viewLimits does the job in this context.

Is there something I'm missing here?

mattmaurano commented 2 years ago

I don't think filterText is relevant for any of those.

hotspots and Genotype should be filterable on score, but make sure not to suppress anything by default.

No need to do anything for the bigwig tracks.

Enabling filterText is more relevant for the Assembly tracks, which will be a second part of this issue, but I want to see how this looks first.

andremrsantos commented 2 years ago
mattmaurano commented 2 years ago

I see, analysis.sh cuts the hotspot starchs to bed4 so there can be no filtering without regenerating. So score should only apply to Genotypes. Yes, please try.

andremrsantos commented 2 years ago

I've made a trial run including the parameters I specified above and got the following formatting for Genotypes:

image

I think scoreMin and scoreMax looks fine, but I am not sure filterText will work, since on UCSC page it uses the following syntax filterText.Name * instead of filterText Name *. If this is the case, I envision an patch for trackhub to make filter fields work.

mattmaurano commented 2 years ago

I don't think filterText will be super useful for Genotypes. I guess someone might occasionally filter on SNP name, but that seems pretty rare. How does your example above turn out in the browser?

We need two changes: 1) hotspots should be filterable on score, but make sure not to suppress anything by default.

2) Enabling filterText is more relevant for the Assembly tracks. I will do this and as a separate commit against this issue, but I want to see how the first bit looks first.

andremrsantos commented 2 years ago

Upon review of the issue:

mattmaurano commented 2 years ago

Andre, can you put together a PR?

andremrsantos commented 2 years ago

Sure, can you just confirm which features you want to include:

mattmaurano commented 2 years ago

Yes might as well do both

Have you worked out what the genotype score in the hub derives from?

andremrsantos commented 2 years ago

Okay. The score on genotypes tracks correspond to VCF Qual column

andremrsantos commented 2 years ago

see https://github.com/mauranolab/mapping/pull/272