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

Use staged blacklist file in makeGenomeFilter #47

Merged
merged 6 commits into from
Sep 30, 2019

Conversation

jinmingda
Copy link
Contributor

@jinmingda jinmingda commented Sep 28, 2019

Many thanks to contributing to nf-core/atacseq!

Please fill in the appropriate checklist below (delete whatever is not relevant). These are the most common things requested on pull requests (PRs).

PR checklist

  • This comment contains a description of changes (with reason)
  • If you've fixed a bug or added code that should be tested, add tests!
  • If necessary, also make a PR on the nf-core/atacseq branch on the nf-core/test-datasets repo
  • Ensure the test suite passes (nextflow run . -profile test,docker).
  • Make sure your code lints (nf-core lint .).
  • Documentation in docs is updated
  • CHANGELOG.md is updated
  • README.md is updated

Learn more about contributing: https://github.com/nf-core/atacseq/tree/master/.github/CONTRIBUTING.md

Description

The channel containing a staged blacklist file is not added to the process makeGenomeFilter. Using params.blacklist will cause an error when the pipeline is running on an environment where workers don't have access to the files stored in head node (like AWS Batch). This PR attempts to solve this problem by using the staged blacklist file from the channel input, which has been created already.

Create an empty channel for blacklist when params.blacklist is false.
@@ -461,7 +464,7 @@ process makeGenomeFilter {
genome_sizes_mrep_bigwig

script:
blacklist_filter = params.blacklist ? "sortBed -i ${params.blacklist} -g ${fasta}.sizes | complementBed -i stdin -g ${fasta}.sizes" : "awk '{print \$1, '0' , \$2}' OFS='\t' ${fasta}.sizes"
blacklist_filter = params.blacklist ? "sortBed -i ${blacklist} -g ${fasta}.sizes | complementBed -i stdin -g ${fasta}.sizes" : "awk '{print \$1, '0' , \$2}' OFS='\t' ${fasta}.sizes"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
blacklist_filter = params.blacklist ? "sortBed -i ${blacklist} -g ${fasta}.sizes | complementBed -i stdin -g ${fasta}.sizes" : "awk '{print \$1, '0' , \$2}' OFS='\t' ${fasta}.sizes"
blacklist_filter = params.blacklist ? "sortBed -i $blacklist -g ${fasta}.sizes | complementBed -i stdin -g ${fasta}.sizes" : "awk '{print \$1, '0' , \$2}' OFS='\t' ${fasta}.sizes"

Copy link
Member

Choose a reason for hiding this comment

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

Should be fine without the '{}'.

@drpatelh
Copy link
Member

Thanks @jinmingda . This is perfect. Im quite impressed with your level of knowledge of Nextflow by the way 😎

Would you mind also adding a line to CHANGELOG please briefly describing the changes 👍

@drpatelh
Copy link
Member

Ill make the changes in to get the PR merged 👍
#49

@drpatelh drpatelh merged commit f707a87 into nf-core:dev Sep 30, 2019
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.

3 participants