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

gffread: simplify extract cds process

parent cd5218a0
No related branches found
No related tags found
No related merge requests found
......@@ -54,16 +54,7 @@ process spliced_cds {
file_prefix = file_id
}
"""
gffread -x -M - -g ${fasta} ${gtf} | \
bioawk -c fastx '{ print \$name, \$seq }' | \
while read line; \
do \
name=\$(echo \$line | cut -f 1); \
echo \$line | cut -f 2 | \
awk -F "" '{ for (i = 3; i <= NF; i += 3) \
printf "%s%s", \$i, (i+3>NF?"\n":FS) }' | \
awk -v name="\$name" '{ print ">"name; print \$1 }'; \
done \
> ${file_prefix}.fasta
gffread -x -M - -g ${fasta} ${gtf} \
> ${file_prefix}.fasta
"""
}
\ 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