Import data from a DIA-NN quantification file into a SingleCellExperiment object. Note that DIA-NN support in einprot is currently experimental - please be aware that the interface may change, and interpret results with caution.

importDIANN(
  inFile,
  fileType = "pg_matrix",
  outLevel = "pg",
  includeOnlySamples = "",
  excludeSamples = "",
  stopIfEmpty = FALSE,
  aName = "MaxLFQ",
  ...
)

Arguments

inFile

Path to a tab-delimited input text file from DIA-NN; either pg_matrix.tsv, pr_matrix.tsv or the main report.tsv.

fileType

Character scalar indicating the type of input file; either "pg_matrix", "pr_matrix" or "main_report".

outLevel

Character scalar indicating the desired output level; either "pg" (protein group) or "pr" (precursor).

includeOnlySamples, excludeSamples

Character vectors defining regular expressions to match against the extracted columns to retain or exclude samples.

stopIfEmpty

Logical scalar, whether to raise an error if no columns matching the patterns are found.

aName

Character scalar giving the name of the main assay (if fileType is "pg_matrix" or "pr_matrix"), or the column from which to get the values for the main assay (if fileType is "main_report").

...

Additional arguments that will be passed on to QFeatures::readSummarizedExperiment (e.g., the number of rows to import).

Value

A list with two elements: a SingleCellExperiment object and a character scalar with the main assay name.

Author

Charlotte Soneson

Examples

sceL <- importDIANN(system.file("extdata", "diann_example",
                                "PXD028735.pg_matrix.tsv",
                                package = "einprot"),
                    fileType = "pg_matrix", outLevel = "pg",
                    aName = "MaxLFQ")
sceL
#> $sce
#> class: SingleCellExperiment 
#> dim: 12261 6 
#> metadata(1): colList
#> assays(1): MaxLFQ
#> rownames(12261): 1 2 ... 12260 12261
#> rowData names(5): Protein.Group Protein.Ids Protein.Names Genes
#>   First.Protein.Description
#> colnames(6): LFQ_Orbitrap_AIF_Condition_A_Sample_Beta_01
#>   LFQ_Orbitrap_AIF_Condition_B_Sample_Alpha_01 ...
#>   LFQ_Orbitrap_AIF_Condition_B_Sample_Gamma_01
#>   LFQ_Orbitrap_AIF_Condition_A_Sample_Alpha_01
#> colData names(0):
#> reducedDimNames(0):
#> mainExpName: NULL
#> altExpNames(0):
#> 
#> $aName
#> [1] "MaxLFQ"
#>