This function imports sage TMT quantitation and identification results and combines them into a QFeatures::QFeatures() object.

sageQFeatures(
  quantTable,
  idTable,
  byQuant = c("filename", "scannr"),
  byId = c("filename", "scannr"),
  splitBy = byQuant[1],
  quantPattern = "tmt_",
  class = c("SummarizedExperiment", "SingleCellExperiment"),
  ...
)

Arguments

quantTable

character(1) containing the path to the quantification result file, typically "quant.tsv", or a data.frame containing the quantitation results.

idTable

character(1) containing the path to the identification results, typically "results.sage.tsv", or a data.frame containing the identification results.

byQuant

character() containing the specifications of the quantification columns used for merging. The first element should correspond the the raw files. Passed the merge() as by.x. Default is (since 0.3.1) c("filename", "scannr").

byId

character() containing the specifications of the identification columns used for merging. Passed the merge() as by.y. Default is c("filename", "scannr").

splitBy

A character refering the a quantFile or idFile column that will be used to split the merged table into different assays, i.e. acquisitions corresponding to different sets of samples. Default is to use byQuant[1]. Set to NULL to not split and return a result with a single assay, for instance if several fractions from the same set of samples were acquired.

quantPattern

character(1) defining the pattern passed to grep() to extract the columns containing quantitative data. Default is "tmt_".

class

character(1) with one of "SummarizedExperiment" or "SingleCellExperiment" defining the assay's class. Default is the former.

...

Additional parameters passed to read.delim().

Value

An instance of class QFeatures() with as many assays as defined by splitBy.

Author

Laurent Gatto

Examples


## Add the data to the package's cache if they
## aren't already available

if (!sagerAvailableData("id"))
  sagerAddData("id")
basename(idf <- sagerIdData())
#> [1] "92fe02655fa2c_results.sage.tsv"

if (!sagerAvailableData("quant"))
  sagerAddData("quant")
basename(qf <- sagerQuantData())
#> [1] "92fe0301bd0ba_quant.tsv"

## Assays are split by filename - setting byQuant to use the old
## 'file' filename in the quantitation output file. New default
## value (since 0.3.1) is 'filename'.
sageQFeatures(qf, idf, byQuant = c("file", "scannr"))
#> An instance of class QFeatures containing 3 assays:
#>  [1] subset_dq_00084_11cell_90min_hrMS2_A5.mzML: SummarizedExperiment with 288 rows and 11 columns 
#>  [2] subset_dq_00086_11cell_90min_hrMS2_A9.mzML: SummarizedExperiment with 353 rows and 11 columns 
#>  [3] subset_dq_00087_11cell_90min_hrMS2_A11.mzML: SummarizedExperiment with 336 rows and 11 columns 

## One single assay
sageQFeatures(qf, idf, splitBy = NULL, byQuant = c("file", "scannr"))
#> An instance of class QFeatures containing 1 assays:
#>  [1] sage: SummarizedExperiment with 977 rows and 11 columns