R/randSeqDistr.R
randSeqDistr.Rd
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)
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 |
sampled_strings | an vector object returned by the |
FUN | a pairwise alignment function such as |
... | additional arguments that shall be passed to |
comp_cores | a numeric value specifying the number of cores you want to use for multicore processing. |
a numeric vector storing pairwise alignment scores.
# 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)