Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MRG: add additional weighted information to manysearch output #388

Merged
merged 10 commits into from
Jul 14, 2024
Merged

Conversation

ctb
Copy link
Collaborator

@ctb ctb commented Jul 12, 2024

Addresses #380

Note: in #302, the meaning of 'query' and 'against' was flipped. For manysearch, unlike in gather/prefetch, 'query' is meant to be the genome and against is meant to be the metagenome. This PR switches them back, so that the mgmanysearch command line from the containment search plugin matches the manysearch command line:

sourmash scripts mgmanysearch --queries f_prausnitzii.sig.zip b_uniformis.sig.zip --against CD*.sig.zip -o search.csv

vs

sourmash scripts manysearch query.txt against.txt -o search2.csv -t 0

where query.txt contains f_prausnitzii.sig.zip\nb_uniformis.sig.zip (the genomes) and against.txt contains the CD*.sig.zip files (the metagenomes).

Using the display code in #380 to display search2.csv, we then get:

query             p_genome avg_abund   p_metag   metagenome name
--------          -------- ---------   -------   ---------------
B. uniformis        48.3%     2.0       3.4%     CD136
B. uniformis        62.6%    14.5      26.5%     CD237
F. prausnitzii       4.3%    24.7       2.5%     CD136

which matches the mgmanysearch output:

query             p_genome avg_abund   p_metag   metagenome name
--------          -------- ---------   -------   ---------------
F. prausnitzii       4.3%    24.7       2.5%     CD136
B. uniformis        48.3%     2.0       3.4%     CD136
F. prausnitzii       0.0%     0.0       0.0%     CD237
B. uniformis        62.6%    14.5      26.5%     CD237

@ctb ctb changed the title WIP: add weighted information to manysearch output MRG: add weighted information to manysearch output Jul 12, 2024
@ctb
Copy link
Collaborator Author

ctb commented Jul 12, 2024

@bluegenes this took me a minute 😆 . Let me know what you think!

@ctb
Copy link
Collaborator Author

ctb commented Jul 12, 2024

Ready for review & merge!

@ctb ctb changed the title MRG: add weighted information to manysearch output MRG: add additional weighted information to manysearch output Jul 14, 2024
@ctb ctb enabled auto-merge (squash) July 14, 2024 23:15
Copy link
Contributor

@bluegenes bluegenes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you know, this direction makes a lot more sense. lgtm!

@ctb ctb merged commit ee2d802 into main Jul 14, 2024
1 check passed
@ctb ctb deleted the add_metag_size branch July 14, 2024 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants