Files
annotate/detectors/cds/tools/lib/embl.tofasta.awk
alain viari e4d6a8484d cds/tools/chlorodb added
Former-commit-id: 0579e878a69b7c285ca71870e9ca5730649a2fda
Former-commit-id: 7cced5b488441d87bf070a9a444317db0e048880
2015-11-13 17:41:18 +01:00

37 lines
335 B
Awk

#
# get fasta sequence from embl
#
/^ID / {
locus = $2
gsub(";", "", locus)
next
}
/^SQ / {
inseq = 1
nln = 0
delete seq
next
}
/^\/\// {
inseq = 0
print ">" locus
for (i = 1 ; i <= nln ; i++)
print seq[i]
next
}
inseq {
s = $0
gsub(" ", "", s)
gsub("[0-9]+", "", s)
seq[++nln] = s
next
}