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

gffread: add awk cmd to remove duplicated transcript

parent d62c64d2
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,7 @@ process gffread {
file_prefix = file_id
}
"""
gffread ${gtf} -g ${fasta} -M -x ${file_prefix}.fasta
gffread ${gtf} -g ${fasta} -M -x dup_${file_prefix}.fasta
awk 'BEGIN {i = 1;} { if (\$1 ~ /^>/) { tmp = h[i]; h[i] = \$1; } else if (!a[\$1]) { s[i] = \$1; a[\$1] = "1"; i++; } else { h[i] = tmp; } } END { for (j = 1; j < i; j++) { print h[j]; print s[j]; } }' < dup_${file_prefix}.fasta > ${file_prefix}.fasta
"""
}
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