File: gb.awk

package info (click to toggle)
acedb 4.9.39+dfsg.02-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 33,796 kB
  • sloc: ansic: 256,989; perl: 2,803; cpp: 2,534; csh: 1,712; python: 862; sh: 658; makefile: 298; awk: 249; lex: 225; yacc: 221
file content (16 lines) | stat: -rw-r--r-- 599 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File wscripts/gb.awk, postprocessing commands used by blast_search script
# $Id: gb.awk,v 1.1 1997/03/28 12:59:54 mieg Exp $

BEGIN { state = 0 ;}
/^ACCESSION/ {seq = "GB:"$2 ; printf("\nSequence %s\nDatabase GenBank %s\n",seq,$2); next;}
/^TITLE/ {printf("Title \"%s\n", substr($0,6)) ; next ;}
/^\/\// {state = 0 ; printf("\n") ; next; }

/^ORIGIN/ {printf ("DNA %s\n\n",seq) ; state = 2 ; next ;}
{ if (state == 2) { printf("DNA %s\n", seq) ; state = 3 ; next ; }
  if (state == 3) 
    { pp = $0 ; gsub(/[0-9]/,"",pp) ; gsub(/ /,"",pp) ; gsub(/\//,"",pp) ;
      printf("%s\n", pp) ;
    }
}