Remove a region between two positions in sequences.

seq_remove_position(x, position_in, position_out)

Arguments

x

a DNA, RNA or AA vector.

position_in

an integer giving the position where to start to remove.

position_out

an integer giving the position where to stop to remove.

Value

A vector of same class as x.

Examples


x <- dna("ACGTTAGTGTAGCCGT", "CTCGAAATGA")
seq_remove_position(x, 2, 6)
#> DNA vector of 2 sequences
#> >   AGTGTAGCCGT
#> >   CATGA
seq_remove_position(x, 1:2, 3:4)
#> DNA vector of 2 sequences
#> >   TTAGTGTAGCCGT
#> >   CAAATGA