-
Notifications
You must be signed in to change notification settings - Fork 44
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 quast #147
Merged
Merged
Add quast #147
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
if (params.reference{{param_id}} == null && params.genomeSizeBp{{param_id}} == null) | ||
exit 1, "Specify at least one of reference or genomeSizeBp" | ||
if (params.reference{{param_id}} != null && params.genomeSizeBp{{param_id}} != null) | ||
exit 1, "Specify only one of reference or genomeSizeBp" | ||
|
||
if (params.reference{{param_id}} != null) { | ||
process quast_{{pid}} { | ||
{% include "post.txt" ignore missing %} | ||
|
||
tag { sample_id } | ||
publishDir "results/assembly/quast_{{pid}}/$sample_id", pattern: "*.tsv" | ||
publishDir "reports/assembly/quast_{{pid}}/$sample_id" | ||
|
||
input: | ||
set sample_id, file(assembly) from {{input_channel}} | ||
file reference from Channel.fromPath(params.reference{{param_id}}) | ||
|
||
output: | ||
file "*" | ||
{% with task_name="quast" %} | ||
{%- include "compiler_channels.txt" ignore missing -%} | ||
{% endwith %} | ||
|
||
script: | ||
"/usr/bin/time -v quast -o . -r $reference -s $assembly -l $sample_id -t $task.cpus >> .command.log 2>&1" | ||
} | ||
} else if (params.genomeSizeBp{{param_id}} != null) { | ||
process quast_{{pid}} { | ||
{% include "post.txt" ignore missing %} | ||
|
||
tag { sample_id } | ||
publishDir "results/assembly/quast_{{pid}}/$sample_id", pattern: "*.tsv" | ||
publishDir "reports/assembly/quast_{{pid}}/$sample_id" | ||
|
||
input: | ||
set sample_id, file(assembly) from {{input_channel}} | ||
val genomeSizeBp from Channel.value(params.genomeSizeBp{{param_id}}) | ||
|
||
output: | ||
file "*" | ||
{% with task_name="quast" %} | ||
{%- include "compiler_channels.txt" ignore missing -%} | ||
{% endwith %} | ||
|
||
script: | ||
"/usr/bin/time -v quast -o . --est-ref-size=$genomeSizeBp -s $assembly -l $sample_id -t $task.cpus >> .command.log 2>&1" | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
There's no trouble in using
time
to check the run time of the software, but that information (and more) will already be available on thepipeline_stats.txt
file generated during the execution of the pipeline 😄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.
That's excellent!
This is odd though.
/usr/bin/time -v
reportswhereas
pipeline_stats.txt
reportsSo I'd like to leave
/usr/bin/time -v
in until I sort out this discrepancy.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.
No problem. Though that's interesting. It could be that the
rss
reported in by nextflow takes into account any possible overhead of a docker/singularity execution, while thetime
one is purely from quast. Or they simply measurerss
differently. Either way I would be interesting to find out why!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.
Ah yeah, the Docker thing makes sense for the difference between 408M and 476M. I'm more confused though by
/usr/bin/time
reportingmaxrss=408M
whereaspipeline_stats.txt
reportsrss=58.9M
. That's a very big difference!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.
Oh, I misread. I though it was
40Mb
! That is very weird indeed. It almost seems thattime
'srss
is reporting the virtual memory measure. Doestime
also provide something likevmem
?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.
That may be. I doesn't oddly, which is why I usually use
zsh -c 'time foobar'
rather than/usr/bin/time
for this purpose.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 don't think
zsh
is in thatquast
Docker image though.