Skip to content

Commit

Permalink
Merge pull request #395 from nf-core/update_filenames
Browse files Browse the repository at this point in the history
Update filenames
  • Loading branch information
rannick authored Sep 13, 2023
2 parents 2bfdb59 + 5ee433c commit 6282473
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 39 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Use institutional configs by default [#381](https://github.com/nf-core/rnafusion/pull/381)
- Remove redundant indexing in starfusion and qc workflows [#387](https://github.com/nf-core/rnafusion/pull/387)
- Output bai files in same directory as bam files [#387](https://github.com/nf-core/rnafusion/pull/387)
- Update and review documentation [#396](https://github.com/nf-core/rnafusion/pull/396)
- Update picard container for `PICARD_COLLECTRNASEQMETRICS` to 3.0.0 [#395](https://github.com/nf-core/rnafusion/pull/395)

### Fixed

Expand All @@ -23,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

- `samtools sort` and `samtools index` for `arriba` workflow were dispensable and were removed [#395](https://github.com/nf-core/rnafusion/pull/395)
- Removed trimmed fastqc report from multiqc [#394](https://github.com/nf-core/rnafusion/pull/394)

## v2.3.0 = [2022/04/24]
Expand All @@ -40,6 +43,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `Arriba` visualisation now runs for FusionInspector (combined tools) results, not only `Arriba` results
- Updated metro map with trimming options and placed `Arriba` visualisation after `FusionInspector`
- Exit with error when using squid in combination with any ensembl version different from 102
- Renamed output files [#395](https://github.com/nf-core/rnafusion/pull/395)
- `Arriba` visualisation pdf from meta.id to meta.id_combined_fusions_arriba_visualisation
- cram file from output bam of `STAR_FOR_ARRIBA`: meta.id to meta.id_star_for_arriba
- cram file from output bam of `STAR_FOR_STARFUSION`: meta.id to meta.id.star_for_starfusion.Aligned.sortedByCoord.out
- `fusion-report` index.html file to meta.id_fusionreport_index.html
- meta.id.vcf output from `MEGAFUSION` to meta.id_fusion_data.vcf

### Fixed

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

withName: ARRIBA_VISUALISATION {
ext.when = { !params.fusioninspector_only && (params.starfusion || params.all) }
ext.when = { !params.fusioninspector_only && (params.starfusion || params.all) }
ext.prefix = { "${meta.id}_combined_fusions_arriba_visualisation" }
publishDir = [
path: { "${params.outdir}/arriba_visualisation" },
mode: params.publish_dir_mode,
Expand Down Expand Up @@ -142,6 +143,7 @@ process {
}
withName: MEGAFUSION {
ext.when = {!params.fusioninspector_only}
ext.prefix = { "${meta.id}_fusion_data" }
}


Expand Down Expand Up @@ -185,14 +187,6 @@ process {
]
}

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

withName: SAMTOOLS_INDEX_FOR_STARFUSION {
publishDir = [
path: { "${params.outdir}/star_for_starfusion" },
Expand All @@ -201,23 +195,14 @@ process {
]
}

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

withName: SAMTOOLS_SORT_FOR_ARRIBA {
ext.prefix = { "${meta.id}_sorted" }
publishDir = [
path: { "${params.outdir}/samtools_sort_for_arriba" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: SAMTOOLS_SORT_FOR_SQUID_CHIMERIC {
ext.prefix = { "${meta.id}_chimeric_sorted" }
publishDir = [
Expand All @@ -229,6 +214,7 @@ process {

withName: SAMTOOLS_VIEW_FOR_ARRIBA {
ext.args = { "--output-fmt cram" }
ext.prefix = { "${meta.id}_star_for_arriba" }
publishDir = [
path: { "${params.outdir}/cram_arriba" },
mode: params.publish_dir_mode,
Expand Down Expand Up @@ -267,6 +253,7 @@ process {

withName: SAMTOOLS_VIEW_FOR_STARFUSION {
ext.args = { "--output-fmt cram" }
ext.prefix = { "${meta.id}.star_for_starfusion.Aligned.sortedByCoord.out" }
publishDir = [
path: { "${params.outdir}/cram_starfusion" },
mode: params.publish_dir_mode,
Expand Down
4 changes: 2 additions & 2 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"fastqc": {
"branch": "master",
"git_sha": "bd8092b67b5103bdd52e300f75889442275c3117",
"git_sha": "9a4517e720bc812e95b56d23d15a1653b6db4f53",
"installed_by": ["modules"]
},
"gatk4/bedtointervallist": {
Expand Down Expand Up @@ -62,7 +62,7 @@
},
"picard/markduplicates": {
"branch": "master",
"git_sha": "735e1e04e7e01751d2d6e97055bbdb6f70683cc1",
"git_sha": "2ee934606f1fdf7fc1cb05d6e8abc13bec8ab448",
"installed_by": ["modules"]
},
"qualimap/rnaseq": {
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 @@ -15,7 +15,7 @@ process FUSIONREPORT {
path "versions.yml" , emit: versions
tuple val(meta), path("*fusionreport.tsv") , emit: fusion_list
tuple val(meta), path("*fusionreport_filtered.tsv") , emit: fusion_list_filtered
tuple val(meta), path("index.html") , emit: report
tuple val(meta), path("*index.html") , emit: report
tuple val(meta), path("*_*.html") , optional:true, emit: html
tuple val(meta), path("*.csv") , optional:true, emit: csv
tuple val(meta), path("*.json") , optional:true, emit: json
Expand All @@ -37,6 +37,7 @@ process FUSIONREPORT {
mv fusion_list.tsv ${prefix}.fusionreport.tsv
mv fusion_list_filtered.tsv ${prefix}.fusionreport_filtered.tsv
mv index.html ${prefix}_fusionreport_index.html
[ ! -f fusions.csv ] || mv fusions.csv ${prefix}.fusions.csv
[ ! -f fusions.json ] || mv fusions.json ${prefix}.fusions.json
Expand All @@ -52,7 +53,7 @@ process FUSIONREPORT {
"""
touch ${prefix}.fusionreport_filtered.tsv
touch ${prefix}.fusionreport.tsv
touch index.html
touch ${prefix}_fusionreport_index.html
touch AAA_BBB.html
touch ${prefix}.fusions.csv
touch ${prefix}.fusions.json
Expand Down
6 changes: 3 additions & 3 deletions modules/local/picard/collectrnaseqmetrics/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ process PICARD_COLLECTRNASEQMETRICS {
tag "$meta.id"
label 'process_medium'

conda "bioconda::picard=2.27.4"
conda "bioconda::picard=3.0.0 r::r-base"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/picard:2.27.4--hdfd78af_0' :
'quay.io/biocontainers/picard:2.27.4--hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/picard:3.0.0--hdfd78af_1' :
'biocontainers/picard:3.0.0--hdfd78af_1' }"

input:
tuple val(meta), path(bam), path(bai)
Expand Down
32 changes: 32 additions & 0 deletions modules/nf-core/fastqc/tests/main.nf.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions modules/nf-core/picard/markduplicates/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 2 additions & 13 deletions subworkflows/local/arriba_workflow.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
include { ARRIBA } from '../../modules/nf-core/arriba/main'
include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_FOR_ARRIBA} from '../../modules/nf-core/samtools/index/main'
include { SAMTOOLS_SORT as SAMTOOLS_SORT_FOR_ARRIBA } from '../../modules/nf-core/samtools/sort/main'
include { SAMTOOLS_VIEW as SAMTOOLS_VIEW_FOR_ARRIBA} from '../../modules/nf-core/samtools/view/main'
include { STAR_ALIGN as STAR_FOR_ARRIBA } from '../../modules/nf-core/star/align/main'

Expand All @@ -23,16 +21,7 @@ workflow ARRIBA_WORKFLOW {
STAR_FOR_ARRIBA( reads, ch_starindex_ref, ch_gtf, params.star_ignore_sjdbgtf, '', params.seq_center ?: '')
ch_versions = ch_versions.mix(STAR_FOR_ARRIBA.out.versions)

SAMTOOLS_SORT_FOR_ARRIBA(STAR_FOR_ARRIBA.out.bam)
ch_versions = ch_versions.mix(SAMTOOLS_SORT_FOR_ARRIBA.out.versions)

SAMTOOLS_INDEX_FOR_ARRIBA(SAMTOOLS_SORT_FOR_ARRIBA.out.bam)
ch_versions = ch_versions.mix(SAMTOOLS_INDEX_FOR_ARRIBA.out.versions)

bam_indexed = SAMTOOLS_SORT_FOR_ARRIBA.out.bam.join(SAMTOOLS_INDEX_FOR_ARRIBA.out.bai)

if (params.arriba_fusions) {
// [meta, reads], fusions -> [meta, fusions]
ch_arriba_fusions = reads.combine( Channel.value( file( params.arriba_fusions, checkIfExists: true ) ) )
.map { meta, reads, fusions -> [ meta, fusions ] }
ch_arriba_fusion_fail = ch_dummy_file
Expand All @@ -45,9 +34,9 @@ workflow ARRIBA_WORKFLOW {
}

if (params.cram.contains('arriba') ){
SAMTOOLS_VIEW_FOR_ARRIBA(bam_indexed, ch_fasta, [])
ch_versions = ch_versions.mix(SAMTOOLS_VIEW_FOR_ARRIBA.out.versions )

SAMTOOLS_VIEW_FOR_ARRIBA(STAR_FOR_ARRIBA.out.bam.map { meta, bam -> [ meta, bam, [] ] }, ch_fasta, [])
ch_versions = ch_versions.mix(SAMTOOLS_VIEW_FOR_ARRIBA.out.versions )
}


Expand Down

0 comments on commit 6282473

Please sign in to comment.