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: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unpublished / Dev Branch]

### `Added`

* Clarified `--complexity_filter` flag to be specifically for poly G trimming.

### `Fixed`

* [#151](https://github.com/nf-core/eager/pull/151) - Fixed [post-deduplication step errors](https://github.com/nf-core/eager/issues/128
* [#147](https://github.com/nf-core/eager/pull/147) - Fix Samtools Index for [large references](https://github.com/nf-core/eager/issues/146)
* [#145](https://github.com/nf-core/eager/pull/145) - Added Picard Memory Handling [fix](https://github.com/nf-core/eager/issues/144)
Expand All @@ -20,7 +25,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### `Fixed`
* [#128](https://github.com/nf-core/eager/issues/128) - Fixed reference genome handling errors
)

### `Dependencies`
* Picard Tools 2.18.21 -> 2.18.23
Expand Down
1 change: 1 addition & 0 deletions conf/multiqc_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ top_modules:
- '*_fastqc.zip'
path_filters_exclude:
- '*.combined.prefixed_fastqc.zip'
- 'fastp'
- 'adapterRemoval'
- 'fastqc':
name: 'FastQC (post-AdapterRemoval)'
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ Turns off duplicate removal methods DeDup and MarkDuplicates respectively. No du

## Complexity Filtering Options

### `--complexity_filter`
### `--complexity_filter_poly_g`

Performs a poly-G tail removal step in the beginning of the pipeline, if turned on. This can be useful for trimming ploy-G tails from short-fragments sequenced on two-colour Illumina chemistry such as NextSeqs (where no-fluorescence is read as a G on two-colour chemistry), which can inflate reported GC content values.

Expand Down
22 changes: 11 additions & 11 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def helpMessage() {
--skip_deduplication

Complexity Filtering
--complexity_filtering Run poly-G removal on FASTQ files
--complexity_filter_poly_g Run poly-G removal on FASTQ files
--complexity_filter_poly_g_min Specify length of poly-g min for clipping to be performed (default: 10)

Clipping / Merging
Expand Down Expand Up @@ -151,7 +151,7 @@ params.skip_qualimap = false
params.skip_deduplication = false

//Complexity filtering reads
params.complexity_filter = false
params.complexity_filter_poly_g = false
params.complexity_filter_poly_g_min = 10

//Read clipping and merging parameters
Expand Down Expand Up @@ -285,14 +285,14 @@ if( params.readPaths ){
.from( params.readPaths )
.map { row -> [ row[0], [ file( row[1][0] ) ] ] }
.ifEmpty { exit 1, "params.readPaths or params.bams was empty - no input files supplied!" }
.into { ch_read_files_clip; ch_read_files_fastqc; ch_read_files_complexity_filtering }
.into { ch_read_files_clip; ch_read_files_fastqc; ch_read_files_complexity_filter_poly_g }
ch_bam_to_fastq_convert = Channel.empty()
} else if (!params.bam){
Channel
.from( params.readPaths )
.map { row -> [ row[0], [ file( row[1][0] ), file( row[1][1] ) ] ] }
.ifEmpty { exit 1, "params.readPaths or params.bams was empty - no input files supplied!" }
.into { ch_read_files_clip; ch_read_files_fastqc; ch_read_files_complexity_filtering }
.into { ch_read_files_clip; ch_read_files_fastqc; ch_read_files_complexity_filter_poly_g }
ch_bam_to_fastq_convert = Channel.empty()
} else {
Channel
Expand All @@ -304,15 +304,15 @@ if( params.readPaths ){

//Set up clean channels
ch_read_files_fastqc = Channel.empty()
ch_read_files_complexity_filtering = Channel.empty()
ch_read_files_complexity_filter_poly_g = Channel.empty()
ch_read_files_clip = Channel.empty()
}
} else if (!params.bam){
Channel
.fromFilePairs( params.reads, size: params.singleEnd ? 1 : 2 )
.ifEmpty { exit 1, "Cannot find any reads matching: ${params.reads}\nNB: Path needs" +
"to be enclosed in quotes!\nNB: Path requires at least one * wildcard!\nIf this is single-end data, please specify --singleEnd on the command line." }
.into { ch_read_files_clip; ch_read_files_fastqc; ch_read_files_complexity_filtering }
.into { ch_read_files_clip; ch_read_files_fastqc; ch_read_files_complexity_filter_poly_g }
ch_bam_to_fastq_convert = Channel.empty()
} else {
Channel
Expand All @@ -325,7 +325,7 @@ if( params.readPaths ){

//Set up clean channels
ch_read_files_fastqc = Channel.empty()
ch_read_files_complexity_filtering = Channel.empty()
ch_read_files_complexity_filter_poly_g = Channel.empty()
ch_read_files_clip = Channel.empty()

}
Expand Down Expand Up @@ -543,13 +543,13 @@ process fastp {
tag "$name"
publishDir "${params.outdir}/FastP", mode: 'copy'

when: params.complexity_filter
when: params.complexity_filter_poly_g

input:
set val(name), file(reads) from ch_read_files_complexity_filtering.mix(ch_read_files_converted_fastp)
set val(name), file(reads) from ch_read_files_complexity_filter_poly_g.mix(ch_read_files_converted_fastp)

output:
set val(name), file("*pG.fq.gz") into ch_clipped_reads_complexity_filtered
set val(name), file("*pG.fq.gz") into ch_clipped_reads_complexity_filtered_poly_g
file("*.json") into ch_fastp_for_multiqc

script:
Expand Down Expand Up @@ -577,7 +577,7 @@ process adapter_removal {
when: !params.bam

input:
set val(name), file(reads) from ( params.complexity_filter ? ch_clipped_reads_complexity_filtered : ch_read_files_clip )
set val(name), file(reads) from ( params.complexity_filter_poly_g ? ch_clipped_reads_complexity_filtered_poly_g : ch_read_files_clip )

output:
file "*.combined*.gz" into (ch_clipped_reads, ch_clipped_reads_for_fastqc,ch_clipped_reads_circularmapper,ch_clipped_reads_bwamem)
Expand Down