seq_replace_position: Replace a region between two positions in sequences

Description Usage Arguments Value See Also Examples

View source: R/seq_string_operation.R

Description

Replace a region between two positions in sequences

Usage

1
seq_replace_position(x, position_in, position_out, replacement)

Arguments

x

a DNA, RNA or AA vector.

position_in

an integer giving the position where to start to replace.

position_out

an integer giving the position where to stop to replace.

replacement

a vector of replacements.

Value

A vector of same class as x.

See Also

stri_replace from stringi and str_replace from stringr for the underlying implementation.

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()

Examples

1
2
x <- dna("ACGTTAGTGTAGCCGT", "CTCGAAATGA")
seq_replace_position(x, c(5, 2), 6, "-------")

bioseq documentation built on Nov. 26, 2020, 9:07 a.m.