Skip to content

Commit 549d3b3

Browse files
committed
new version of bambu added into module, not tested yet within worklfow but tested independently, haven't run full test yet, added gzipped symbolic files for references
1 parent 2b88ddb commit 549d3b3

File tree

4 files changed

+23
-30
lines changed

4 files changed

+23
-30
lines changed

bin/run_bambu.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
################################################
1919
################################################
2020
library(bambu)
21+
library(GenomeInfoDb)
2122

2223
################################################
2324
################################################

conf/test_full.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ validation {
8888
help {
8989
enabled = true
9090
beforeText = "Welcome to LongTranscriptomics, I see you are seeking help."
91-
afterText = "Farewell, hopefully this was helpful. "Please cite the pipeline owners when using this pipeline."
91+
afterText = "Farewell, hopefully this was helpful. Please cite the pipeline owners when using this pipeline."
9292
command = "nextflow run . -profile <profile> --outdir <outdir>"
9393
}
9494
}

modules/local/bambu/bambu/main.nf

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ process BAMBU {
33
label 'process_medium'
44
conda "conda-forge::r-base=4.0.3 bioconda::bioconductor-bambu=3.0.8 bioconda::bioconductor-bsgenome=1.66.0"
55
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
6-
'https://depot.galaxyproject.org/singularity/bioconductor-bambu:3.0.8--r42hc247a5b_0' :
7-
'docker://quay.io/biocontainers/bioconductor-bambu:3.0.8--r42hc247a5b_0' }"
6+
'number25/bambu:3.12.0' :
7+
'number25/bambu:3.12.0' }"
8+
9+
// 'docker://quay.io/biocontainers/bioconductor-bambu:3.0.8--r42hc247a5b_0' }"
10+
// 'docker://quay.io/biocontainers/bioconductor-bambu:3.0.8--r42hc247a5b_0' }"
811
//containerOptions = '-u $(id -u):$(id -g)'
912
//'number25/bambu:3.8.0':
1013
//'docker://quay.io/number_25/bambu:latest' }"
@@ -18,23 +21,14 @@ process BAMBU {
1821
tuple val(meta), path(bam)
1922

2023
output:
21-
path "counts_gene.txt" , emit: ch_gene_counts
22-
path "counts_transcript.txt" , emit: ch_transcript_counts
23-
tuple val(meta) , path("extended_annotations.gtf") , emit: bambu_extended_gtf
24-
//path "allTranscriptModels.gtf" , emit: bambu_all_gtf
25-
//path "supportedTranscriptModels.gtf" , emit: bambu_supported_gtf
26-
//path "novelTranscripts.gtf" , emit: bambu_novel_only_gtf
27-
path "versions.yml" , emit: versions
24+
//path "counts_gene.txt" , emit: ch_gene_counts
25+
//path "counts_transcript.txt" , emit: ch_transcript_counts
26+
path "extended_annotations.gtf" , emit: bambu_extended_gtf
27+
path "allTranscriptModels.gtf" , emit: bambu_all_gtf
28+
path "novelTranscripts.gtf" , emit: bambu_novel_only_gtf
29+
tuple val(meta), path("supportedTranscriptModels.gtf") , emit: bambu_supported_gtf
30+
path "versions.yml" , emit: versions
2831

29-
/*
30-
tuple val(meta), path("extendedAnnotations.gtf"), emit: bambu_extended_gtf
31-
//tuple val(meta), path("*_counts_gene.txt") , emit: bambu_gene_counts
32-
//tuple val(meta), path("*_counts_transcript.txt") , emit: bambu_transcript_counts
33-
tuple val(meta), path("allTranscriptModels.gtf"), emit: bambu_transcript_models
34-
tuple val(meta), path("supportedTranscriptModels.gtf"), emit: bambu_supported_transcript_models
35-
tuple val(meta), path("novelTranscripts.gtf"), emit: bambu_novel_transcript_models
36-
path "versions.yml", emit: versions
37-
*/
3832
when:
3933
task.ext.when == null || task.ext.when
4034
//def prefix = task.ext.prefix ?: "${meta.id}_${meta.replicate}_bambu"

workflows/directrna.nf

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -355,13 +355,11 @@ workflow DIRECTRNA{
355355
// BAMBU
356356
if (!params.skip_bambu) {
357357
BAMBU( ch_genome_fasta, ch_annotation_gtf, ch_bam )
358-
ch_bambu_extended_gtf = BAMBU.out.bambu_extended_gtf
359-
//ch_bambu_supported_gtf = BAMBU.out.bambu_supported_gtf
358+
ch_bambu_supported_gtf = BAMBU.out.bambu_supported_gtf
360359
ch_versions = ch_versions.mix(BAMBU.out.versions.first())
361-
// MIX genome fasta with fasta index as this will improve GFFREADs speed
362-
//GFFREAD_GETFASTA_BAMBU( ch_bambu_extended_gtf, ch_genome_fasta_with_index, 'bambu' )
363-
//ch_bambu_transcripts = GFFREAD_GETFASTA_BAMBU.out.transcripts_fa
364-
//ch_versions = ch_versions.mix(GFFREAD_GETFASTA_BAMBU.out.versions.first())
360+
GFFREAD_GETFASTA_BAMBU( ch_bambu_supported_gtf, ch_genome_fasta_with_index, 'bambu' )
361+
ch_bambu_transcripts = GFFREAD_GETFASTA_BAMBU.out.transcripts_fa
362+
ch_versions = ch_versions.mix(GFFREAD_GETFASTA_BAMBU.out.versions.first())
365363
}
366364

367365
// ISOQUANT
@@ -406,11 +404,11 @@ workflow DIRECTRNA{
406404
ch_multiqc_files = ch_multiqc_files.mix(ch_flair_gffcompare_stats.ifEmpty([]))
407405
}
408406
// TODO - this version of bambu currently only outputs the "extended annotation", which is the reference annotation + the detected transcripts in the sample, so there's no point to doing gffcompare as sensitivity and accuracy are 100%
409-
//if (!params.skip_bambu) {
410-
// GFFCOMPARE_BAMBU( ch_genome_fasta_with_index, ch_bambu_extended_gtf, ch_annotation_gtf, 'bambu' )
411-
// ch_bambu_gffcompare_stats = GFFCOMPARE_BAMBU.out.gffcompare_stats.collect{it[1]}.flatten()
412-
// ch_multiqc_files = ch_multiqc_files.mix(ch_bambu_gffcompare_stats.ifEmpty([]))
413-
//}
407+
if (!params.skip_bambu) {
408+
GFFCOMPARE_BAMBU( ch_genome_fasta_with_index, ch_bambu_supported_gtf, ch_annotation_gtf, 'bambu' )
409+
ch_bambu_gffcompare_stats = GFFCOMPARE_BAMBU.out.gffcompare_stats.collect{it[1]}.flatten()
410+
ch_multiqc_files = ch_multiqc_files.mix(ch_bambu_gffcompare_stats.ifEmpty([]))
411+
}
414412
if (!params.skip_isoquant) {
415413
GFFCOMPARE_ISOQUANT(ch_genome_fasta_with_index, ch_isoquant_gtf, ch_annotation_gtf, 'isoquant' )
416414
ch_isoquant_gffcompare_stats = GFFCOMPARE_ISOQUANT.out.gffcompare_stats.collect{it[1]}.flatten()

0 commit comments

Comments
 (0)