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

renamed bwa_index to bwa in subworkflow #27

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"python.linting.flake8Path": "/opt/conda/bin/flake8",
"python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle",
"python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle",
"python.linting.pylintPath": "/opt/conda/bin/pylint"
"python.linting.pylintPath": "/opt/conda/bin/pylint",
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"]
}
}
"extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"],
},
},
}
3 changes: 3 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ If you're not used to this workflow with git, you can start with some [docs from

## Tests

You can optionally test your changes by running the pipeline locally. Then it is recommended to use the `debug` profile to
receive warnings about process selectors and other debug info. Example: `nextflow run . -profile debug,test,docker --outdir <OUTDIR>`.

When you create a pull request with changes, [GitHub Actions](https://github.com/features/actions) will run automatic tests.
Typically, pull-requests are only fully reviewed when these tests are passing, though of course we can help out before then.

Expand Down
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/samm
- [ ] If necessary, also make a PR on the nf-core/sammyseq _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
- [ ] Make sure your code lints (`nf-core lint`).
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir <OUTDIR>`).
- [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir <OUTDIR>`).
- [ ] Usage Documentation in `docs/usage.md` is updated.
- [ ] Output Documentation in `docs/output.md` is updated.
- [ ] `CHANGELOG.md` is updated.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets
- name: Post PR comment
if: failure()
uses: mshick/add-pr-comment@v1
uses: mshick/add-pr-comment@v2
with:
message: |
## This PR is against the `master` branch :x:
Expand Down
65 changes: 13 additions & 52 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,72 +11,33 @@ on:
types: [published]

jobs:
EditorConfig:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3

- name: Install editorconfig-checker
run: npm install -g editorconfig-checker

- name: Run ECLint check
run: editorconfig-checker -exclude README.md $(find .* -type f | grep -v '.git\|.py\|.md\|json\|yml\|yaml\|html\|css\|work\|.nextflow\|build\|nf_core.egg-info\|log.txt\|Makefile')

Prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3

- name: Install Prettier
run: npm install -g prettier

- name: Run Prettier --check
run: prettier --check ${GITHUB_WORKSPACE}

PythonBlack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Check code lints with Black
uses: psf/black@stable

# If the above check failed, post a comment on the PR explaining the failure
- name: Post PR comment
if: failure()
uses: mshick/add-pr-comment@v1
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
message: |
## Python linting (`black`) 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 [`black`](https://black.readthedocs.io/en/stable/): `pip install black`
* Fix formatting errors in your pipeline: `black .`

Once you push these changes the test should pass, and you can hide this comment :+1:
python-version: 3.11
cache: "pip"

We highly recommend setting up Black in your code editor so that this formatting is done automatically on save. Ask about it on Slack for help!
- name: Install pre-commit
run: pip install pre-commit

Thanks again for your contribution!
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: false
- name: Run pre-commit
run: pre-commit run --all-files

nf-core:
runs-on: ubuntu-latest
steps:
- name: Check out pipeline code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Nextflow
uses: nf-core/setup-nextflow@v1

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
architecture: "x64"
Expand All @@ -99,7 +60,7 @@ jobs:

- name: Upload linting log file artifact
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: linting-logs
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download lint results
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v3
with:
workflow: linting.yml
workflow_conclusion: completed
Expand Down
2 changes: 1 addition & 1 deletion assets/email_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<img src="cid:nfcorepipelinelogo">

<h1>nf-core/sammyseq v${version}</h1>
<h1>nf-core/sammyseq ${version}</h1>
<h2>Run Name: $runName</h2>

<% if (!success){
Expand Down
2 changes: 1 addition & 1 deletion assets/email_template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
|\\ | |__ __ / ` / \\ |__) |__ } {
| \\| | \\__, \\__/ | \\ |___ \\`-._,-`-,
`._,._,'
nf-core/sammyseq v${version}
nf-core/sammyseq ${version}
----------------------------------------------------
Run Name: $runName

Expand Down
Binary file modified assets/nf-core-sammyseq_logo_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/nf-core-sammyseq_logo_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/nf-core-sammyseq_logo_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 18 additions & 14 deletions lib/NfcoreTemplate.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import org.yaml.snakeyaml.Yaml
import groovy.json.JsonOutput
import nextflow.extension.FilesEx

class NfcoreTemplate {

Expand Down Expand Up @@ -141,12 +142,14 @@ class NfcoreTemplate {
try {
if (params.plaintext_email) { throw GroovyException('Send plaintext e-mail, not HTML') }
// Try to send HTML e-mail using sendmail
def sendmail_tf = new File(workflow.launchDir.toString(), ".sendmail_tmp.html")
sendmail_tf.withWriter { w -> w << sendmail_html }
[ 'sendmail', '-t' ].execute() << sendmail_html
log.info "-${colors.purple}[$workflow.manifest.name]${colors.green} Sent summary e-mail to $email_address (sendmail)-"
} catch (all) {
// Catch failures and try with plaintext
def mail_cmd = [ 'mail', '-s', subject, '--content-type=text/html', email_address ]
if ( mqc_report.size() <= max_multiqc_email_size.toBytes() ) {
if ( mqc_report != null && mqc_report.size() <= max_multiqc_email_size.toBytes() ) {
mail_cmd += [ '-A', mqc_report ]
}
mail_cmd.execute() << email_html
Expand All @@ -155,14 +158,16 @@ class NfcoreTemplate {
}

// Write summary e-mail HTML to a file
def output_d = new File("${params.outdir}/pipeline_info/")
if (!output_d.exists()) {
output_d.mkdirs()
}
def output_hf = new File(output_d, "pipeline_report.html")
def output_hf = new File(workflow.launchDir.toString(), ".pipeline_report.html")
output_hf.withWriter { w -> w << email_html }
def output_tf = new File(output_d, "pipeline_report.txt")
FilesEx.copyTo(output_hf.toPath(), "${params.outdir}/pipeline_info/pipeline_report.html");
output_hf.delete()

// Write summary e-mail TXT to a file
def output_tf = new File(workflow.launchDir.toString(), ".pipeline_report.txt")
output_tf.withWriter { w -> w << email_txt }
FilesEx.copyTo(output_tf.toPath(), "${params.outdir}/pipeline_info/pipeline_report.txt");
output_tf.delete()
}

//
Expand Down Expand Up @@ -227,15 +232,14 @@ class NfcoreTemplate {
// Dump pipeline parameters in a json file
//
public static void dump_parameters(workflow, params) {
def output_d = new File("${params.outdir}/pipeline_info/")
if (!output_d.exists()) {
output_d.mkdirs()
}

def timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
def output_pf = new File(output_d, "params_${timestamp}.json")
def filename = "params_${timestamp}.json"
def temp_pf = new File(workflow.launchDir.toString(), ".${filename}")
def jsonStr = JsonOutput.toJson(params)
output_pf.text = JsonOutput.prettyPrint(jsonStr)
temp_pf.text = JsonOutput.prettyPrint(jsonStr)

FilesEx.copyTo(temp_pf.toPath(), "${params.outdir}/pipeline_info/params_${timestamp}.json")
temp_pf.delete()
}

//
Expand Down
Binary file removed lib/nfcore_external_java_deps.jar
Binary file not shown.
42 changes: 21 additions & 21 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,92 +7,92 @@
"nf-core": {
"bwa/aln": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["fastq_align_bwaaln", "modules"]
},
"bwa/index": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"bwa/sampe": {
"branch": "master",
"git_sha": "603ecbd9f45300c9788f197d2a15a005685b4220",
"git_sha": "1e2b7fb7106852388610c0360d234b0829eb980e",
"installed_by": ["fastq_align_bwaaln"]
},
"bwa/samse": {
"branch": "master",
"git_sha": "603ecbd9f45300c9788f197d2a15a005685b4220",
"git_sha": "1e2b7fb7106852388610c0360d234b0829eb980e",
"installed_by": ["fastq_align_bwaaln"]
},
"cat/fastq": {
"branch": "master",
"git_sha": "5c460c5a4736974abde2843294f35307ee2b0e5e",
"git_sha": "02fd5bd7275abad27aad32d5c852e0a9b1b98882",
"installed_by": ["modules"]
},
"custom/dumpsoftwareversions": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"git_sha": "8ec825f465b9c17f9d83000022995b4f7de6fe93",
"installed_by": ["modules"]
},
"deeptools/bamcoverage": {
"branch": "master",
"git_sha": "603ecbd9f45300c9788f197d2a15a005685b4220",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"fastqc": {
"branch": "master",
"git_sha": "102cc9b709a6da9f7cee2373563ab1464fca9c0a",
"git_sha": "f4ae1d942bd50c5c0b9bd2de1393ce38315ba57c",
"installed_by": ["modules"]
},
"gunzip": {
"branch": "master",
"git_sha": "e06548bfa36ee31869b81041879dd6b3a83b1d57",
"git_sha": "3a5fef109d113b4997c9822198664ca5f2716208",
"installed_by": ["modules"]
},
"multiqc": {
"branch": "master",
"git_sha": "a6e11ac655e744f7ebc724be669dd568ffdc0e80",
"git_sha": "9e71d8519dfbfc328c078bba14d4bd4c99e39a94",
"installed_by": ["modules"]
},
"picard/markduplicates": {
"branch": "master",
"git_sha": "735e1e04e7e01751d2d6e97055bbdb6f70683cc1",
"git_sha": "ec833ac4c29db6005d18baccf3306f557c46b006",
"installed_by": ["bam_markduplicates_picard", "modules"]
},
"samtools/faidx": {
"branch": "master",
"git_sha": "fd742419940e01ba1c5ecb172c3e32ec840662fe",
"git_sha": "ce0b1aed7d504883061e748f492a31bf44c5777c",
"installed_by": ["modules"]
},
"samtools/flagstat": {
"branch": "master",
"git_sha": "570ec5bcfe19c49e16c9ca35a7a116563af6cc1c",
"git_sha": "ce0b1aed7d504883061e748f492a31bf44c5777c",
"installed_by": ["bam_stats_samtools"]
},
"samtools/idxstats": {
"branch": "master",
"git_sha": "e662ab16e0c11f1e62983e21de9871f59371a639",
"git_sha": "ce0b1aed7d504883061e748f492a31bf44c5777c",
"installed_by": ["bam_stats_samtools"]
},
"samtools/index": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"git_sha": "ce0b1aed7d504883061e748f492a31bf44c5777c",
"installed_by": ["bam_markduplicates_picard", "fastq_align_bwaaln"]
},
"samtools/stats": {
"branch": "master",
"git_sha": "735e1e04e7e01751d2d6e97055bbdb6f70683cc1",
"git_sha": "ec833ac4c29db6005d18baccf3306f557c46b006",
"installed_by": ["bam_stats_samtools"]
},
"trimmomatic": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"untar": {
"branch": "master",
"git_sha": "d0b4fc03af52a1cc8c6fb4493b921b57352b1dd8",
"git_sha": "e719354ba77df0a1bd310836aa2039b45c29d620",
"installed_by": ["modules"]
}
}
Expand All @@ -101,17 +101,17 @@
"nf-core": {
"bam_markduplicates_picard": {
"branch": "master",
"git_sha": "dedc0e31087f3306101c38835d051bf49789445a",
"git_sha": "0c38be7e652a0b2f3a37681ee4c0dbdf85677647",
"installed_by": ["subworkflows"]
},
"bam_stats_samtools": {
"branch": "master",
"git_sha": "dedc0e31087f3306101c38835d051bf49789445a",
"git_sha": "0c38be7e652a0b2f3a37681ee4c0dbdf85677647",
"installed_by": ["bam_markduplicates_picard"]
},
"fastq_align_bwaaln": {
"branch": "master",
"git_sha": "dedc0e31087f3306101c38835d051bf49789445a",
"git_sha": "cfd937a668919d948f6fcbf4218e79de50c2f36f",
"installed_by": ["subworkflows"]
}
}
Expand Down
7 changes: 7 additions & 0 deletions modules/nf-core/bwa/aln/environment.yml

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

2 changes: 1 addition & 1 deletion modules/nf-core/bwa/aln/main.nf

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

Loading
Loading