randSeqDistr: Generate a Distribution of Alignment Scores Based on Random...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/randSeqDistr.R

Description

This function takes a sequence, a vector of randomly sampled sequences, and a alignment function as input and computes an pairwise alignment score distribution from the input sequence and all random sequences stored in sampled_strings.

Usage

1
randSeqDistr(seq, subject, sampled_strings, FUN, ..., comp_cores = 1)

Arguments

seq

a character vector storing a sequence as string for which random sequences shall be computed.

subject

a character vector storing a subject sequence as string to which seq shall be pairwise aligned.

sampled_strings

an vector object returned by the randomSeqs function.

FUN

a pairwise alignment function such as pairwiseAlignment or any other function that takes sequence arguments as first and second input.

...

additional arguments that shall be passed to FUN.

comp_cores

a numeric value specifying the number of cores you want to use for multicore processing.

Value

a numeric vector storing pairwise alignment scores.

Author(s)

Hajk-Georg Drost

See Also

evalAlignment, randomSeqs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# pairwise alignments using Biostrings::pairwiseAlignment() function
# you can also specify the comp_cores argument in case you 
# are working with a multicore machine 
seq_example <- "MEDQVGFGF"
subject_example <- "AYAIDPTPAF"

randScores <- randSeqDistr(seq_example,subject_example,
                           randomSeqs(seq_example,10), 
                           Biostrings::pairwiseAlignment, 
                           scoreOnly  = TRUE, 
                           comp_cores = 1)

HajkD/seqstats documentation built on April 26, 2020, 8:03 p.m.