RemoveGaps: Remove Gap Characters in Sequences

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/RemoveGaps.R

Description

Removes gaps ("-" or "." characters) in a set of sequences, either deleting all gaps or only those shared by all sequences in the set.

Usage

1
2
3
RemoveGaps(myXStringSet,
           removeGaps = "all",
           processors = 1)

Arguments

myXStringSet

An AAStringSet, DNAStringSet, or RNAStringSet object containing sequences.

removeGaps

Determines how gaps ("-" or "." characters) are removed in the sequences. This should be (an unambiguous abbreviation of) one of "none", "all" or "common".

processors

The number of processors to use, or NULL to automatically detect and use all available processors.

Details

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.

Value

An XStringSet of the same type as myXStringSet.

Author(s)

Erik Wright [email protected]

See Also

AlignSeqs

Examples

1
2
3
4
dna <- DNAStringSet(c("ACT-G-", "AC--G-"))
dna
RemoveGaps(dna, "all")
RemoveGaps(dna, "common")

DECIPHER documentation built on Nov. 1, 2018, 4:42 a.m.