Crop sequences between two positions

seq_crop_position(x, position_in = 1, position_out = -1)

Arguments

x

a DNA, RNA or AA vector.

position_in

an integer giving the position where to start cropping.

position_out

an integer giving the position where to stop cropping.

Value

A cropped DNA, RNA or AA vector.

See also

Examples


x <- dna("ACGTTAGTGTAGCCGT")

# Drop the first 3 nucleotides (ACG)
seq_crop_position(x, position_in = 4)
#> DNA vector of 1 sequences
#> >   TTAGTGTAGCCGT

# Crop codon between position 4 and 6
seq_crop_position(x, position_in = 4, position_out = 6)
#> DNA vector of 1 sequences
#> >   TTA