File: rast2sqn.sh

package info (click to toggle)
ncbi-tools6 6.1.20170106%2Bdfsg2-6
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 468,504 kB
  • sloc: ansic: 1,474,210; pascal: 6,740; cpp: 6,248; xml: 3,390; sh: 2,139; perl: 1,084; csh: 508; makefile: 437; ruby: 93; lisp: 81; javascript: 16
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