msQCpipe: The main function of msQC pipeline

Description Usage Arguments Value Author(s) Examples

View source: R/msQC.R

Description

This function is designed to automate generating of target-decoy database, database searcing, post-processing and report generation.

Usage

1
2
3
4
msQCpipe(spectralist = NULL, fasta = "", outdir = "./", mode = "",
  miss = 2, enzyme = 1, varmod = NULL, fixmod = NULL, tol = 10,
  tolu = "ppm", itol = 0.6, itolu = "Daltons", threshold = 0.01,
  cpu = 0, xmx = 2, refine = TRUE, ntt = 1, ...)

Arguments

spectralist

A file contains the experiment design or a single mgf file

fasta

database file, must contain decoy sequences

outdir

output directory

mode

identification or quantification

miss

max miss clevage

enzyme

enzyme

varmod

Variable modifications are those which may or may not be present.

fixmod

Fixed modifications are applied universally, to every instance of the specified residue(s) or terminus.

tol

The error window on experimental peptide mass values

tolu

Units can be selected from: ppm, Daltons(also da or Da).

itol

Error window for MS/MS fragment ion mass values.

itolu

Units can be selected from: Daltons(also da or Da)

threshold

FDR value for PSM

cpu

Max number of cpu used

xmx

JAVA -Xmx

refine

Refine search for X!Tandem, default is TRUE.

ntt

Semi-tryptic, 1; fully-tryptic, 2.

...

Additional parameters passed to read.table used to read the experimental design.

Value

A list which contains all of the information for data quality report generating

Author(s)

Bo Wen wenbo@genomics.cn

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
## Not run: 
library("rpx")
px <- PXDataset("PXD000864")
mgfs <- grep("mgf", pxfiles(px), value = TRUE)
mgfs <- grep("-0[5-6]-[1|2]", mgfs, value=TRUE)
mgffiles <- pxget(px, mgfs)
library("R.utils")
mgffiles <- sapply(mgffiles, gunzip)
## Generate the lightweight qc report, 
## trim the mgf files to 1/10 of their size.
trimMgf <- function(f, m = 1/10, overwrite = FALSE) {
  message("Reading ", f)
  x <- readLines(f)
  beg <- grep("BEGIN IONS", x)
  end <- grep("END IONS", x)
  n <- length(beg)
  message("Sub-setting to ", m)
  i <- sort(sample(n, floor(n * m)))
  k <- unlist(mapply(seq, from = beg[i], to = end[i]))
  if (overwrite) {
    unlink(f)
    message("Writing ", f)
    writeLines(x[k], con = f)
    return(f)
  } else {
    g <- sub(".mgf", "_small.mgf", f)
    message("Writing ", g)
    writeLines(x[k], con = g)
    return(g)
  }    
}
set.seed(1)
mgffiles <- sapply(mgffiles, trimMgf, overwrite = TRUE)
fas <- pxget(px, "TTE2010.zip")
fas <- unzip(fas)
design <- system.file("extdata/PXD000864-design.txt", package = "proteoQC")
read.table(design, header = TRUE)
qcres <- msQCpipe(spectralist = design,
                 fasta = fas, 
                 outdir = "./qc",
                 miss  = 0,
                 enzyme = 1, varmod = 2, fixmod = 1,
                 tol = 10, itol = 0.6, cpu = 2,
                 mode = "identification")

## End(Not run)

wenbostar/proteoQC documentation built on Nov. 20, 2020, 10:15 a.m.