artic-network / rampart

Read Assignment, Mapping, and Phylogenetic Analysis in Real Time
GNU General Public License v3.0
79 stars 33 forks source link

Keep the reference colours consistent between runs and/or have some control over reference colour. #56

Open aineniamh opened 4 years ago

aineniamh commented 4 years ago

Potentially by indexing reference colour from the sample sheet rather than order of appearance in csv or making it customisable like the sample colours.

jameshadfield commented 4 years ago

making it customisable like the sample colours

It is (or was). Let me look into this...

rambaut commented 4 years ago

We had a talk about this and think the solution is to have a references_config.json or some similar name which optionally contains a list of reference names (possibly colours and other labels). If this list exists then those references are always shown in the heatmap and are given the same colours.

jameshadfield commented 4 years ago

You should be able to change sample / ref colours in the UI. But that doesn't really address this issue. (I plan to work on this today.)

Our current implementation (by design) means that RAMPART doesn't know about the references FASTA -- I guess the path is saved in the config object, but it's intended as simply a parameter passed to the annotation script. As "new" references appear in the annotation results, rampart updates its display (and currently generates a new colour). Not sure what's the best design here, as I do think that consistency between runs is desirable.

rambaut commented 4 years ago

Yes. That is what I meant. We should have an optional config in the protocol folder which allows you to pre-specify the set of reference names (perhaps a mapping to a higher taxonomic order - i.e. a genotype), an ordering and a colour (optioning). If this is present then all of these references are present in heatmap (even if zero reads). I would prefer to avoid rampart reading and parsing fasta files.

rambaut commented 4 years ago

Another option would be to hash the reference name rampart sees it and take some bits of the hash to index the colour?

rambaut commented 4 years ago

I also think we don't need colour editing in GUI for references.