Most proteomics experiments need protein (peptide) separation and cleavage procedures before these molecules could be analyzed or identified by mass spectrometry or other analytical tools.
cleaver allows in-silico cleavage of polypeptide sequences to e.g. create theoretical mass spectrometry data.
The cleavage rules are taken from the ExPASy PeptideCutter tool (Gasteiger et al. 2005).
Loading the cleaver package:
Getting help and list all available cleavage rules:
Cleaving of Gastric juice peptide 1 (P01358) using Trypsin:
## $LAAGKVEDSD
## [1] "LAAGK" "VEDSD"
## $LAAGKVEDSD
## start end
## [1,] 1 5
## [2,] 6 10
## $LAAGKVEDSD
## [1] 5
Sometimes cleavage is not perfect and the enzym miss some cleavage positions:
## $LAAGKVEDSD
## [1] "LAAGKVEDSD"
## $LAAGKVEDSD
## start end
## [1,] 1 10
## $LAAGKVEDSD
## [1] "LAAGK" "VEDSD" "LAAGKVEDSD"
## $LAAGKVEDSD
## start end
## [1,] 1 5
## [2,] 6 10
## [3,] 1 10
Combine cleaver and Biostrings (Pages et al., n.d.):
## create AAStringSet object
p <- AAStringSet(c(gaju="LAAGKVEDSD", pnm="AGEPKLDAGV"))
## cleave it
cleave(p, enzym="trypsin")## AAStringSetList of length 2
## [["gaju"]] LAAGK VEDSD
## [["pnm"]] AGEPK LDAGV
## IRangesList object of length 2:
## $gaju
## IRanges object with 2 ranges and 0 metadata columns:
## start end width
## <integer> <integer> <integer>
## [1] 1 5 5
## [2] 6 10 5
##
## $pnm
## IRanges object with 2 ranges and 0 metadata columns:
## start end width
## <integer> <integer> <integer>
## [1] 1 5 5
## [2] 6 10 5
## $gaju
## [1] 5
##
## $pnm
## [1] 5
Downloading Insulin (P01308) and Somatostatin (P61278) sequences from the UniProt (The UniProt Consortium 2012) database using UniProt.ws (Carlson, n.d.).
## load UniProt.ws library
library("UniProt.ws")
## select species Homo sapiens
up <- UniProt.ws(taxId=9606)
## download sequences of Insulin/Somatostatin
s <- select(up,
keys=c("P01308", "P61278"),
columns=c("sequence"),
keytype="UniProtKB"
)
## fetch only sequences
sequences <- setNames(s$Sequence, s$Entry)
## remove whitespaces
sequences <- gsub(pattern="[[:space:]]", replacement="", x=sequences)Cleaving using Pepsin:
## $P01308
## [1] "MA" "L" "W" "MRLLP"
## [5] "LL" "A" "WGPDPAAA" "F"
## [9] "VNQH" "CGSH" "VEA" "Y"
## [13] "VCGERG" "FF" "YTPKTRREAED" "QVGQVE"
## [17] "GGGPGAGS" "LQP" "LA" "EGS"
## [21] "QKRGIVEQCCTSICS" "Q" "EN" "CN"
##
## $P61278
## [1] "ML" "SCRL" "QCA"
## [4] "L" "AA" "SIV"
## [7] "A" "GCVTGAPSDPRL" "RQ"
## [10] "FL" "QKS" "LAAAAGKQEL"
## [13] "AK" "Y" "AE"
## [16] "SEPNQTENDA" "LEPED" "SQAAEQDEMRL"
## [19] "EL" "QRSANSNPAMAPRERKAGCKN" "FF"
## [22] "W" "KT" "FTSC"
A common use case of in-silico cleavage is the calculation of the isotopic distribution of peptides (which were enzymatic digested in the in-vitro experimental workflow). Here BRAIN (Claesen et al. 2012; Dittwald et al. 2013) is used to calculate the isotopic distribution of cleaver’s output. (please note: it is only a toy example, e.g. the relation of intensity values between peptides isn’t correct).
## load BRAIN library
library("BRAIN")
## cleave insulin
cleavedInsulin <- cleave(sequences[1], enzym="trypsin")[[1]]
## create empty plot area
plot(NA, xlim=c(150, 4300), ylim=c(0, 1),
xlab="mass", ylab="relative intensity",
main="tryptic digested insulin - isotopic distribution")
## loop through peptides
for (i in seq(along=cleavedInsulin)) {
## count C, H, N, O, S atoms in current peptide
atoms <- BRAIN::getAtomsFromSeq(cleavedInsulin[[i]])
## calculate isotopic distribution
d <- useBRAIN(atoms)
## draw peaks
lines(d$masses, d$isoDistr, type="h", col=2)
}## R version 4.5.2 (2025-10-31)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.3 LTS
##
## Matrix products: default
## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so; LAPACK version 3.12.0
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## time zone: Etc/UTC
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats4 stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] BRAIN_1.57.0 lattice_0.22-7 PolynomF_2.0-8
## [4] UniProt.ws_2.51.0 cleaver_1.49.0 Biostrings_2.79.2
## [7] Seqinfo_1.1.0 XVector_0.51.0 IRanges_2.45.0
## [10] S4Vectors_0.49.0 BiocGenerics_0.57.0 generics_0.1.4
## [13] BiocStyle_2.39.0
##
## loaded via a namespace (and not attached):
## [1] rappdirs_0.3.3 sass_0.4.10 RSQLite_2.4.4
## [4] hms_1.1.4 digest_0.6.38 magrittr_2.0.4
## [7] grid_4.5.2 evaluate_1.0.5 fastmap_1.2.0
## [10] blob_1.2.4 jsonlite_2.0.0 progress_1.2.3
## [13] AnnotationDbi_1.73.0 DBI_1.2.3 BiocManager_1.30.27
## [16] httr_1.4.7 httr2_1.2.1 jquerylib_0.1.4
## [19] cli_3.6.5 rlang_1.1.6 crayon_1.5.3
## [22] dbplyr_2.5.1 Biobase_2.71.0 bit64_4.6.0-1
## [25] cachem_1.1.0 yaml_2.3.10 BiocBaseUtils_1.13.0
## [28] tools_4.5.2 memoise_2.0.1 dplyr_1.1.4
## [31] filelock_1.0.3 curl_7.0.0 rjsoncons_1.3.2
## [34] buildtools_1.0.0 vctrs_0.6.5 R6_2.6.1
## [37] png_0.1-8 lifecycle_1.0.4 BiocFileCache_3.1.0
## [40] KEGGREST_1.51.1 bit_4.6.0 pkgconfig_2.0.3
## [43] bslib_0.9.0 pillar_1.11.1 Rcpp_1.1.0
## [46] glue_1.8.0 tidyselect_1.2.1 xfun_0.54
## [49] tibble_3.3.0 sys_3.4.3 knitr_1.50
## [52] htmltools_0.5.8.1 rmarkdown_2.30 maketools_1.3.2
## [55] compiler_4.5.2 prettyunits_1.2.0