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

Biopiece: mutate_seq

Description

mutate_seq introduces mutations into sequences in the stream based on either an exact number of mutations, or a percentage of the sequence length. The type of sequence is guessed and mutations are introduced at random in such a way that no two mutations can occur at the same position.

Usage

... | mutate_seq [options]

Options

[-?          | --help]               #  Print full usage description.
[-n <uint>   | --number=<uint>]      #  Number of mutations to introduce.
[-p <float>  | --percent=<float>]    #  Percentage of residues to mutate.
[-t <string> | --type=<sting>]       #  Sequence type (dna|rna|protein)  -  Default=guessed!
[-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 entry in the FASTA file test.fna:

>test
ATGTGCACATTCGACTAGCA

Now, we can read this sequence with read_fasta and specify a number of mutations to be introduced via the -n switch:

read_fasta -i test.fna | mutate_seq -n 3                                          

SEQ: ATGTGCACACTCTACTAGCG
SEQ_NAME: test
SEQ_LEN: 20
---

We can also illustrate this by re-reading the sequence and compare the original with a sequence with 10% :

read_fasta -i test.fna | mutate_seq -p 10 | read_fasta -i test.fna | write_align -x

                     .         .
test        ATGTGAACATTCGAGTAGCA
            ||||| |||||||| |||||
test        ATGTGCACATTCGACTAGCA
                     .         .

See also

read_fasta

write_align

Author

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

[email protected]

June 2009

License

GNU General Public License version 2

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

Help

mutate_seq is part of the Biopieces framework.

http://www.biopieces.org

Clone this wiki locally