bacpop / PopPUNK

PopPUNK 👨‍🎤 (POPulation Partitioning Using Nucleotide Kmers)
https://www.bacpop.org/poppunk
Apache License 2.0
87 stars 17 forks source link

visualize only query? #266

Closed reaset41 closed 7 months ago

reaset41 commented 1 year ago

poppunk 2.6.0

Whenever I attempt to visualize my query assignments, the output files contain all the reference strains as well. I would only like to visualize my query database. Is there a way to do this?

johnlees commented 1 year ago

Not in an automated way I don't think – we're typically expecting the references to help with context. You can subset your tree and csv yourself (easy enough in R).

A workaround would be to use the _model.pkl and _model.npy` from the reference database, and use your queries as input to create a new model, see here: https://poppunk.readthedocs.io/en/latest/model_fitting.html#use-an-existing-model-with-new-data Then if you visualise that it will just be your queries. Clusters not guaranteed to be identical however