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.

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.

See also

Examples

# 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)