Skip to content

Commit

Permalink
feat(grohmm): Add Native MultiQC support
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundmiller committed Sep 27, 2024
1 parent bba68b5 commit e8a0e46
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions bin/transcriptcalling_grohmm.R
Original file line number Diff line number Diff line change
Expand Up @@ -181,19 +181,21 @@ b_plus <- breakTranscriptsOnGenes(tx_hmm, kg_consensus, strand = "+")
b_minus <- breakTranscriptsOnGenes(tx_hmm, kg_consensus, strand = "-")
tx_broken <- c(b_plus, b_minus)
tx_final <- combineTranscripts(tx_broken, kg_consensus)
td_final <- getTxDensity(tx_final, con_expressed, mc.cores = args$cores)
export(
tx_final,
con = paste(args$outprefix, ".final.transcripts.bed", sep = "")
)
capture.output(td_final, file = paste0(args$outprefix, ".tdFinal.txt"))
# 1. Output plot
jpeg(file = paste0(args$outprefix, ".tdplot_mqc.jpg"))
# 2. Create the plot
# 2. Create the plot and capture data
td_final <- getTxDensity(tx_final, con_expressed, mc.cores = args$cores)
# 3. Close the file
dev.off()
capture.output(td_final, file = paste0(args$outprefix, ".tdFinal.txt"))

# Write the data used in the plot to a CSV file
data_to_write <- data.frame(x = td_final$x, profile = td_final$profile)
write.csv(data_to_write, file = paste0(args$outprefix, ".tdFinal_mqc.csv"), row.names = FALSE)

########################
## CITE PACKAGES USED ##
Expand Down
2 changes: 1 addition & 1 deletion modules/local/grohmm/parametertuning/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ dependencies:
# NOTE Can't use the official package because of
# https://github.com/dankoc/groHMM/issues/2
# - bioconda::bioconductor-grohmm=1.28.0
- bioinfoorphanage-grohmm=1.36.1
- bioinfoorphanage-grohmm=1.37.0
2 changes: 1 addition & 1 deletion modules/local/grohmm/transcriptcalling/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ dependencies:
# NOTE Can't use the official package because of
# https://github.com/dankoc/groHMM/issues/2
# - bioconda::bioconductor-grohmm=1.28.0
- bioinfoorphanage-grohmm=1.36.1
- bioinfoorphanage-grohmm=1.37.0
1 change: 1 addition & 0 deletions modules/local/grohmm/transcriptcalling/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ process GROHMM_TRANSCRIPTCALLING {
tuple val(meta), path("*.transcripts.bed"), emit: transcripts_bed
tuple val(meta), path("*.tdFinal.txt") , emit: td
tuple val(meta), path("*.tdplot_mqc.jpg") , emit: td_plot
tuple val(meta), path("*.tdFinal_mqc.csv") , emit: mqc_csv
path "versions.yml" , emit: versions

when:
Expand Down

0 comments on commit e8a0e46

Please sign in to comment.