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

alntools: update transcript lengths computation

parent f38f822f
No related branches found
No related tags found
No related merge requests found
...@@ -21,17 +21,16 @@ process bam2ec { ...@@ -21,17 +21,16 @@ process bam2ec {
script: script:
""" """
awk -F"\t" ' awk -F"[\t;]" '
\$3=="exon" \$3=="exon" {
{ ID=gensub(/transcript_id \"(.*)\"/, "\\1", "g", \$11);
ID=substr(\$9, length(\$9)-16, 15); LEN[ID]+=\$5-\$4+1;
L[ID]+=\$5-\$4+1
} }
END{ END{
for(i in L) for(i in LEN)
{print i"\t"L[i]} {print i"\t"LEN[i]}
} }
' ${gtf} ${gtf.simpleName}_transcripts_lengths.tsv ' ${gtf} > ${gtf.simpleName}_transcripts_lengths.tsv
alntools bam2ec ${params.bam2sec} -t ${gtf.simpleName}_transcripts_lengths.tsv -c 8 ${bam} ${bam.simpleName}.bin alntools bam2ec ${params.bam2sec} -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