-
Notifications
You must be signed in to change notification settings - Fork 5
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 --save-matches
to fastmultigather
#397
Conversation
Initial testing is not bad at all!
|
--save-matches
to fastgather
& fastmultigather
--save-matches
to fastmultigather
--save-matches
to fastmultigather
--save-matches
to fastmultigather
Ready for review @ctb @bluegenes |
src/fastmultigather.rs
Outdated
@@ -70,12 +79,20 @@ pub fn fastmultigather( | |||
let prefix = name.split(' ').next().unwrap_or_default().to_string(); | |||
let location = PathBuf::new(&prefix).file_name().unwrap(); | |||
if let Some(query_mh) = query_sig.minhash() { | |||
let mut matching_hashes = if save_matches { Vec::new() } else { Vec::new() }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line confuses me - isn't it creating a new vec either way? What does the if/else do here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line confused me as well - late-hour coding ;|
src/fastmultigather.rs
Outdated
|
||
// Save matching hashes to .sig file if save_matches is true | ||
if save_matches { | ||
let sig_filename = format!("{}.matches.sig", name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest using .gz or zip output here. .sig format is bulky.
I'm confused as to why |
…ugin_branchwater into mo/save_matches
Here are the latest results after
|
I'll take a look at this when I can, but a few quick thoughts -
|
Testing at the command line -
I get:
so I think I'd suggest splitting off the identifier as with gather.csv and prefetch.csv. In addition, I'd like to suggest compressing the matched sketches on writing; example code to do so appears to be over in sourmash, file |
I've created a PR here (into your PR) with a few suggested changes. |
* add pyo3 decoration * do not ignore result * fix fmt
…water into mo/save_matches
…ugin_branchwater into mo/save_matches
ok! a few more suggested changes & we're good to go: see #423 Please merge that, and then this, & then create issues as requested above ;) |
* make use of in_directory * add more tests
I will create the mentioned issues to be added later by myself or others. Many thanks! |
TODO: