From 2d7006fd6c4733955d92d032144e3acc67c16669 Mon Sep 17 00:00:00 2001 From: alain viari Date: Sun, 8 Nov 2015 19:53:19 +0100 Subject: [PATCH] corrected Annotation reordering for CDS Former-commit-id: c59ad42ebdd9772fbed5539388499840b57e3595 Former-commit-id: 5de4848d5d3b8e0d521120b7db92e145d9a6727f --- org-annotate.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/org-annotate.sh b/org-annotate.sh index e049753..5417d8c 100755 --- a/org-annotate.sh +++ b/org-annotate.sh @@ -55,17 +55,17 @@ pushTmpDir ORG.organnot loginfo "Done." loginfo "Ordering annotations..." - awk '/^.....[^ ]/ { \ + awk '/^.....(misc|repeat|rRNA|tRNA|gene)/ { \ match($3,"[0-9][0-9]*"); \ pos=substr($3,RSTART,RLENGTH)*1000 + 1; \ - print pos,$0} \ - /^..... / { \ - pos++; \ + print pos,$0; \ + next} \ + { pos++; \ print pos,$0}' "${RESULTS}.annot" | \ - sort -nk1 | \ + sort -nk1 |\ awk '{ \ match($0,"^[0-9]* ");\ - line=substr($0,RLENGTH+1,100000);\ + line=substr($0,RLENGTH+1);\ print line}' loginfo "Done."