*
).R/add_peptide.R
seq_truncate_nonstop.Rd
Truncate input sequence after input position before next stop codons (*
).
seq_truncate_nonstop(seq, pos)
a character
This can be used to remove peptide sequence parts in a context sequence (in
a fixed-sized window around a position of interest) after a stop codon *
occurs.
seq_truncate_nonstop("1234*6789", 2) # "1234"
#> [1] "1234"
seq_truncate_nonstop("1234*6789", 8) # "1234*6789"
#> [1] "1234*6789"
seq <- "QIP*LGSNSLLFPYQLMAGSTRP*SWALGC"
seq_truncate_nonstop(seq, 14) #"QIP*LGSNSLLFPYQLMAGSTRP"
#> [1] "QIP*LGSNSLLFPYQLMAGSTRP"