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

ENH: allow passing MAGs to the compute action #7

Merged
merged 3 commits into from
Aug 17, 2023

Conversation

misialq
Copy link
Contributor

@misialq misialq commented Aug 8, 2023

This PR adds an ability to pass MAG sequences to the compute action, so that the MinHash signatures can also be computed for this kind of DNA sequences.

@misialq misialq marked this pull request as ready for review August 16, 2023 06:22
@misialq
Copy link
Contributor Author

misialq commented Aug 16, 2023

Hey @ctb, these are some changes that @nbokulich mentioned to you - do you think you could have a look? 🙏


command = ['sourmash', 'compute', str(output) + "/*", '--ksizes', str(ksizes), '--scaled', str(scaled)]
command = [
'sourmash', 'compute', f'{output}/*',
Copy link
Member

Choose a reason for hiding this comment

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

in our next major release of sourmash, sourmash v5, we will be removing sourmash compute per sourmash-bio/sourmash#1286.

It's been replaced with sourmash sketch; the following should work:

ksizestr = [ f"k={k}" for k in ksizes ]
ksizestr = ",".join(ksizestr)
abundstr = "noabund"
if track_abundance:
   abundstr = "abund"

command = ['sourmash', 'sketch', 'dna', f'{output}/*', '-p', f'scaled={scaled},{ksizestr},{abundstr}'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good to know, thanks for info! Should we then update it in a separate PR, once v5 is out?

@ctb
Copy link
Member

ctb commented Aug 17, 2023

Commented in one place - and overall looks good to me. Should I approve in review & merge?

@misialq
Copy link
Contributor Author

misialq commented Aug 17, 2023

That would be lovely, thanks!

@ctb ctb merged commit 16bfe33 into dib-lab:master Aug 17, 2023
@misialq misialq deleted the new-formats branch August 17, 2023 14:18
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