Skip to content
Martin Asser Hansen edited this page Oct 2, 2015 · 5 revisions

Biopiece: translate_seq

Description

translate_seq translate DNA sequence in the stream to protein in specified reading frames. Stop codons are indicated by *.

Usage

... | translate_seq [options]

Options

[-?         | --help]               #  Print full usage description.
[-f <list>  | --frames=<list>]      #  Comma separated list of frames of translation: 1,2,3,-1,-2,-3  -  Default=all
[-I <file!> | --stream_in=<file!>]  #  Read input from stream file  -  Default=STDIN
[-O <file>  | --stream_out=<file>]  #  Write output to stream file  -  Default=STDOUT
[-v         | --verbose]            #  Verbose output.

Examples

Consider the following FASTA entry in the file test.fna:

>test1
ATGCACATTCGACTAGCATCGACGACGCGAGCGACGACGACGATGCGACTAGCTTA

Use read_fasta to obtain the translated sequence in all six reading frames: read_fasta -i test.fna | translate_seq

SEQ: MHIRLASTTRATTTMRLA SEQ_LEN: 18 SEQ_NAME: test1 FRAME: 1

SEQ: CTFDHRRRERRRRCDL SEQ_LEN: 18 SEQ_NAME: test1 FRAME: 2

SEQ: AHSTSIDDASDDDDATSL SEQ_LEN: 18 SEQ_NAME: test1 FRAME: 3

SEQ: *ASRIVVVARVVDASRMC SEQ_LEN: 18 SEQ_NAME: test1 FRAME: -1

SEQ: KLVASSSSLASSMLVECA SEQ_LEN: 18 SEQ_NAME: test1 FRAME: -2

SEQ: SSHRRRRSRRRCSNVH SEQ_LEN: 18 SEQ_NAME: test1 FRAME: -3

To obtain only the first forward and first reverse translations, do:

{{{ read_fasta -i test.fna | translate_seq -f '1,-1'

SEQ: MHIRLASTTRATTTMRLA SEQ_LEN: 18 SEQ_NAME: test1 FRAME: 1

SEQ: *ASRIVVVARVVDASRMC SEQ_LEN: 18 SEQ_NAME: test1 FRAME: -1

}}}

==See also==

read_fasta

==Author==

Martin Asser Hansen - Copyright (C) - All rights reserved.

mail@maasha.dk

August 2007

==License==

GNU General Public License version 2

http://www.gnu.org/copyleft/gpl.html

==Help==

translate_seq is part of the Biopieces framework.

http://www.biopieces.org

Clone this wiki locally