Skip to content

Commit

Permalink
Merge pull request #321 from skrakau/fix_for_release
Browse files Browse the repository at this point in the history
Fixes for release
  • Loading branch information
skrakau authored Jun 13, 2022
2 parents 7e5275c + c7d9edd commit c46ddd7
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 20 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#305](https://github.com/nf-core/mag/pull/305) - Add missing Bowtie2 version for process `BOWTIE2_PHIX_REMOVAL_ALIGN` to `software_versions.yml`
- [#307](https://github.com/nf-core/mag/pull/307) - Fix retrieval of GTDB-Tk version (note about newer version caused error in `CUSTOM_DUMPSOFTWAREVERSIONS`)
- [#309](https://github.com/nf-core/mag/pull/309) - Fix publishing of BUSCO `busco_downloads/` folder, i.e. publish only when `--save_busco_reference` is specified
- [#321](https://github.com/nf-core/mag/pull/321) - Fix parameter processing in `BOWTIE2_REMOVAL_ALIGN` (which was erroneously for `BOWTIE2_PHIX_REMOVAL_ALIGN`)

### `Dependencies`

| Tool | Previous version | New version |
| ------- | ---------------- | ----------- |
| fastp | 0.20.1 | 0.23.2 |
| MultiQC | 1.11 | 1.12 |

## v2.1.1 - 2021/11/25

### `Added`
Expand Down
10 changes: 6 additions & 4 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ process {
}

withName: BOWTIE2_PHIX_REMOVAL_ALIGN {
ext.suffix = "phix_removed"
ext.prefix = { "${meta.id}.phix_removed" }
publishDir = [
path: { "${params.outdir}/QC_shortreads/remove_phix" },
mode: params.publish_dir_mode,
Expand All @@ -84,7 +84,9 @@ process {
}

withName: BOWTIE2_HOST_REMOVAL_ALIGN {
ext.suffix = "host_removed"
ext.args = params.host_removal_verysensitive ? "--very-sensitive" : "--sensitive"
ext.args2 = params.host_removal_save_ids ? "--host_removal_save_ids" : ''
ext.prefix = { "${meta.id}.host_removed" }
publishDir = [
path: { "${params.outdir}/QC_shortreads/remove_host" },
mode: params.publish_dir_mode,
Expand All @@ -111,7 +113,7 @@ process {
}

withName: NANOPLOT_RAW {
ext.suffix = 'raw'
ext.prefix = 'raw'
publishDir = [
path: { "${params.outdir}/QC_longreads/NanoPlot/${meta.id}" },
mode: params.publish_dir_mode,
Expand All @@ -120,7 +122,7 @@ process {
}

withName: NANOPLOT_FILTERED {
ext.suffix = 'filtered'
ext.prefix = 'filtered'
publishDir = [
path: { "${params.outdir}/QC_longreads/NanoPlot/${meta.id}" },
mode: params.publish_dir_mode,
Expand Down
2 changes: 1 addition & 1 deletion conf/test_adapterremoval.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Defines input files and everything required to run a fast and simple pipeline test.
Use as follows:
nextflow run nf-core/mag -profile test,<docker/singularity>
nextflow run nf-core/mag -profile test,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/
Expand Down
2 changes: 1 addition & 1 deletion conf/test_ancient_dna.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Defines input files and everything required to run a fast and simple pipeline test.
Use as follows:
nextflow run nf-core/mag -profile test_ancient_dna,<docker/singularity>
nextflow run nf-core/mag -profile test_ancient_dna,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/
Expand Down
2 changes: 1 addition & 1 deletion conf/test_busco_auto.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Defines input files and everything required to run a fast and simple pipeline test.
Use as follows:
nextflow run nf-core/mag -profile test_busco_auto,<docker/singularity>
nextflow run nf-core/mag -profile test_busco_auto,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/
Expand Down
2 changes: 1 addition & 1 deletion conf/test_host_rm.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Defines input files and everything required to run a fast and simple pipeline test.
Use as follows:
nextflow run nf-core/mag -profile test_host_rm,<docker/singularity>
nextflow run nf-core/mag -profile test_host_rm,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/
Expand Down
2 changes: 1 addition & 1 deletion conf/test_hybrid.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Defines input files and everything required to run a fast and simple pipeline test.
Use as follows:
nextflow run nf-core/mag -profile test_hybrid,<docker/singularity>
nextflow run nf-core/mag -profile test_hybrid,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/
Expand Down
2 changes: 1 addition & 1 deletion conf/test_hybrid_host_rm.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Defines input files and everything required to run a fast and simple pipeline test.
Use as follows:
nextflow run nf-core/mag -profile test_hybrid_host_rm,<docker/singularity>
nextflow run nf-core/mag -profile test_hybrid_host_rm,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/
Expand Down
8 changes: 6 additions & 2 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d
- [Taxonomic classification of binned genomes](#taxonomic-classification-of-binned-genomes)
- [Genome annotation of binned genomes](#genome-annotation-of-binned-genomes)
- [Additional summary for binned genomes](#additional-summary-for-binned-genomes)
- [Ancient DNA](#ancient-dna)
- [MultiQC](#multiqc) - aggregate report, describing results of the whole pipeline
- [Pipeline information](#pipeline-information) - Report metrics generated during the workflow execution

Expand Down Expand Up @@ -89,7 +90,8 @@ The pipeline uses bowtie2 to map short reads against the host reference genome s
<summary>Output files</summary>

- `QC_shortreads/remove_host/`
- `[sample].host_removed.bowtie2.log`: Contains the bowtie2 log file indicating how many reads have been mapped as well as a file listing the read ids of discarded reads.
- `[sample].host_removed.bowtie2.log`: Contains the bowtie2 log file indicating how many reads have been mapped.
- `[sample].host_removed.mapped*.read_ids.txt`: Contains a file listing the read ids of discarded reads.

</details>

Expand Down Expand Up @@ -513,7 +515,9 @@ Whole genome annotation is the process of identifying features of interest in a

</details>

## Ancient DNA (optional, only with `-profile ancient_dna`)
## Ancient DNA

Optional, only running when parameter `-profile ancient_dna` is specified.

### `PyDamage`

Expand Down
12 changes: 6 additions & 6 deletions modules/local/bowtie2_removal_align.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Bowtie2 for read removal
*/
process BOWTIE2_REMOVAL_ALIGN {
tag "${meta.id}-${task.ext.suffix}"
tag "$meta.id"

conda (params.enable_conda ? "bioconda::bowtie2=2.4.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
Expand All @@ -21,15 +21,15 @@ process BOWTIE2_REMOVAL_ALIGN {

script:
def args = task.ext.args ?: ''
def prefix = task.ext.suffix ? "${meta.id}.${task.ext.suffix}" : "${meta.id}"
def sensitivity = params.host_removal_verysensitive ? "--very-sensitive" : "--sensitive"
def save_ids = params.host_removal_save_ids ? "Y" : "N"
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def save_ids = (args2.contains('--host_removal_save_ids')) ? "Y" : "N"
if (!meta.single_end){
"""
bowtie2 -p ${task.cpus} \
-x ${index[0].getSimpleName()} \
-1 "${reads[0]}" -2 "${reads[1]}" \
$sensitivity \
$args \
--un-conc-gz ${prefix}.unmapped_%.fastq.gz \
--al-conc-gz ${prefix}.mapped_%.fastq.gz \
1> /dev/null \
Expand All @@ -50,7 +50,7 @@ process BOWTIE2_REMOVAL_ALIGN {
bowtie2 -p ${task.cpus} \
-x ${index[0].getSimpleName()} \
-U ${reads} \
$sensitivity \
$args \
--un-gz ${prefix}.unmapped.fastq.gz \
--al-gz ${prefix}.mapped.fastq.gz \
1> /dev/null \
Expand Down
4 changes: 2 additions & 2 deletions modules/local/nanoplot.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ process NANOPLOT {
path "versions.yml" , emit: versions

script:
def prefix = task.ext.suffix ? "-p ${task.ext.suffix}_" : ''
def title = task.ext.suffix ? "${meta.id}_${task.ext.suffix}" : "${meta.id}"
def prefix = task.ext.prefix ? "-p ${task.ext.prefix}_" : ''
def title = task.ext.prefix ? "${meta.id}_${task.ext.prefix}" : "${meta.id}"
"""
NanoPlot -t ${task.cpus} \
${prefix} \
Expand Down

0 comments on commit c46ddd7

Please sign in to comment.