readNanoStringGeoMxSet: Read 'NanoStringGeoMxSet'

View source: R/readNanoStringGeoMxSet.R

readNanoStringGeoMxSetR Documentation

Read 'NanoStringGeoMxSet'

Description

Create an instance of class NanoStringGeoMxSet by reading data from NanoString GeoMx Digital Count Conversion (DCC) data.

Usage

readNanoStringGeoMxSet(dccFiles, pkcFiles, phenoDataFile, 
                       phenoDataSheet, phenoDataDccColName = "Sample_ID",
                       phenoDataColPrefix = "", protocolDataColNames = NULL,
                       experimentDataColNames = NULL,  
                       configFile = NULL, analyte = "RNA",
                       defaultPKCVersions = NULL, ...)

Arguments

dccFiles

A character vector containing the paths to the DCC files.

pkcFiles

A character vector representing the path to the corresponding PKC file.

phenoDataFile

Character string representing the path to the corresponding phenotypic excel data file. It is recommended to use the Lab Worksheet in the exact order samples are provided in.

phenoDataSheet

Character string representing the excel sheet name containing the phenotypic data.

phenoDataDccColName

Character string identifying unique sample identifier column in phenoDataFile.

phenoDataColPrefix

An optional prefix to add to the phenoData column names to distinguish them from the names of assayData matrices, featureData columns, and protocolData columns.

protocolDataColNames

Character list of column names from phenoDataFile containing data about the experimental protocol or sequencing data.

experimentDataColNames

Character list of column names from phenoDataFile containing data about the experiment's meta-data.

configFile

An optional character string representing the path to the corresponding config file. This is used to ensure the only the correct PKC files are added

analyte

GeoMxSet objects can only hold one analyte at a time. For studies with multiple analytes, which one should be read in? Options: RNA (default) and Protein

defaultPKCVersions

Optional list of pkc file names to use as default if more than one pkc version of each module is provided.

...

Optional parameters to pass to readxl::read_xlsx function for annotation read in

Value

An instance of the NanoStringGeoMxSet class.

Author(s)

Zhi Yang & Nicole Ortogero

See Also

NanoStringGeoMxSet

Examples

# Data file paths
datadir <- system.file("extdata", "DSP_NGS_Example_Data",
                       package="GeomxTools")
dccFiles <- dir(datadir, pattern=".dcc$", full.names=TRUE)
pkc <- unzip(zipfile = file.path(datadir,  "/pkcs.zip"))
sampleAnnotationFile <- file.path(datadir, "annotations.xlsx")

dccFileColumn <- "Sample_ID"

dccSet <- readNanoStringGeoMxSet(dccFiles=dccFiles[1:10],
                               pkcFiles=pkc,
                               phenoDataFile=sampleAnnotationFile,
                               phenoDataSheet="CW005",
                               phenoDataDccColName=dccFileColumn,
                               protocolDataColNames=c("aoi", "cell_line", 
                                                      "roi_rep", "pool_rep", 
                                                      "slide_rep"),
                               experimentDataColNames="panel", 
                               phenoDataColPrefix="")

# All data
dccSet <- readNanoStringGeoMxSet(dccFiles, pkcFile = pkc,
                                 phenoDataFile = sampleAnnotationFile,
                                 phenoDataSheet="CW005")
varLabels(dccSet)

# All data with phenoData prefix
dccSetPhenoPrefix <- readNanoStringGeoMxSet(dccFiles, 
                                pkcFile = pkc, 
                                phenoDataFile = sampleAnnotationFile,
                                phenoDataSheet="CW005", 
                                phenoDataColPrefix = "PHENO_")
varLabels(dccSetPhenoPrefix)

Nanostring-Biostats/GeomxTools documentation built on Dec. 17, 2024, 11:50 a.m.