Determine the minimal set of proteins that explains the peptide
spectrum matches (PSMs) of a mass spectrometry experiment, using a greedy
parsimony algorithm. Annotate peptides with the proteins they match in
'FASTA' sequence databases, and create 'FASTA' databases with reversed
decoy sequences and contaminant proteins. Compute and plot the coverage
of protein sequences by the matched peptides. Estimate the false discovery
rate (FDR) of target-decoy search results at the PSM, precursor, peptide
and protein level, following Elias and Gygi (2007)
Terms:
Version 0.5.0 breaks the API of CRAN 0.3.1: functions, arguments and result columns are renamed, and R6 classes compute the DIA windows and the FDR. See NEWS.md.
The website https://prolfqua.github.io/prozor/ has the function reference, the articles and the changelog.
Articles:
The CRAN version (0.3.1) is older than the GitHub version:
install.packages("prozor")
The current version from GitHub:
install.packages("remotes")
remotes::install_github("prolfqua/prozor")
Clone the repository and use the Makefile targets: make document (roxygen2 docs and NAMESPACE), make test, make check, make lint and make format (air).
library(prozor)
# protein sequences and the peptides identified in a human sample, bundled with prozor
fasta <- read_fasta(system.file("p1000_db1_example/Annotation_canSeq.fasta.gz", package = "prozor"))
peptides <- unique(read.delim(system.file("extdata/IDResults.txt.gz", package = "prozor"))$peptideSeq)
# the proteins each peptide occurs in, then the minimal protein set that explains all peptides
annotation <- annotate_peptides(peptides, fasta)
groups <- greedy_parsimony(annotation)
c(peptides = length(peptides), proteins = length(unique(annotation$protein_id)), groups = length(unique(groups)))
#> peptides proteins groups
#> 1520 382 244
# FDR of target-decoy search results: the score at a q-value of 1 % (smaller scores are better)
fdr <- TargetDecoyFDR$new(fdr_sample$score, decoy_hit = grepl("^REV_", fdr_sample$protein_id), larger_better = FALSE)
fdr$score_at(q_value = 0.01)
#> [1] 0.03394749
1,430 of the 1,520 peptides match 382 proteins; 244 proteins or protein groups explain all of them.
prozor installs the script fgcz_create_fasta.R (it needs the docopt package). It reads all FASTA files and the annotation.txt in a directory, adds contaminants and reversed decoy sequences, and writes one FASTA file:
script=$(Rscript -e 'cat(system.file("script", "fgcz_create_fasta.R", package = "prozor"))')
Rscript "$script" -h
Rscript "$script" path/to/database_dir -o path/to/output_dir
Rscript "$script" path/to/database_dir nodecoy -c none -o path/to/output_dir
Cite prozor with its DOI 10.32614/CRAN.package.prozor; citation("prozor") gives the full reference.
Each GitHub release is archived on Zenodo under 10.5281/zenodo.24535408, which resolves to the latest release.