3
$\begingroup$

How to extract protein sequences from a GBK(GenBank) file without scripting? I know that writting a script using BioPerl or Biopython can do this, but it is not elegant and daunting to beginners and biology persons. Any thing like

$ SOME_PKG_MANAGER install PKG
$ CMD ab.1234.gbk > ab.1234.faa
$\endgroup$

closed as unclear what you're asking by AliceD, March Ho, WYSIWYG Jul 8 '15 at 6:09

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ Coding is definitely elegant but not un-daunting perhaps ;) $\endgroup$ – WYSIWYG Jul 7 '15 at 13:02
  • 2
    $\begingroup$ I'm not sure what you mean by "it is not elegant". If scrolling through the file and copying and pasting sequences out is your version of elegant I'm not sure what the question is... Scripting languages like perl and python were made exactly for this situation. But I can't see the biological question here so I'm going to flag as off topic. $\endgroup$ – James Jul 7 '15 at 17:51
  • $\begingroup$ Yeah I agree with Good Gravy. This is like asking "I want to do cell culture but I don't want to go through the process of changing media. Is there a robot that can do this for me?" $\endgroup$ – WYSIWYG Jul 8 '15 at 6:08
  • 1
    $\begingroup$ @WYSIWYG If there is, you cannot afford not knowing that. This is the value of my question. $\endgroup$ – Frozen Flame Jul 8 '15 at 6:21
  • 1
    $\begingroup$ @WYSIWYG I know that extracting sequences is not a difficult task. But why waste time writing the same script again. If you can do it in one line, show me your code; that's what I want. $\endgroup$ – Frozen Flame Jul 8 '15 at 12:49
3
$\begingroup$

My colleagues and I have recently published a toolbox of command-line utilities that are modeled after GNU Textutils (e.g. grep, cut, tr, uniq) called FAST: Fast Analysis of Sequences (cite).

To install FAST you can use:

perl -MCPAN -e 'install FAST'

Or install the current development version from github. The FAST install comes with a cookbook, sample dataset and all utilities have man pages. The cookbook is also available on the github wiki.

To convert the features annotated in a genbank file to fastA sequences you can use gbfcut. Below are examples of using gbfcut:

To convert all annotated features of a genbank file to fastA format:

gbfcut genbank-file

Output only tRNA features:

gbfcut -k tRNA genbank-file

Output all feature sequences with a "note" qualifier containing "telomere":

gbfcut -q note=telomere genebank-file
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.