Skip to content
Snippets Groups Projects
Verified Commit 789f6926 authored by Laurent Modolo's avatar Laurent Modolo
Browse files

alntools: add bam2ec process

parent 6efd55d6
No related branches found
No related tags found
No related merge requests found
version = "dd69682"
container_url = "lbmc/alntools:${version}"
process bam2ec {
container = "${container_url}"
label "big_mem_mono_cpus"
tag "$file_id"
input:
tuple val(file_id), path(bam)
tuple val(gtf_id), path(gtf)
output:
tuple val(file_id), path("${bam.simpleName}.bin"), emit: bin
tuple val(gtf_id), path("${gtf.simpleName}_transcripts_lengths.tsv"), emit: tsv
script:
"""
awk -F"\t" '
$3=="exon"
{
ID=substr($9, length($9)-16, 15);
L[ID]+=$5-$4+1
}
END{
for(i in L)
{print i"\t"L[i]}
}
' ${gtf} ${gtf.simpleName}_transcripts_lengths.tsv
alntools bam2ec -t ${gtf.simpleName}_transcripts_lengths.tsv -c 8 ${bam} ${bam.simpleName}.bin
"""
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment