del.gaps | R Documentation |
These functions remove gaps ("-"
) in a sample of DNA sequences.
del.gaps(x)
del.colgapsonly(x, threshold = 1, freq.only = FALSE)
del.rowgapsonly(x, threshold = 1, freq.only = FALSE)
x |
a matrix, a list, or a vector containing the DNA or AA
sequences; only matrices for |
threshold |
the largest gap proportion to delete the column or row. |
freq.only |
if |
del.gaps
remove all gaps, so the returned sequences may not
have all the same lengths and are therefore returned in a list.
del.colgapsonly
removes the columns with a proportion at least
threshold
of gaps. Thus by default, only the columns with gaps
only are removed (useful when a small matrix is extracted from a large
alignment). del.rowgapsonly
does the same for the rows.
The class of the input sequences is respected and kept unchanged,
unless it contains neither "DNAbin"
nor "AAbin"
in which
case the object is first converted into the class "DNAbin"
.
del.gaps
returns a vector (if there is only one input sequence)
or a list of sequences; del.colgapsonly
and
del.rowgapsonly
return a matrix of sequences or a numeric
vector (with names for the second function) if freq.only =
TRUE
.
Emmanuel Paradis
base.freq
, seg.sites
,
image.DNAbin
, checkAlignment
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.