Requirements

The following R packages has to be installed on the compute box.

library(specL)
library(prozor)
library(Matrix)
library(yaml)

Input

Parameter

If no INPUT is defined the report uses the r Biocpkg("specL") package's data and the following default parameters.

if(!exists("INPUT")){
  INPUT <- list(FASTA_FILE 
      = system.file("extdata", "SP201602-specL.fasta.gz",
                    package = "specL"),
    BLIB_FILTERED_FILE 
      = system.file("extdata", "peptideStd.sqlite",
                    package = "specL"),
    BLIB_REDUNDANT_FILE 
      = system.file("extdata", "peptideStd_redundant.sqlite",
                    package = "specL"),
    MIN_IONS = 5,
    MAX_IONS = 6,
    MZ_ERROR = 0.05,
    MASCOTSCORECUTOFF = 17,
    FRAGMENTIONMZRANGE = c(300, 1250),
    FRAGMENTIONRANGE = c(5, 200),
    OUTPUT_LIBRARY_FILE = "assay_library.tsv"
    )
} 

The library generation workflow was performed using the following parameters:

  cat(
  " FASTA_FILE = ", INPUT$FASTA_FILE, "\n",
  " BLIB_FILTERED_FILE = ", INPUT$BLIB_FILTERED_FILE, "\n",
  " BLIB_REDUNDANT_FILE = ", INPUT$BLIB_REDUNDANT_FILE, "\n",
  " MZ_ERROR = ", INPUT$MZ_ERROR, "\n",
  " FRAGMENTIONMZRANGE = ", INPUT$FRAGMENTIONMZRANGE, "\n",
  " FRAGMENTIONRANGE = ", INPUT$FRAGMENTIONRANGE, "\n",
  " FASTA_FILE = ", INPUT$FASTA_FILE, "\n",
  " MAX_IONS = ", INPUT$MAX_IONS, "\n",
  " MIN_IONS = ", INPUT$MIN_IONS, "\n"
  )

Define the fragment ions of interest

The following R helper function is used for composing the in-silico fragment ion using r CRANpkg("protViz").

fragmentIonFunctionUpTo2 <- function (b, y) {
  Hydrogen <- 1.007825
  Oxygen <- 15.994915
  Nitrogen <- 14.003074
  b1_ <- (b )
  y1_ <- (y )
  b2_ <- (b + Hydrogen) / 2
  y2_ <- (y + Hydrogen) / 2 
  return( cbind(b1_, y1_, b2_, y2_) )
}

Read the sqlite files

BLIB_FILTERED <- read.bibliospec(INPUT$BLIB_FILTERED_FILE) 

summary(BLIB_FILTERED)
BLIB_REDUNDANT <- read.bibliospec(INPUT$BLIB_REDUNDANT_FILE) 
summary(BLIB_REDUNDANT)

Protein (re)-annotation

After processing the psm using bibliospec the protein information is gone.

The read.fasta function is provided by the CRAN package r CRANpkg("seqinr").

FASTA <- read.fasta(INPUT$FASTA_FILE, 
                    seqtype = "AA", 
                    as.string=TRUE)



BLIB_FILTERED <- annotate.protein_id(BLIB_FILTERED, fasta=FASTA)

Generate the ion library

specLibrary <- specL::genSwathIonLib(
  data = BLIB_FILTERED,
  data.fit = BLIB_REDUNDANT,
  max.mZ.Da.error = INPUT$MZ_ERROR,
  topN = INPUT$MAX_IONS,
  fragmentIonMzRange = INPUT$FRAGMENTIONMZRANGE,
  fragmentIonRange = INPUT$FRAGMENTIONRANGE,
  fragmentIonFUN = fragmentIonFunctionUpTo2,
  mascotIonScoreCutOFF = INPUT$MASCOTSCORECUTOFF
  )

Library Generation Summary

Total Number of PSM's with Mascot e score < 0.05, in your search is r length(BLIB_REDUNDANT). The number of unique precurosors is r length(BLIB_FILTERED). The size of the generated ion library is r length(specLibrary@ionlibrary). That means that r round(length(specLibrary@ionlibrary)/length(BLIB_FILTERED) * 100, 2) % of the unique precursors fullfilled the filtering criteria.

summary(specLibrary )
length(specLibrary)
slotNames(specLibrary)

length(specLibrary@rt.input)
length(specLibrary@rt.normalized)
specLibrary@ionlibrary[[1]]

slotNames(specLibrary@ionlibrary[[1]])
plot(specLibrary)

Output

write.spectronaut(specLibrary, file =  INPUT$OUTPUT_LIBRARY_FILE)

Remarks

This report was generated using the packages:

We have invested a lot of time and effort in creating and maintaining this software. Please cite our publication:

For questions and improvements please do contact the authors of the application generateSpecLibrary.

Session info

Here is the output of sessionInfo() on the system on which this document was compiled:

sessionInfo()


cpanse/bfabricShiny documentation built on March 27, 2024, 1:53 a.m.