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

Fixes #65 #67

Closed
wants to merge 2 commits into from
Closed
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
18 changes: 15 additions & 3 deletions workflows/riboseq/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ def filterGtf =
// SUBWORKFLOW: Consisting of a mix of local and nf-core/modules
//
include { BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS } from '../../subworkflows/nf-core/bam_dedup_stats_samtools_umitools/main'
include { BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS as BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME } from '../../subworkflows/nf-core/bam_dedup_stats_samtools_umitools/main'
include { BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS as BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME } from '../../subworkflows/nf-core/bam_dedup_stats_samtools_umitools/main'
include { PREPROCESS_RNASEQ } from '../../subworkflows/nf-core/preprocess_rnaseq'
include { FASTQ_ALIGN_STAR } from '../../subworkflows/nf-core/fastq_align_star'
include { BAM_SORT_STATS_SAMTOOLS } from '../../subworkflows/nf-core/bam_sort_stats_samtools'

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -178,7 +181,8 @@ workflow RIBOSEQ {

ch_genome_bam = FASTQ_ALIGN_STAR.out.bam
ch_genome_bam_index = FASTQ_ALIGN_STAR.out.bai
ch_transcriptome_bam = FASTQ_ALIGN_STAR.out.orig_bam_transcript
ch_transcriptome_bam = FASTQ_ALIGN_STAR.out.bam_transcript
ch_transcriptome_bai = FASTQ_ALIGN_STAR.out.bai_transcript
ch_versions = ch_versions.mix(FASTQ_ALIGN_STAR.out.versions)

ch_multiqc_files = ch_multiqc_files
Expand Down Expand Up @@ -207,13 +211,21 @@ workflow RIBOSEQ {
.mix(BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME.out.flagstat.collect{it[1]})
.mix(BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME.out.idxstats.collect{it[1]})

// Deduplicate transcriptome BAM file before downstream analysis

BAM_SORT_STATS_SAMTOOLS (
ch_transcriptome_bam,
ch_fasta.map { [ [:], it ] }
)
ch_transcriptome_bam = BAM_SORT_STATS_SAMTOOLS.out.bam
ch_transcriptome_bai = BAM_SORT_STATS_SAMTOOLS.out.bai
Comment on lines +219 to +220
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ch_transcriptome_bam = BAM_SORT_STATS_SAMTOOLS.out.bam
ch_transcriptome_bai = BAM_SORT_STATS_SAMTOOLS.out.bai
ch_transcriptome_sorted_bam = BAM_SORT_STATS_SAMTOOLS.out.bam
ch_transcriptome_sorted_bai = BAM_SORT_STATS_SAMTOOLS.out.bai

rnaseq does this (also rename the input to the function below), so that the unsorted bam is not over-written. Maybe try this first?


// Deduplicate transcriptome BAM file before read counting with Salmon
BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME (
ch_transcriptome_bam.join(ch_transcriptome_bai, by: [0]),
params.umitools_dedup_stats
)
ch_transcriptome_bam = BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME.out.bam
ch_transcriptome_bam = BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME.out.bam
ch_transcriptome_bai = BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME.out.bai

ch_multiqc_files = ch_multiqc_files
.mix(BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME.out.stats.collect{it[1]})
Expand Down