RemoveGaps {DECIPHER} | R Documentation |
Removes gaps ("-" or "." characters) in a set of sequences, either deleting all gaps or only those shared by all sequences in the set.
RemoveGaps(myXStringSet, removeGaps = "all", processors = 1)
myXStringSet |
An |
removeGaps |
Determines how gaps ("-" or "." characters) are removed in the sequences. This should be (an unambiguous abbreviation of) one of |
processors |
The number of processors to use, or |
The removeGaps
argument controls which gaps are removed in myXStringSet
. Setting removeGaps
to "all"
will remove all gaps in the input sequences, whereas setting removeGaps
to "common"
will remove only gaps that exist in the same position in every sequence. Therefore, the latter method will leave gaps in place that are not shared by every sequence, requiring that the sequences in myXStringSet
all be the same length (i.e., be aligned). Setting removeGaps
to "none"
will simply return myXStringSet
unaltered.
An XStringSet
of the same type as myXStringSet
.
Erik Wright eswright@pitt.edu
dna <- DNAStringSet(c("ACT-G-", "AC--G-")) dna RemoveGaps(dna, "all") RemoveGaps(dna, "common")