Substitute character for a sequence from both sides without changing the internal matched characters.
edgesub(x, pattern = "-", replacement = "?")
The input DNA sequence.
The character that to be substitute.
The character that will replace the pattern.
This function will return to the substituted pattern of the input DNA sequence.
Jinlong Zhang email@example.com
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
framsub, for substitution of a dataframe, which is a general application of this function.
1 2 3 4
## edgesub example ######## #### Substitute each terminal of the sequence dna = "---ATTGCCTTAS--TTTAAAAAACCGTTC-----" edgesub(dna)