Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update filenames #395

Merged
merged 18 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from 11 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: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,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 +41,11 @@ 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
- Renaming [#395](https://github.com/nf-core/rnafusion/pull/395)
rannick marked this conversation as resolved.
Show resolved Hide resolved
- `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

### Fixed

Expand Down
24 changes: 5 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 @@ -185,14 +186,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 +194,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 +213,7 @@ process {

withName: SAMTOOLS_VIEW_FOR_ARRIBA {
ext.args = { "--output-fmt cram" }
ext.prefix = { "${meta.id}_star_for_arriba" }
rannick marked this conversation as resolved.
Show resolved Hide resolved
publishDir = [
path: { "${params.outdir}/cram_arriba" },
mode: params.publish_dir_mode,
Expand Down Expand Up @@ -267,6 +252,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
3 changes: 2 additions & 1 deletion 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 Down
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