diff --git a/workflow/scripts/make_tss.sh b/workflow/scripts/make_tss.sh new file mode 100644 index 0000000000000000000000000000000000000000..e1aed9a2f55cc9fd2475a70055b02511698ef23f --- /dev/null +++ b/workflow/scripts/make_tss.sh @@ -0,0 +1,10 @@ +#!/bin/bash + + +cat gencode.gtf | +grep -P '\tgene\t' | +grep 'protein_coding' | +grep -v 'level 3' | +awk -F '[\t|\"]' '{ print $1"\t"$4"\t"$5"\t"$10"\t0\t"$7 }' | +awk -F '\t' 'BEGIN{ OFS="\t" } { if ($6=="+") { $3=$2-1; $2=$2-2 } else { $2=$3; $3=$3+1 } print }' | +sort -k1,1 -k2,2n > gencode.tss