-
Notifications
You must be signed in to change notification settings - Fork 82
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
Fix specified CPUs in piped commands #753
Conversation
Markdown linting is failingTo keep the code consistent with lots of contributors, we run automated code consistency checks.
Once you push these changes the test should pass, and you can hide this comment 👍 We highly recommend setting up markdownlint in your code editor so that this formatting is done automatically on save. Ask about it on Slack for help! Thanks again for your contribution! |
|
Is there a check in the code somewhere that |
Thanks for looking @mahesh-panchal ! There isn't a specific check for (1): the number of CPUs is specified with the And for (2) I believe the |
Definitely a little embarrassed at not registering that. |
@mahesh-panchal thanks for looking so closely. This was one of those cases where you think 'oh this should be a quick PR', end up doing in a rush, and then miss lots of things 🤦 . I looked a bit more closely now and I think I've caught everything. |
main.nf
Outdated
#Run Filtering step | ||
samtools calmd -b ${bam} ${fasta} | pmdtools --threshold ${params.pmdtools_threshold} ${treatment} ${snpcap} --header | samtools view -@ ${task.cpus - 2} -Sb - > "${libraryid}".pmd.bam | ||
samtools calmd -b ${bam} ${fasta} | samtools view -h - | pmdtools --threshold ${params.pmdtools_threshold} ${treatment} ${snpcap} --header | samtools view -Sb - > "${libraryid}".pmd.bam |
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.
Could you not get the output directly from samtools calmd
? At the moment you're using the -b
flag which produces compressed bam. Does removing the -b
give you uncompressed sam with the headers?
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.
Ok good call, I've tested and that seems to work. However, i've just checked the line history, and going to check with the actual writers of this process that it makes sense. I never used pmdtools
mself 😅
@apeltzer @maxibor @TCLamnidis I've just changed the PMDtools command after suggestions from @mahesh-panchal . Can you check this looks OK with you? I never used |
I tried running a working command locally with and without samtools view, and it would throw an error when the
|
That's a very old version of samtools @TCLamnidis . Could you try with the version in eager (I think 1.10). I tried the eager command without -b earlier and it worked....? Also what is -u? That isn't in the eager command is it? |
That tells samtools to output uncompressed bam. It's used when the next tool in the pipe can read bam, but saves time by not going through a compression-decompression step. |
This works for me? Is the |
I don't think |
Ok, then given default Will proceed with merge, and someone can complain later if I brake something ;). |
To close #750
PR checklist
scrape_software_versions.py
nf-core lint .
).nextflow run . -profile test,docker
).docs/usage.md
is updated.docs/output.md
is updated.CHANGELOG.md
is updated.README.md
is updated (including new tool citations and authors/contributors).