Skip to content
Merged
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
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,27 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

* Add genrich `0.6`
* Add r-stringi `1.4.3`
* Add pigz `2.3.4`
* Update gawk `4.2.1` -> `5.0.1`
* Update r-base `3.4.1` -> `3.6.1`
* Update r-optparse `1.6.0` -> `1.6.4`
* Update r-ggplot2 `3.1.0` -> `3.2.1`
* Update r-pheatmap `1.0.10` -> `1.0.12`
* Update r-lattice `0.20_35` -> `0.20_38`
* Update r-upsetr `1.3.3` -> `1.4.0`
* Update r-scales `1.0.0` -> `1.1.0`
* Update r-xfun `0.3` -> `0.11`
* Update trim-galore `0.5.0` -> `0.6.4`
* Update trim-galore `0.5.0` -> `0.6.5`
* Update picard `2.19.0` -> `2.21.3`
* Update pysam `0.15.2` -> `0.15.3`
* Update bedtools `2.27.1` -> `2.29.0`
* Update ucsc-bedgraphtobigwig `377` -> `357`
* Update deeptools `3.2.1` -> `3.3.1`
* Update macs2 `2.1.2` -> `2.2.5`
* Update homer `4.9.1` -> `4.10`
* Update multiqc `1.7` -> `1.8`
* Update bioconductor-deseq2 `1.20.0` -> `1.26.0`
* Update bioconductor-vsn `3.46.0` -> `3.54.0`
* Add pigz `2.3.4`

### `Deprecated`

Expand Down
6 changes: 3 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- conda-forge::r-rcolorbrewer=1.1_2
- conda-forge::r-ggplot2=3.2.1
- conda-forge::r-reshape2=1.4.3
- conda-forge::r-scales=1.0.0
- conda-forge::r-scales=1.1.0
- conda-forge::r-pheatmap=1.0.12
- conda-forge::r-lattice=0.20_38
- conda-forge::r-upsetr=1.4.0
Expand All @@ -23,7 +23,7 @@ dependencies:

## bioconda packages
- bioconda::fastqc=0.11.8
- bioconda::trim-galore=0.6.4
- bioconda::trim-galore=0.6.5
- bioconda::bwa=0.7.17
- bioconda::samtools=1.9
- bioconda::picard=2.21.3
Expand All @@ -38,6 +38,6 @@ dependencies:
- bioconda::ataqv=1.0.0
- bioconda::subread=1.6.4
- bioconda::preseq=2.0.3
- bioconda::multiqc=1.7
- bioconda::multiqc=1.8
- bioconda::bioconductor-deseq2=1.26.0
- bioconda::bioconductor-vsn=3.54.0
20 changes: 17 additions & 3 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ if (params.skip_trimming) {
} else {
process TrimGalore {
tag "$name"
label 'process_medium'
label 'process_high'
publishDir "${params.outdir}/trim_galore", mode: 'copy',
saveAs: { filename ->
if (filename.endsWith(".html")) "fastqc/$filename"
Expand All @@ -544,22 +544,36 @@ if (params.skip_trimming) {
file "*.{zip,html}" into ch_trimgalore_fastqc_reports_mqc

script:
// Calculate number of --cores for TrimGalore based on value of task.cpus
// See: https://github.com/FelixKrueger/TrimGalore/blob/master/Changelog.md#version-060-release-on-1-mar-2019
// See: https://github.com/nf-core/atacseq/pull/65#issuecomment-557839116
def cores = 1
if (task.cpus) {
tcores = (((task.cpus as int) - 3) / 3) as int
if (tcores > 1) {
cores = tcores
}
}


// Added soft-links to original fastqs for consistent naming in MultiQC
c_r1 = params.clip_r1 > 0 ? "--clip_r1 ${params.clip_r1}" : ''
c_r2 = params.clip_r2 > 0 ? "--clip_r2 ${params.clip_r2}" : ''
tpc_r1 = params.three_prime_clip_r1 > 0 ? "--three_prime_clip_r1 ${params.three_prime_clip_r1}" : ''
tpc_r2 = params.three_prime_clip_r2 > 0 ? "--three_prime_clip_r2 ${params.three_prime_clip_r2}" : ''
nextseq = params.trim_nextseq > 0 ? "--nextseq ${params.trim_nextseq}" : ''

// Added soft-links to original fastqs for consistent naming in MultiQC
if (params.single_end) {
"""
[ ! -f ${name}.fastq.gz ] && ln -s $reads ${name}.fastq.gz
trim_galore --cores $task.cpus --fastqc --gzip $c_r1 $tpc_r1 $nextseq ${name}.fastq.gz
trim_galore --cores $cores --fastqc --gzip $c_r1 $tpc_r1 $nextseq ${name}.fastq.gz
"""
} else {
"""
[ ! -f ${name}_1.fastq.gz ] && ln -s ${reads[0]} ${name}_1.fastq.gz
[ ! -f ${name}_2.fastq.gz ] && ln -s ${reads[1]} ${name}_2.fastq.gz
trim_galore --cores $task.cpus --paired --fastqc --gzip $c_r1 $c_r2 $tpc_r1 $tpc_r2 $nextseq ${name}_1.fastq.gz ${name}_2.fastq.gz
trim_galore --cores $cores --paired --fastqc --gzip $c_r1 $c_r2 $tpc_r1 $tpc_r2 $nextseq ${name}_1.fastq.gz ${name}_2.fastq.gz
"""
}
}
Expand Down