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

Update modules, bump multiqc version and other minor fixes #129

Merged
merged 10 commits into from Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 4 additions & 23 deletions .github/workflows/linting.yml
Expand Up @@ -12,9 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '10'
- uses: actions/setup-node@v2
- name: Install markdownlint
run: npm install -g markdownlint-cli
- name: Run Markdownlint
Expand All @@ -27,21 +25,16 @@ jobs:
with:
message: |
## Markdown linting is failing

To keep the code consistent with lots of contributors, we run automated code consistency checks.
To fix this CI test, please run:

* Install `markdownlint-cli`
* On Mac: `brew install markdownlint-cli`
* Everything else: [Install `npm`](https://www.npmjs.com/get-npm) then [install `markdownlint-cli`](https://www.npmjs.com/package/markdownlint-cli) (`npm install -g markdownlint-cli`)
* Fix the markdown errors
* Automatically: `markdownlint . --fix`
* Manually resolve anything left from `markdownlint .`

Once you push these changes the test should pass, and you can hide this comment :+1:

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!
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: false
Expand All @@ -51,9 +44,7 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: '10'
- uses: actions/setup-node@v2

- name: Install editorconfig-checker
run: npm install -g editorconfig-checker
Expand All @@ -65,13 +56,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '10'
- uses: actions/setup-node@v2
- name: Install yaml-lint
run: npm install -g yaml-lint
- name: Run yaml-lint
run: yamllint $(find ${GITHUB_WORKSPACE} -type f -name "*.yml" -o -name "*.yaml")
run: yamllint $(find ${GITHUB_WORKSPACE} -type f -name "*.yml" -o -name "*.yaml") -c ${GITHUB_WORKSPACE}/.markdownlint.yml

# If the above check failed, post a comment on the PR explaining the failure
- name: Post PR comment
Expand All @@ -80,20 +69,15 @@ jobs:
with:
message: |
## YAML linting is failing

To keep the code consistent with lots of contributors, we run automated code consistency checks.
To fix this CI test, please run:

* Install `yaml-lint`
* [Install `npm`](https://www.npmjs.com/get-npm) then [install `yaml-lint`](https://www.npmjs.com/package/yaml-lint) (`npm install -g yaml-lint`)
* Fix the markdown errors
* Run the test locally: `yamllint $(find . -type f -name "*.yml" -o -name "*.yaml")`
* Fix any reported errors in your YAML files

Once you push these changes the test should pass, and you can hide this comment :+1:

We highly recommend setting up yaml-lint 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!
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: false
Expand All @@ -111,7 +95,6 @@ jobs:
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/

- uses: actions/setup-python@v1
with:
python-version: '3.6'
Expand All @@ -121,7 +104,6 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install nf-core

- name: Run nf-core lint
env:
GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }}
Expand All @@ -142,4 +124,3 @@ jobs:
lint_log.txt
lint_results.md
PR_number.txt

1 change: 1 addition & 0 deletions .nf-core.yml
Expand Up @@ -6,3 +6,4 @@ lint:
- assets/email_template.txt
- lib/NfcoreTemplate.groovy
- assets/multiqc_config.yaml
- .github/workflows/linting.yml
5 changes: 5 additions & 0 deletions .yamllint.yml
@@ -0,0 +1,5 @@
extends: default

rules:
document-start: disable
line-length: disable
22 changes: 11 additions & 11 deletions conf/modules.config
Expand Up @@ -29,7 +29,7 @@ process {
]
}

withName: CUSTOM_DUMPSOFTWAREVERSIONS {
withName: 'CUSTOM_DUMPSOFTWAREVERSIONS' {
publishDir = [
path: { "${params.outdir}/pipeline_info" },
mode: 'copy',
Expand All @@ -43,15 +43,15 @@ process {
//

process {
withName: CAT_FASTQ {
withName: 'CAT_FASTQ' {
publishDir = [
path: { "${params.outdir}/fastq" },
mode: 'copy',
pattern: '*.fastq',
// enabled: params.save_merged_fastq //TODO ? implement save_merged_fastq param
]
}
withName: INDEX_GENOME {
withName: 'INDEX_GENOME' {
publishDir = [
path: { "${params.outdir}/index" },
mode: 'copy',
Expand All @@ -65,7 +65,7 @@ process {
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
withName: EDGER_QC {
withName: 'EDGER_QC' {
publishDir = [
path: { "${params.outdir}/edger" },
enabled: true
Expand All @@ -77,7 +77,7 @@ process {
// Read QC and trimming options
//
process {
withName: MIRTRACE_RUN {
withName: 'MIRTRACE_RUN' {
publishDir = [
path: { "${params.outdir}/mirtrace" },
mode: 'copy',
Expand Down Expand Up @@ -155,13 +155,13 @@ process {
pattern: "unmapped/*.gz"
]
}
withName: SEQCLUSTER_SEQUENCES {
withName: 'SEQCLUSTER_SEQUENCES' {
publishDir = [
path: { "${params.outdir}/seqcluster" },
enabled: false
]
}
withName: MIRTOP_QUANT {
withName: 'MIRTOP_QUANT' {
publishDir = [
path: { "${params.outdir}" },
mode: 'copy',
Expand All @@ -175,10 +175,10 @@ process {
pattern: "*.tsv"
]
}
withName: EDGER_QC {
withName: 'EDGER_QC' {
publishDir = [
path: { "${params.outdir}/edger" },
enabled: false
enabled: true
]
}
}
Expand Down Expand Up @@ -216,7 +216,7 @@ if (fasta) {

if (!params.skip_mirdeep) {
process {
withName: MIRDEEP2_MAPPER {
withName: 'MIRDEEP2_MAPPER' {
publishDir = [
path: { "${params.outdir}/mirdeep" },
mode: 'copy',
Expand All @@ -229,7 +229,7 @@ if (fasta) {

if (!params.skip_multiqc) {
process {
withName: MULTIQC {
withName: 'MULTIQC' {
ext.args = params.multiqc_title ? "--title \"$params.multiqc_title\"" : ''
publishDir = [
path: { "${params.outdir}/multiqc" },
Expand Down
2 changes: 1 addition & 1 deletion docs/output.md
Expand Up @@ -65,7 +65,7 @@ This is an example of the output we can get:
**Output directory: `results/samtools`**

* `sample_mature.bam`: The aligned BAM file of alignment against mature miRNAs
* `sample_mature_unmapped.fq.gz`: Unmapped reads against mature miRNAs *This file will be used as input for the alignment against miRNA precursors (hairpins)*
* `sample_mature_unmapped.fq.gz`: Unmapped reads against mature miRNAs _This file will be used as input for the alignment against miRNA precursors (hairpins)_
* `sample_mature_hairpin.bam`: The aligned BAM file of alignment against miRNA precursors (hairpins) that didn't map to the mature
* `sample_mature_hairpin_unmapped.fq.gz`: Unmapped reads against miRNA precursors (hairpins)
* `sample_mature_hairpin_genome.bam`: The aligned BAM file of alignment against that didn't map to the precursor.
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Expand Up @@ -197,7 +197,7 @@ Work dir:
Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run`
```

To bypass this error you would need to find exactly which resources are set by the `STAR_ALIGN` process. The quickest way is to search for `process STAR_ALIGN` in the [nf-core/rnaseq Github repo](https://github.com/nf-core/rnaseq/search?q=process+STAR_ALIGN). We have standardised the structure of Nextflow DSL2 pipelines such that all module files will be present in the `modules/` directory and so based on the search results the file we want is `modules/nf-core/software/star/align/main.nf`. If you click on the link to that file you will notice that there is a `label` directive at the top of the module that is set to [`label process_high`](https://github.com/nf-core/rnaseq/blob/4c27ef5610c87db00c3c5a3eed10b1d161abf575/modules/nf-core/software/star/align/main.nf#L9). The [Nextflow `label`](https://www.nextflow.io/docs/latest/process.html#label) directive allows us to organise workflow processes in separate groups which can be referenced in a configuration file to select and configure subset of processes having similar computing requirements. The default values for the `process_high` label are set in the pipeline's [`base.config`](https://github.com/nf-core/rnaseq/blob/4c27ef5610c87db00c3c5a3eed10b1d161abf575/conf/base.config#L33-L37) which in this case is defined as 72GB. Providing you haven't set any other standard nf-core parameters to __cap__ the [maximum resources](https://nf-co.re/usage/configuration#max-resources) used by the pipeline then we can try and bypass the `STAR_ALIGN` process failure by creating a custom config file that sets at least 72GB of memory, in this case increased to 100GB. The custom config below can then be provided to the pipeline via the [`-c`](#-c) parameter as highlighted in previous sections.
To bypass this error you would need to find exactly which resources are set by the `STAR_ALIGN` process. The quickest way is to search for `process STAR_ALIGN` in the [nf-core/rnaseq Github repo](https://github.com/nf-core/rnaseq/search?q=process+STAR_ALIGN). We have standardised the structure of Nextflow DSL2 pipelines such that all module files will be present in the `modules/` directory and so based on the search results the file we want is `modules/nf-core/software/star/align/main.nf`. If you click on the link to that file you will notice that there is a `label` directive at the top of the module that is set to [`label process_high`](https://github.com/nf-core/rnaseq/blob/4c27ef5610c87db00c3c5a3eed10b1d161abf575/modules/nf-core/software/star/align/main.nf#L9). The [Nextflow `label`](https://www.nextflow.io/docs/latest/process.html#label) directive allows us to organise workflow processes in separate groups which can be referenced in a configuration file to select and configure subset of processes having similar computing requirements. The default values for the `process_high` label are set in the pipeline's [`base.config`](https://github.com/nf-core/rnaseq/blob/4c27ef5610c87db00c3c5a3eed10b1d161abf575/conf/base.config#L33-L37) which in this case is defined as 72GB. Providing you haven't set any other standard nf-core parameters to **cap** the [maximum resources](https://nf-co.re/usage/configuration#max-resources) used by the pipeline then we can try and bypass the `STAR_ALIGN` process failure by creating a custom config file that sets at least 72GB of memory, in this case increased to 100GB. The custom config below can then be provided to the pipeline via the [`-c`](#-c) parameter as highlighted in previous sections.

```nextflow
process {
Expand Down
20 changes: 10 additions & 10 deletions modules.json
Expand Up @@ -4,34 +4,34 @@
"repos": {
"nf-core/modules": {
"cat/fastq": {
"git_sha": "826a5603db5cf5b4f1e55cef9cc0b7c37d3c7e70"
"git_sha": "e20e57f90b6787ac9a010a980cf6ea98bd990046"
},
"custom/dumpsoftwareversions": {
"git_sha": "20d8250d9f39ddb05dfb437603aaf99b5c0b2b41"
"git_sha": "e20e57f90b6787ac9a010a980cf6ea98bd990046"
},
"fastqc": {
"git_sha": "9d0cad583b9a71a6509b754fdf589cbfbed08961"
"git_sha": "e20e57f90b6787ac9a010a980cf6ea98bd990046"
},
"multiqc": {
"git_sha": "20d8250d9f39ddb05dfb437603aaf99b5c0b2b41"
"git_sha": "d1f33be04f5d3e402398707037f56f13166df4fe"
},
"samtools/flagstat": {
"git_sha": "20d8250d9f39ddb05dfb437603aaf99b5c0b2b41"
"git_sha": "e20e57f90b6787ac9a010a980cf6ea98bd990046"
},
"samtools/idxstats": {
"git_sha": "20d8250d9f39ddb05dfb437603aaf99b5c0b2b41"
"git_sha": "e20e57f90b6787ac9a010a980cf6ea98bd990046"
},
"samtools/index": {
"git_sha": "0fafaeebf52cc5ab554b83297ed02a48d852a848"
"git_sha": "e20e57f90b6787ac9a010a980cf6ea98bd990046"
},
"samtools/sort": {
"git_sha": "9d0cad583b9a71a6509b754fdf589cbfbed08961"
"git_sha": "e20e57f90b6787ac9a010a980cf6ea98bd990046"
},
"samtools/stats": {
"git_sha": "20d8250d9f39ddb05dfb437603aaf99b5c0b2b41"
"git_sha": "e20e57f90b6787ac9a010a980cf6ea98bd990046"
},
"trimgalore": {
"git_sha": "9d0cad583b9a71a6509b754fdf589cbfbed08961"
"git_sha": "e20e57f90b6787ac9a010a980cf6ea98bd990046"
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions modules/nf-core/modules/cat/fastq/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions modules/nf-core/modules/custom/dumpsoftwareversions/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions modules/nf-core/modules/fastqc/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions modules/nf-core/modules/multiqc/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion modules/nf-core/modules/samtools/flagstat/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion modules/nf-core/modules/samtools/idxstats/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion modules/nf-core/modules/samtools/index/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions modules/nf-core/modules/samtools/sort/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.