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

Fixes for release #321

Merged
merged 9 commits into from
Jun 13, 2022
Merged
Show file tree
Hide file tree
Changes from 5 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
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
7 changes: 5 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 @@ -511,7 +513,8 @@ 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.
skrakau marked this conversation as resolved.
Show resolved Hide resolved

### `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