Skip to content

Commit

Permalink
Merge branch 'dev' into remove_squid_pizzly
Browse files Browse the repository at this point in the history
  • Loading branch information
rannick authored Oct 23, 2023
2 parents 06ade04 + 9fa6eb7 commit 7482127
Show file tree
Hide file tree
Showing 27 changed files with 372 additions and 327 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,10 @@ jobs:
--outdir /home/runner/work/rnafusion/rnafusion/results --starfusion \
--genomes_base /home/runner/work/rnafusion/rnafusion/results/references \
--cosmic_username ${{ secrets.COSMIC_USERNAME }} --cosmic_passwd ${{ secrets.COSMIC_PASSWD }}
- name: Dry test stingtie
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker -stub \
--outdir /home/runner/work/rnafusion/rnafusion/results --stringtie \
--genomes_base /home/runner/work/rnafusion/rnafusion/results/references \
--cosmic_username ${{ secrets.COSMIC_USERNAME }} --cosmic_passwd ${{ secrets.COSMIC_PASSWD }}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add picard CollectInserSizeMetrics to QC workflow [#408](https://github.com/nf-core/rnafusion/pull/408)

### Changed

- Replace PICARD_MARKDUPLICATES with GATK4_MARKDUPLICATES [#409](https://github.com/nf-core/rnafusion/pull/409)
- Removed `--fusioninspector_filter` and `--fusionreport_filter` in favor of `--tools_cutoff` (default = 1, no filters applied) [#389](https://github.com/nf-core/rnafusion/pull/389)
- Now publishing convert2bed output to convert2bed to keep the output file for mosdepth [#420](https://github.com/nf-core/rnafusion/pull/420)
- No more checks for existence of samplesheet, which made building references fail (building references uses a fake sample sheet if none is provided) [#420](https://github.com/nf-core/rnafusion/pull/420)
- `--extreme_sensitivity` used for fusioninspector to minimize fusioninspector filtering [#424](https://github.com/nf-core/rnafusion/pull/424)

### Fixed

- Fix channel i/o issue in StringTie workflow and add StringTie in github CI tests [#416](https://github.com/nf-core/rnafusion/pull/416)
- Updated COSMIC database to fix 404 error while downloading fusionreport references [#420](https://github.com/nf-core/rnafusion/pull/420)

### Removed

- Remove `squid` and `pizzly` fusion detection tools [#406](https://github.com/nf-core/rnafusion/pull/406)
- Remove harsh trimming option `--trim` [#413](https://github.com/nf-core/rnafusion/pull/413)

## v2.4.0 - [2023/09/22]

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ In rnafusion the full-sized test includes reference building and fusion detectio
- [FusionInspector](https://github.com/FusionInspector/FusionInspector)
- [Arriba](https://github.com/suhrig/arriba) visualisation
- QC for mapped reads ([`QualiMap: BAM QC`](https://kokonech.github.io/qualimap/HG00096.chr20_bamqc/qualimapReport.html))
- Collect metrics ([`picard CollectRnaSeqMetrics`](https://gatk.broadinstitute.org/hc/en-us/articles/360037057492-CollectRnaSeqMetrics-Picard-) and ([`picard MarkDuplicates`](https://gatk.broadinstitute.org/hc/en-us/articles/360037052812-MarkDuplicates-Picard-))
- Collect metrics ([`picard CollectRnaSeqMetrics`](https://gatk.broadinstitute.org/hc/en-us/articles/360037057492-CollectRnaSeqMetrics-Picard-), [`picard CollectInsertSizeMetrics`](https://gatk.broadinstitute.org/hc/en-us/articles/360037055772-CollectInsertSizeMetrics-Picard-) and ([`picard MarkDuplicates`](https://gatk.broadinstitute.org/hc/en-us/articles/360037052812-MarkDuplicates-Picard-))
11. Present QC for raw reads ([`MultiQC`](http://multiqc.info/))
12. Compress bam files to cram with [samtools view](http://www.htslib.org/)

Expand Down
26 changes: 19 additions & 7 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ process {
]
}

withName: CONVERT2BED {
publishDir = [
path: { "${params.genomes_base}/convert2bed" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: CUSTOM_DUMPSOFTWAREVERSIONS {
publishDir = [
path: { "${params.outdir}/pipeline_info" },
Expand Down Expand Up @@ -94,13 +102,12 @@ process {
withName: FUSIONINSPECTOR {
ext.when = { !params.skip_vis }
ext.args = { params.fusioninspector_limitSjdbInsertNsj != 1000000 ? "--STAR_xtra_params \"--limitSjdbInsertNsj ${params.fusioninspector_limitSjdbInsertNsj}\"" : '' }

ext.args2 = '--extreme_sensitivity'
}

withName: FUSIONREPORT {
ext.when = { !params.skip_vis }
ext.args = "--export csv"
ext.args2 = { params.fusionreport_filter ? "--tool-cutoff 2" : "--tool-cutoff 1"}
publishDir = [
path: { "${params.outdir}/fusionreport/${meta.id}" },
mode: params.publish_dir_mode,
Expand Down Expand Up @@ -162,13 +169,18 @@ process {
]
}

withName: QUALIMAP_RNASEQ {
ext.when = { !params.skip_qc && !params.fusioninspector_only && (params.starfusion || params.all)}
withName: PICARD_COLLECTINSERTSIZEMETRICS {
ext.prefix = { "${meta.id}_collectinsertsize"}
}
publishDir = [
path: { "${params.outdir}/picard" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
]
}

withName: REFORMAT {
ext.args = "forcetrimright=75"
ext.args2 = "forcetrimleft=75"
withName: QUALIMAP_RNASEQ {
ext.when = { !params.skip_qc && !params.fusioninspector_only && (params.starfusion || params.all)}
}

withName: SAMPLESHEET_CHECK {
Expand Down
1 change: 1 addition & 0 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ Picard CollectRnaMetrics and picard MarkDuplicates share the same output directo
- `picard`
- `<sample>.MarkDuplicates.metrics.txt` - metrics from MarkDuplicates
- `<sample>_rna_metrics.txt` - metrics from CollectRnaMetrics
- `<sample>_insert_size_metrics.txt.txt` - metrics from CollectInsertSizeMetrics
- `<sample>.bam` - BAM file with marked duplicates

</details>
Expand Down
23 changes: 3 additions & 20 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -200,18 +197,6 @@ nextflow run nf-core/rnafusion \
--adapter_fastq <PATH/TO/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 \
--<tool1> --<tool2> ... \
--input <SAMPLE_SHEET.CSV> \
--genomes_base <PATH/TO/REFERENCES> \
--outdir <OUTPUT/PATH> \
--trim
```

#### Filter fusions detected by 2 or more tools

```bash
Expand All @@ -220,12 +205,10 @@ nextflow run nf-core/rnafusion \
--input <SAMPLE_SHEET.CSV> \
--genomes_base <PATH/TO/REFERENCES> \
--outdir <OUTPUT/PATH>
--fusioninspector_filter
--fusionreport_filter
--tools_cutoff <INT>
```

`--fusioninspector_filter` feed only fusions detected by 2 or more tools to fusioninspector for closer analysis (false by default).
`--fusionreport_filter` displays only fusions detected by 2 or more tools in fusionreport html index (true by default).
`--tools_cutoff INT` will discard fusions detected by less than INT tools both for display in fusionreport html index and to consider in fusioninspector.

#### Adding custom fusions to consider as well as the detected set: whitelist

Expand Down
13 changes: 9 additions & 4 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,24 @@
"git_sha": "cf8f9ace77aac01caa5c7cb92af5bbda7adb77bd",
"installed_by": ["modules"]
},
"gatk4/markduplicates": {
"branch": "master",
"git_sha": "2aa9c2981930687792ed861b0a5f9ff7bb568a7d",
"installed_by": ["modules"]
},
"multiqc": {
"branch": "master",
"git_sha": "a6e11ac655e744f7ebc724be669dd568ffdc0e80",
"installed_by": ["modules"]
},
"picard/collectwgsmetrics": {
"picard/collectinsertsizemetrics": {
"branch": "master",
"git_sha": "735e1e04e7e01751d2d6e97055bbdb6f70683cc1",
"git_sha": "240937a2a9c30298110753292be041188891f2cb",
"installed_by": ["modules"]
},
"picard/markduplicates": {
"picard/collectwgsmetrics": {
"branch": "master",
"git_sha": "2ee934606f1fdf7fc1cb05d6e8abc13bec8ab448",
"git_sha": "735e1e04e7e01751d2d6e97055bbdb6f70683cc1",
"installed_by": ["modules"]
},
"qualimap/rnaseq": {
Expand Down
3 changes: 2 additions & 1 deletion modules/local/fusioninspector/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ process FUSIONINSPECTOR {
def prefix = task.ext.prefix ?: "${meta.id}"
def fasta = meta.single_end ? "--left_fq ${reads[0]}" : "--left_fq ${reads[0]} --right_fq ${reads[1]}"
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
"""
FusionInspector \\
--fusions $fusion_list \\
Expand All @@ -29,7 +30,7 @@ process FUSIONINSPECTOR {
--CPU ${task.cpus} \\
-O . \\
--out_prefix $prefix \\
--vis $args
--vis $args $args2
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
5 changes: 3 additions & 2 deletions modules/local/fusionreport/detect/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ process FUSIONREPORT {

// Note: 2.7X indices incompatible with AWS iGenomes.
conda "bioconda::star=2.7.9a"
container "docker.io/clinicalgenomics/fusion-report:2.1.5p4"
container "docker.io/clinicalgenomics/fusion-report:2.1.5p5"


input:
tuple val(meta), path(reads), path(arriba_fusions), path(starfusion_fusions), path(fusioncatcher_fusions)
tuple val(meta2), path(fusionreport_ref)
val(tools_cutoff)

output:
path "versions.yml" , emit: versions
Expand All @@ -31,7 +32,7 @@ process FUSIONREPORT {
tools += params.fusioncatcher || params.all ? "--fusioncatcher ${fusioncatcher_fusions} " : ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
fusion_report run $meta.id . $fusionreport_ref $tools --allow-multiple-gene-symbols $args $args2
fusion_report run $meta.id . $fusionreport_ref $tools --allow-multiple-gene-symbols --tool-cutoff $tools_cutoff $args $args2
mv fusion_list.tsv ${prefix}.fusionreport.tsv
mv fusion_list_filtered.tsv ${prefix}.fusionreport_filtered.tsv
Expand Down
2 changes: 1 addition & 1 deletion modules/local/fusionreport/download/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ process FUSIONREPORT_DOWNLOAD {

// Note: 2.7X indices incompatible with AWS iGenomes.
conda "bioconda::star=2.7.9a"
container "docker.io/clinicalgenomics/fusion-report:2.1.5p4"
container "docker.io/clinicalgenomics/fusion-report:2.1.5p5"

input:
val(username)
Expand Down
53 changes: 0 additions & 53 deletions modules/local/reformat/main.nf

This file was deleted.

40 changes: 0 additions & 40 deletions modules/local/reformat/meta.yml

This file was deleted.

Loading

0 comments on commit 7482127

Please sign in to comment.