artic-network / civet

Cluster Investigation & Virus Epidemiology Tool
https://cov-lineages.org/resources/civet.html
GNU General Public License v3.0
48 stars 14 forks source link

--global_snipit to summarize diversity among all query sequences #131

Closed matt-sd-watson closed 3 years ago

matt-sd-watson commented 3 years ago

Our group was interested in adding a feature to the report where we could visualise the SNPs for all input/query sequences using snipit, while also including the snipit graphs for each catchment tree. We were interested in implementing this feature for datasets where the number of query sequences was modest (fewer than a dozen or so).

The implementation of this feature can be toggled on/off using global_snipit (Default is not included). If selected, the snipit graph for all sequences is inserted just below the summary table (see attached image below for an example using de-identified COVID samples).

The user has the option for what alignment input to use. If no alignment is provided, the workflow will create one using minimap2 and the reference sequence found in the data directory. Otherwise, the user can specify their own input using focal_alignment, which I figured may be useful in the event that alignments with lineage-specific references from Gisaid become more common.

The workflow is compatible with the way that snipit searches for the reference. The reference name can be specified by the user using reference_name if a custom alignment is used, or the first entry in the alignment will be selected if no name is provided. If the alignment is created for them, this doesn't apply, and the reference is simply labelled as the outgroup fasta 'Reference".

I am aware that many of the report functions are coded elsewhere in the reportfunks repo, such as the functions to identify the snakemake files for each workflow. I am happy to move the snakemake function get_global_snipit_snakefile() there if there is interest in adding this feature to the report.

Thanks for such a great tool!

global_snipit_example

matt-sd-watson commented 3 years ago

Hi all,

If there is no interest in adding this feature to this civet or civet 3, I can remove the request!

aineniamh commented 3 years ago

I really like the idea! I'm happy to merge in, but it might be more straightforward to just implement directly in civet3 as civet is no longer in active development and civet3 will eventually replace the original civet repo.

I'm currently writing up my thesis so not in a place to add features right now, but happy to accept a PR to the civet3 repo either/ as well.

matt-sd-watson commented 3 years ago

This PR has now been modified for the civet3 repo and can be found here: https://github.com/cov-ert/civet3/pull/3. Closing thie PR in favour of the newer one.