| seq_crop_position {bioseq} | R Documentation |
Crop sequences between two positions
Description
Crop sequences between two positions
Usage
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
stri_sub from stringi and
str_sub from stringr
for the underlying implementation.
Other string operations:
seq-replace,
seq_combine(),
seq_count_pattern(),
seq_crop_pattern(),
seq_detect_pattern(),
seq_extract_pattern(),
seq_extract_position(),
seq_remove_pattern(),
seq_remove_position(),
seq_replace_position(),
seq_split_kmer(),
seq_split_pattern()
Examples
x <- dna("ACGTTAGTGTAGCCGT")
# Drop the first 3 nucleotides (ACG)
seq_crop_position(x, position_in = 4)
# Crop codon between position 4 and 6
seq_crop_position(x, position_in = 4, position_out = 6)
[Package bioseq version 0.1.4 Index]