gp_seq2prot - translate DNA/RNA to protein sequence


gp_seq2prot [-p] [-c code_file ] [-q] [-v] [-d] [-h] [inputfile] [outputfile]


print the codon table and exit

-c code_file
load codon table modifications from file code_file

Prints the version information.

Prints lots of debugging information.

Shows usage information.

file to proces; if not given, will use standard input

file to write the data to; if not given, will use standard output


gp_seq2prot tries to translate a DNA / RNA sequence into protein sequence. As a default, it uses the standard translation table common for most organisms, but you can load your own defaults from a file using option -c. The format of this file is quite simple: all empty lines or lines starting with a "#" are ignored; all other lines are supposed to contain a three letter codon, space, and one letter amino acid code or '0' for a STOP codon. You can see the full codon table with the option -p.

The sequences are supposed to begin with a start codon, but their ends may vary: if no stop codon is found before the sequence ends, a warning message is generated, but the output will not be aborted.


  • Translate sequences from file all.orfs.fasta into protein using the mycoplasma translation table modification stored in file myco.cdn:

    gp_seq2prot -c myco.cdn all.orfs.fasta

  • Sample file containing modifications of the translation table:

    # This is the codon table for Mycoplasma pneumoniae
    # As you see, you have only to put down the codons which differ from the
    # standard code. Blank lines, tabs, and lines starting with a '#' are
    # always skipped.
    UGA W


    Genpak(1) gp_acc(1) gp_cusage(1) gp_digest(1) gp_dimer(1) gp_findorf(1) gp_gc(1) gp_getseq(1) gp_map(1) gp_matrix(1) gp_mkmtx(1) gp_pattern(1) gp_primer(1) gp_qs(1) gp_randseq(1) gp_slen(1) gp_tm(1) gp_trimer(1)


    All Genpak programs complain in situations you would also complain, like when they cannot find a sequence you gave them or the sequence is not valid.

    The Genpak programs do not write over existing files. I have found this feature very useful :-)


    I'm sure there are plenty left, so please mail me if you find them. I tried to clean up every bug I could find.


    January Weiner III <>