Output BAMS in all cases apart from transcriptome-source precomputed [CW-5911]

This commit is contained in:
Sarah Griffiths 2025-04-03 12:57:58 +00:00
parent 6f91cf59b1
commit 390739cf8a
3 changed files with 9 additions and 11 deletions

View File

@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- `all_gene_counts.tsv` contained the DE counts results.
- Reduced memory usage of the report workflow process.
- Output BAM alignments in all cases unless the workflow is run with `transcriptome_source` set to `precomputed`.
- The merged transcriptome generated for differential expression analysis now only contains the exons and not the full genomic sequence.
- Output the gene name annotated differential expression analysis count files only.
- Only use full length reads in the differential expression analysis.

12
main.nf
View File

@ -659,7 +659,7 @@ workflow pipeline {
results = Channel.empty()
// Define BAM output Directory
String publish_bams = "BAMS"
String publish_prefix_bams = "BAMS"
software_versions = getVersions()
workflow_params = getParams()
input_reads = reads.map{ meta, samples, index, stats -> [meta, samples]}
@ -680,7 +680,7 @@ workflow pipeline {
if (params.transcriptome_source != "precomputed"){
build_minimap_index(ref_genome)
log.info("Doing reference based transcript analysis")
assembly = reference_assembly(build_minimap_index.out.index, ref_genome, full_len_reads)
assembly = reference_assembly(build_minimap_index.out.index, ref_genome, full_len_reads, publish_prefix_bams)
assembly_stats = assembly.stats.map{ it -> it[1]}.collect()
@ -716,9 +716,6 @@ workflow pipeline {
merge_gff = merge_gff_bundles.out.gff.map{ it -> it[1]}.collect()
// Output BAMS in a dedicated directory
bam_results = assembly.bam.map{
sample_id, bam, bai -> [bam, bai]}.flatten().map{ [it, publish_bams] }
}
else{
gff_compare = OPTIONAL_FILE
@ -878,8 +875,8 @@ workflow pipeline {
| toSortedList
| map { list -> list.collect{
[
"$publish_bams/${it}_reads_aln_sorted.bam",
"$publish_bams/${it}_reads_aln_sorted.bam.bai"
"$publish_prefix_bams/${it}_reads_aln_sorted.bam",
"$publish_prefix_bams/${it}_reads_aln_sorted.bam.bai"
]
} }
| concat (igv_ref)
@ -898,7 +895,6 @@ workflow pipeline {
)
results = results.concat(igv_conf.map{ [it, null]})
results = results.concat(bam_results)
}

View File

@ -7,10 +7,10 @@ process map_reads{
label "isoforms"
cpus params.threads
memory "31 GB"
publishDir path: "${params.out_dir}/${publish_prefix_bams}", mode: 'copy', pattern: "${sample_id}_reads_aln_sorted.bam*", overwrite: true
input:
tuple val(sample_id), path (fastq_reads), path(index), path(reference)
val publish_prefix_bams
output:
tuple val(sample_id),
path("${sample_id}_reads_aln_sorted.bam"),
@ -51,8 +51,9 @@ workflow reference_assembly {
index
reference
fastq_reads
publish_prefix_bams
main:
map_reads(fastq_reads.combine(index).combine(reference))
map_reads(fastq_reads.combine(index).combine(reference), publish_prefix_bams)
emit:
bam = map_reads.out.bam
stats = map_reads.out.stats