How To Remove All Hypothetical Protein From Genbank File
1
1
Entering edit mode
7.8 years ago
HG ★ 1.1k

Hi everyone after annotation one of sample genome i want to remove all hypothetical protein from genbank file. Can anyone give me any idea how to do simplest way ? Thank you advance.

genbank perl • 2.5k views
0
Entering edit mode

It would help to see which part of the file (field) contains the annotation and an example.

0
Entering edit mode

Do you need to keep the GenBank format? Maybe you can simply convert the GBK to Fasta and filter the sequences by description in the fasta comment line.

0
Entering edit mode
7.1 years ago

You don't need BioPerl / BioPython for this. If you know how many lines your annotation takes up (assuming its fixed) - then you can do something like this from the command line in Linux

> sed 's/(\s{5}ANNOTATION_NAME\s+.+?\n)(.+?\n){NUMBEROFLINESTOREMOVE}//g' GENBANKFILE.gbk > NEWGENBANKFILE.gbk

Least - that's what worked for me when I ran into this issue.