Substitute character for a sequence from both sides.

Description

Substitute character for a sequence from both sides without changing the internal matched characters.

Usage

1
edgesub(x, pattern = "-", replacement = "?")

Arguments

x

The input DNA sequence.

pattern

The character that to be substitute.

replacement

The character that will replace the pattern.

Details

None.

Value

This function will return to the substituted pattern of the input DNA sequence.

Note

None

Author(s)

Jinlong Zhang jinlongzhang01@gmail.com

References

Kress W., Erickson D., Jones F., Swenson N., Perez R., Sanjur O., Bermingham E., Plant DNA barcodes and community phylogeny of a tropical forest dynamics plot in Panama. Proceedings of the National Academy of Sciences of the United States of America. 2009 18621-18626

See Also

See Also framsub, for substitution of a dataframe, which is a general application of this function.

Examples

1
2
3
4
## edgesub example ########
#### Substitute each terminal of the sequence
dna = "---ATTGCCTTAS--TTTAAAAAACCGTTC-----"
edgesub(dna)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.