virtualPCR {insect} | R Documentation |
Virtual PCR.
Description
virtualPCR
queries a list of DNA sequences with virtual primers
(either sequences or profile hidden Markov models) and returns only
the sequences that contain regions of sufficient similarity based on
log-odds alignment scoring.
Usage
virtualPCR(
x,
up,
down = NULL,
rcdown = TRUE,
trimprimers = FALSE,
minfsc = 50,
minrsc = 50,
minamplen = 50,
maxamplen = 2000,
maxNs = 0.02,
partialbind = TRUE,
cores = 1,
quiet = FALSE
)
Arguments
x |
a list of DNA sequences in |
up |
an object of class |
down |
an optional argument the same type as |
rcdown |
logical indicating whether the reverse primer should be
reverse-complemented prior to aligning with the input sequences. Set
to TRUE only if |
trimprimers |
logical indicating whether the primer-binding sites should be removed from the sequences in the returned list. |
minfsc |
numeric, giving the minimum specificity(log-odds score for the optimal alignment) between the forward primer and a sequence for that sequence to be retained. |
minrsc |
numeric, the minimum specificity (log-odds score for the optimal alignment) between the reverse primer (if provided) and a sequence for that sequence to be retained. |
minamplen , maxamplen |
integers giving the minimum and maximum acceptable amplicon lengths. Sequences are discarded if the number of base pairs between the primer-binding sites falls outside of these limits. |
maxNs |
numeric giving the maximum acceptable proportion of the ambiguous residue "N" within the output sequences. Defaults to 0.02. |
partialbind |
logical indicating whether partial primer matching is accepted. Defaults to TRUE. |
cores |
integer giving the number of processors for multithreading.
Defaults to 1, and reverts to 1 if x is not a list.
This argument may alternatively be a 'cluster' object,
in which case it is the user's responsibility to close the socket
connection at the conclusion of the operation,
for example by running |
quiet |
logical indicating whether progress should be printed to the console. |
Value
a list of trimmed sequences, an object of class
DNAbin
.
Author(s)
Shaun Wilkinson
Examples
## trim whale sequences using a new set of inner primers
inner_for <- "CGGTTGGGGTGACCTCGGAGTA"
inner_rev <- "GCTGTTATCCCTAGGGTAA"
whales_short <- virtualPCR(whales, up = inner_for, down = inner_rev,
trimprimers = TRUE)