File: rast2sqn.sh

package info (click to toggle)
ncbi-tools6 6.1.20120620-8
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 241,628 kB
  • ctags: 101,236
  • sloc: ansic: 1,431,713; cpp: 6,248; pascal: 3,949; xml: 3,390; sh: 3,090; perl: 1,077; csh: 488; makefile: 449; ruby: 93; lisp: 81
file content (26 lines) | stat: -rwxr-xr-x 606 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /bin/sh

# usage ./rast2sqn.sh template filename locus_tag_prefix product_id_prefix

PATH=$PATH:.
export PATH

x=`dirname "$2"`/`basename "$2" ".gb"`

gbf2tbl.pl "$x".gb

mv "$x".tbl "$x".tmp

tblfix.pl -product_to_codon_recognized < "$x".tmp | \
tblfix.pl -revcomp_codon_recognized | \
tblfix.pl -split_compound_product | \
tblfix.pl -product_to_tc_number | \
tblfix.pl -product_to_ec_number | \
tblfix.pl -clean_rrna_product | \
tblfix.pl -create_locus_tag $3 | \
tblfix.pl -create_protein_id $4 > "$x".tbl

rm "$x".tmp

tbl2asn -t $1 -i "$x".fsa -U -a s6 -j "[gcode=11]" -R -T -c f -V v -Z "$x".dsc