Skip to content

Commit

Permalink
update bambu version v2.0.6 to v3.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurore-B committed Jul 28, 2023
1 parent 9fc18a5 commit 143ba94
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions bin/filter_gtf_ndr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python3
#! /usr/bin/env python3
from typing import Set
from GTF import GTF

Expand Down Expand Up @@ -39,7 +39,7 @@ def filter_count_matrix(file, transcripts, wr):
print(next(file), file=wr)
for line in file:
line_splitted = line.split("\t")
if line_splitted[0].startswith("tx.") and line_splitted[0] not in transcripts:
if line_splitted[0].startswith("BambuTx") and line_splitted[0] not in transcripts:
continue
print(line.rstrip(), file=wr)

Expand Down
8 changes: 4 additions & 4 deletions bin/qc_gtf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python3
#! /usr/bin/env python3
from GTF import GTF


Expand Down Expand Up @@ -55,15 +55,15 @@ def qc_gtf(gtf, gene_counts, ref):

g_id = gene["gene_id"]
g_biotype = gene["gene_biotype"]
g_status = "novel" if g_id.startswith("gene.") else "known"
g_status = "novel" if g_id.startswith(('BambuGene','unstranded.Gene')) else "known"
g_count = gene_counts[g_id]["counts"] # Counts in all samples
g_samples = gene_counts[g_id]["validates"] # Found in x samples
g_nb_tx = len(gene.transcripts) # Number of isoforms

# Compute genomic extension with start/end in ref
ext_5 = 0
ext_3 = 0
if not g_id.startswith("gene."):
if not g_id.startswith(('BambuGene','unstranded.Gene')):
if gene.strand == "+":
ext_5 = ref_start_end[gene["gene_id"]]["start"] - gene.start
ext_3 = gene.end - ref_start_end[gene["gene_id"]]["end"]
Expand All @@ -82,7 +82,7 @@ def qc_gtf(gtf, gene_counts, ref):
for transcript in gene.transcripts:
tx_id = transcript["transcript_id"]
tx_biotype = transcript["transcript_biotype"]
tx_status = "novel" if tx_id.startswith("tx.") else "known"
tx_status = "novel" if tx_id.startswith("BambuTx") else "known"
tx_nb_exons = len(transcript.exons)
tx_length = sum([len(exon) for exon in transcript.exons])

Expand Down
8 changes: 4 additions & 4 deletions modules/bambu/bambu.nf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
process BAMBU {
conda (params.enable_conda ? "bioconda::bioconductor-bambu=2.0.6" : null)
container "${ workflow.containerEngine == 'singularity' ?
'https://depot.galaxyproject.org/singularity/bioconductor-bambu:2.0.6--r41h619a076_0' :
'quay.io/biocontainers/bioconductor-bambu:2.0.6--r41h619a076_0' }"
conda "conda-forge::r-base=4.0.3 bioconda::bioconductor-bambu=3.0.8 bioconda::bioconductor-bsgenome=1.66.0"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/bioconductor-bambu:3.0.8--r42hc247a5b_0' :
'quay.io/biocontainers/bioconductor-bambu:3.0.8--r42hc247a5b_0' }"
publishDir "$params.outdir/bambu", mode: 'copy'
cpus params.maxCpu
memory params.maxMemory
Expand Down
6 changes: 3 additions & 3 deletions modules/bambu/split.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ process BAMBU_SPLIT_RESULTS {

shell:
'''
grep "tx\\." !{extended_annotation} | awk '$3=="exon"' > novel.gtf
grep "gene\\." novel.gtf > novel_genes.gtf
grep -v "gene\\." novel.gtf > novel_isoforms.gtf
grep "BambuTx" !{extended_annotation} | awk '$3=="exon"' > novel.gtf
grep -e "BambuGene" -e "unstranded.Gene" novel.gtf > novel_genes.gtf
grep -v -e "BambuGene" -e "unstranded.Gene" novel.gtf > novel_isoforms.gtf
'''
}

0 comments on commit 143ba94

Please sign in to comment.