genRandBioSeqs: Generate Random Biological Sequences

Description Usage Arguments Details Value Author(s) References Examples

View source: R/utils.R

Description

Generate biological sequences with uniform random distribution of alphabet characters.

Usage

1
2
genRandBioSeqs(seqType = c("DNA", "RNA", "AA"), numSequences, seqLength,
  biostring = TRUE, seed)

Arguments

seqType

defines the type of sequence as DNA, RNA or AA and the underlying alphabet. Default="DNA"

numSequences

single numeric value which specifies the number of sequences that should be generated.

seqLength

either a single numeric value or a numeric vector of length 'numSequences' which gives the length of the sequences to be generated.

biostring

if TRUE the sequences will be generated in XStringSet format otherwise as BioVector derived class. Default=TRUE

seed

when present the random generator will be seeded with the value passed in this parameter

Details

The function generates a set of sequences with uniform distribution of alphabet characters and returns it as XStringSet or BioVector dependent on the parameter biostring.

Value

When the parameter 'biostring' is set to FALSE the function returns a XStringSet derived class otherwise a BioVector derived class.

Author(s)

Johannes Palme <[email protected]>

References

http://www.bioinf.jku.at/software/kebabs

J. Palme, S. Hochreiter, and U. Bodenhofer (2015) KeBABS: an R package for kernel-based analysis of biological sequences. Bioinformatics, 31(15):2574-2576, 2015. DOI: 10.1093/bioinformatics/btv176.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## generate a set of AA sequences of fixed length as AAStringSet
aaseqs <- genRandBioSeqs("AA", 100, 1000, biostring=TRUE)

## show AA sequence set
aaseqs

## Not run: 
## generate a set of "DNA" sequences as DNAStringSet with uniformly
## distributed lengths between 1500 and 3000 bases
seqLength <- runif(300, min=1500, max=3500)
dnaseqs <- genRandBioSeqs("DNA", 100, seqLength, biostring=TRUE)

## show DNA sequence set
dnaseqs

## End(Not run)

kebabs documentation built on May 31, 2017, 11:07 a.m.