powered by
Replace a region between two positions in sequences
seq_replace_position(x, position_in, position_out, replacement)
a DNA, RNA or AA vector.
an integer giving the position where to start to replace.
an integer giving the position where to stop to replace.
a vector of replacements.
A vector of same class as x.
x
stri_replace from stringi and str_replace from stringr for the underlying implementation.
stri_replace
str_replace
Other string operations: seq-replace, seq_combine, seq_count_pattern, seq_crop_pattern, seq_crop_position, seq_detect_pattern, seq_extract_pattern, seq_extract_position, seq_remove_pattern, seq_remove_position, seq_split_kmer, seq_split_pattern
seq-replace
seq_combine
seq_count_pattern
seq_crop_pattern
seq_crop_position
seq_detect_pattern
seq_extract_pattern
seq_extract_position
seq_remove_pattern
seq_remove_position
seq_split_kmer
seq_split_pattern
# NOT RUN { x <- dna("ACGTTAGTGTAGCCGT", "CTCGAAATGA") seq_replace_position(x, c(5, 2), 6, "-------") # }
Run the code above in your browser using DataLab