-
Notifications
You must be signed in to change notification settings - Fork 740
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
Add sylph/profile module #7118
base: master
Are you sure you want to change the base?
Add sylph/profile module #7118
Conversation
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.
Suggested to be a bit more specific about the created csv :)
"versions.yml:md5,7b5a545483277cc0ff9189f8891e737f" | ||
], | ||
[ | ||
false |
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.
Is it expected that the contains check always leads to the string not being contained?
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.
The string should be contained. Looking into it.
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.versions, | ||
process.out.profile_out.collect { file(it[1]).readLines().contains("complete genome") }, |
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.
MAybe you can assert the file a bit better using: https://github.com/lukfor/nft-csv
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.
Do you mean to count the columns of the output file?
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.
anything that makes sense - counting columns or asserting column header both seems fine to me
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.
Updated this now.
@sofstam , do you need a hand to get this finished off? |
@SPPearce Was on holidays, looking at the comments now :) |
Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com>
Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com>
Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com>
Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com>
{ assert snapshot(process.out.versions).match("versions_single") }, | ||
{ assert output_content.size() > 1 }, // Ensure there's at least a header and one data line | ||
{ assert output_content[0] == "Sample_file\tGenome_file\tTaxonomic_abundance\tSequence_abundance\tAdjusted_ANI\tEff_cov\tANI_5-95_percentile\tEff_lambda\tLambda_5-95_percentile\tMedian_cov\tMean_cov_geq1\tContainment_ind\tNaive_ANI\tkmers_reassigned\tContig_name" }, | ||
{ assert snapshot(output_content.take(5).join("\n")).match("profile_out_content_single") } // Snapshot first 5 lines |
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.
Can probably just do this. You don't need to name the snapshots if you only have one per test.
{ assert snapshot(process.out.versions).match("versions_single") }, | |
{ assert output_content.size() > 1 }, // Ensure there's at least a header and one data line | |
{ assert output_content[0] == "Sample_file\tGenome_file\tTaxonomic_abundance\tSequence_abundance\tAdjusted_ANI\tEff_cov\tANI_5-95_percentile\tEff_lambda\tLambda_5-95_percentile\tMedian_cov\tMean_cov_geq1\tContainment_ind\tNaive_ANI\tkmers_reassigned\tContig_name" }, | |
{ assert snapshot(output_content.take(5).join("\n")).match("profile_out_content_single") } // Snapshot first 5 lines | |
{ assert snapshot( | |
process.out.versions, | |
output_content.take(5).join("\n") | |
).match() }, | |
{ assert output_content.size() > 1 }, // Ensure there's at least a header and one data line | |
{ assert output_content[0] == "Sample_file\tGenome_file\tTaxonomic_abundance\tSequence_abundance\tAdjusted_ANI\tEff_cov\tANI_5-95_percentile\tEff_lambda\tLambda_5-95_percentile\tMedian_cov\tMean_cov_geq1\tContainment_ind\tNaive_ANI\tkmers_reassigned\tContig_name" } |
Or you could probably do:
{ assert snapshot(process.out.versions).match("versions_single") }, | |
{ assert output_content.size() > 1 }, // Ensure there's at least a header and one data line | |
{ assert output_content[0] == "Sample_file\tGenome_file\tTaxonomic_abundance\tSequence_abundance\tAdjusted_ANI\tEff_cov\tANI_5-95_percentile\tEff_lambda\tLambda_5-95_percentile\tMedian_cov\tMean_cov_geq1\tContainment_ind\tNaive_ANI\tkmers_reassigned\tContig_name" }, | |
{ assert snapshot(output_content.take(5).join("\n")).match("profile_out_content_single") } // Snapshot first 5 lines | |
{ assert snapshot( | |
process.out.versions, | |
file(output_content).readLines()[0..4] | |
).match() } |
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:true ], // meta map | ||
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] |
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.
Can you swap these to the more recent file paths please
One of my comments may have been related to some previous code, can't see the comment on my phone |
- - pre_sketched_files: | ||
type: file | ||
description: Pre-sketched *.syldb/*.sylsp files. Raw single-end fastq/fasta are allowed and will be automatically sketched to .sylsp/.syldb. | ||
pattern: "*.{syldb,sylsp}" |
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.
Update this pattern too.
description: | | ||
List of input FastQ/FASTA files of size 1 and 2 for single-end and paired-end data, | ||
respectively. They are automatically sketched to .sylsp/.syldb | ||
- - pre_sketched_files: |
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 making this variable name more general given it could be fasta. Something like database
( since the manual uses the same term too ).
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out.versions).match("versions_single") }, | ||
{ assert output_content.size() > 1 } |
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.
Is there not a specific file or contents to test for here?
Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com>
Co-authored-by: Mahesh Binzer-Panchal <mahesh.binzer-panchal@nbis.se>
PR checklist
Moves the local module
sylph/profile
to nf-core modules. Closes nf-core/seqinspector#65Removes unnecessary pattern from
sylph/sketch
meta file.versions.yml
file.label
nf-core modules test <MODULE> --profile docker
nf-core modules test <MODULE> --profile singularity
nf-core modules test <MODULE> --profile conda
nf-core subworkflows test <SUBWORKFLOW> --profile docker
nf-core subworkflows test <SUBWORKFLOW> --profile singularity
nf-core subworkflows test <SUBWORKFLOW> --profile conda