View source: R/seq_string_operation.R
| seq_crop_position | R Documentation |
Crop sequences between two positions
seq_crop_position(x, position_in = 1, position_out = -1)
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. |
A cropped DNA, RNA or AA vector.
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()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.