diff --git a/CHANGELOG.md b/CHANGELOG.md index 95dd96d7..3b89e848 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed +- Remove harsh trimming option `--trim` [#413](https://github.com/nf-core/rnafusion/pull/413) + ## v2.4.0 - [2023/09/22] ### Added diff --git a/docs/usage.md b/docs/usage.md index 5669da18..1c514a24 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -184,10 +184,7 @@ You can also generate such `YAML`/`JSON` files via [nf-core/launch](https://nf-c #### Trimming -There are 2 options to trim - -1. Fastp - In this case all tools use the trimmed reads. Quality and adapter trimming by default. In addition, tail trimming and adapter_fastq specification are possible. Example usage: +When the flag `--fastp_trim` is used, `fastp` is used to provide all tools with trimmed reads. Quality and adapter trimming by default. In addition, tail trimming and adapter_fastq specification are possible. Example usage: ```bash nextflow run nf-core/rnafusion \ @@ -200,19 +197,7 @@ nextflow run nf-core/rnafusion \ --adapter_fastq (optional) ``` -2. Hard trimming - In this case, only reads fed to fusioncatcher are trimmed. This is a harsh workaround in case of high read-through. The recommended trimming is thus the fastp_trim one. The trimming is done at 75 bp from the tails. Example usage: - -```bash -nextflow run nf-core/rnafusion \ --- -- ... \ ---input \ ---genomes_base \ ---outdir \ ---trim -``` - -#### Filter out fusions detected by less than INT tools +#### Filter fusions detected by 2 or more tools ```bash nextflow run nf-core/rnafusion \ diff --git a/modules/local/reformat/main.nf b/modules/local/reformat/main.nf deleted file mode 100644 index 969b0e34..00000000 --- a/modules/local/reformat/main.nf +++ /dev/null @@ -1,53 +0,0 @@ -process REFORMAT { - tag "$meta.id" - label 'process_medium' - - conda "bioconda::bbmap=38.90" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bbmap:38.90--he522d1c_1' : - 'quay.io/biocontainers/bbmap:38.90--he522d1c_1' }" - - - input: - tuple val(meta), path(reads) - - output: - path "versions.yml" , emit: versions - tuple val(meta), path("*trimmed.fq.gz") , emit: reads_out - - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def in1 = "in=${reads[0]}" - def in2 = meta.single_end ? "" : "in=${reads[1]}" - def out1 ="out=${prefix}_R1_trimmed.fq.gz" - def out2 =meta.single_end ? "" : "out=${prefix}_R2_trimmed.fq.gz" - - """ - reformat.sh $in1 $out1 $args - reformat.sh $in2 $out2 $args2 - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - reformat.sh: \$(echo \$(reformat.sh --version 2>&1)| sed -e "s/BBMap version //g" ) - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - def out1 ="out=${prefix}_R1_trimmed.fq.gz" - def out2 =meta.single_end ? "" : "out=${prefix}_R2_trimmed.fq.gz" - """ - touch $out1 - touch $out2 - cat <<-END_VERSIONS > versions.yml - "${task.process}": - reformat.sh: \$(echo \$(reformat.sh --version 2>&1)| sed -e "s/BBMap version //g" ) - END_VERSIONS - """ -} diff --git a/modules/local/reformat/meta.yml b/modules/local/reformat/meta.yml deleted file mode 100644 index 86e0970a..00000000 --- a/modules/local/reformat/meta.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: fusionreport -description: fusionreport -keywords: - - sort -tools: - - fusionreport: - description: fusionreport - homepage: https://github.com/matq007/fusion-report - documentation: https://matq007.github.io/fusion-report/#/ - doi: "10.1101/011650" - licence: ["GPL v3"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: FASTQ file - pattern: "*.{fastq}*" - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - reads: - type: file - description: FASTQ file - pattern: "*.{fq.gz}" - -authors: - - "@praveenraj2018, @rannick" diff --git a/nextflow.config b/nextflow.config index 047adcd4..a81e3ea2 100644 --- a/nextflow.config +++ b/nextflow.config @@ -35,7 +35,6 @@ params { tools_cutoff = 1 // Trimming - trim = false fastp_trim = false trim_tail = null adapter_fasta = [] diff --git a/nextflow_schema.json b/nextflow_schema.json index 2ed3d765..611da821 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -267,11 +267,6 @@ "fa_icon": "fas fa-cut", "description": "Options to adjust read trimming criteria.", "properties": { - "trim": { - "type": "boolean", - "description": "Preform trimming of reads, default: false", - "fa_icon": "fas fa-cut" - }, "fastp_trim": { "type": "boolean", "description": "Preform fastp trimming of reads, default: false", diff --git a/subworkflows/local/trim_workflow.nf b/subworkflows/local/trim_workflow.nf index bf3781f8..63012680 100644 --- a/subworkflows/local/trim_workflow.nf +++ b/subworkflows/local/trim_workflow.nf @@ -1,4 +1,3 @@ -include { REFORMAT } from '../../modules/local/reformat/main' include { FASTQC as FASTQC_FOR_TRIM } from '../../modules/nf-core/fastqc/main' include { FASTP } from '../../modules/nf-core/fastp/main' include { FASTQC as FASTQC_FOR_FASTP } from '../../modules/nf-core/fastqc/main' @@ -11,17 +10,7 @@ workflow TRIM_WORKFLOW { main: ch_versions = Channel.empty() - if (params.trim) { - - REFORMAT( reads ) - ch_versions = ch_versions.mix(REFORMAT.out.versions) - FASTQC_FOR_TRIM (REFORMAT.out.reads_out) - ch_versions = ch_versions.mix(FASTQC_FOR_TRIM.out.versions) - - ch_reads_all = reads - ch_reads_fusioncatcher = REFORMAT.out.reads_out - } - else if (params.fastp_trim) { + if (params.fastp_trim) { FASTP(reads, params.adapter_fasta, false, false) ch_versions = ch_versions.mix(FASTP.out.versions)