Specific Functions to Write for GeomxTools - Nanostring-Biostats/GeomxTools GitHub Wiki

NanoStringGeomxSet

  • NanoStringGeomxSet-subset.R write methods for subsetting NanoStringGeomxSet that are not in NCTools

negative probes, etc. See RCCset subset function

  • NanoStringGeomxSet-munge.R see if the existing method for RCCset is applicable for geomxset or need to write new
  • NanoStringGeomSet-summary.R
  • NanoStringGeomxSet-utils.R - write helper functions here as needed (example: background subtraction)
  • Check/test ggplot.NanoStringRccSet from NC tools if it works with GeomxSet
  • Check/test NanoStringGeomxSet-accessors.R if it has all the accessors for new data types needed for the GeomxSet (add to vignette)
  • additional method in NanoStringGeomxSet-class.R for matrix inputs from DSP-DA
  • writeNanoStringGeomxSet.R - we have this in nctools, need to write geomxtools specific

Other Data types:

NGS - (protein will be added later)

nCounter - will be analyzed using NCTools. For plots not in NCtools but is useful for nCounter, we should make sure it can be called from NCTools

plexset - should be same as NGS. Add an extra column for plexset. (to be added later) Note: Ask Melod or DSP team on how to check if data from Geomx is plexset

Plots

autoplot.R - wrapper function to call the plotting functions to be included in geomx. All plots should be in one .R file to keep modularization

Exploratory

  • NanoStringGeomxSet-autoplot.R wrapper function for the plots that are accessible in geomxtools

spaceplot.R
detectionheatmap.R\

QC plots

To be determined which plots we want to include in the package. Essential QC plots: AOI QC plots:

  • make sure we reflect the flags for failing samples

Normalization plot Compare normalization plots heatmap PCA plots

QC

  • NanoStringGeomxSet-qc.R wrapper function for QC - to setQCFlags for GeomxSet for QCtype c(probe, AOI, target) assaytype c(RNA, protein, others)

Note: one QC R file for each

GeomxSet-AOIQC Function

  • Set AOI_flags (protocolData) for for failed samples
  • input: Quantile to be used in QC
  • output: object with QC flags set for those that failed AOI QC

GeomxSet-probeQC Function

  • Set probeQC_flags (featureData) for for failed samples
  • input:
  • output: object with QC flags set for those that failed Probe QC

GeomxSet-targetQC Function

  • Set targetQC_flags (featureData) for for failed samples
  • input: type: score test or LOQ, threshold (p-value, LOQ threshold)
  • output: object with QC flags set for those that failed target QC

Normalization

  • NanoStringGeomxSet-normalize.R modularize based on object and data type. Calls specific .R file for each data_type = c(RNA, protein)
    and norm method = NGS normalization Q3 normalization Background norm Lei's method Area or nuclei scaling norm

For protein: norm_method = Housekeeper norm IgG norm area norm

Example:

You don't need set generic, this is already in NCTools

setMethod("normalize", "NanoStringGeomxSet",
function(object, norm_method="Q3", data_type="RNA", ...) { normed_data <- switch(norm_method, "Q3" <- Q3_norm(object, data_type=data_type), "neg" <- neg_norm(object, data_type=data_type), "hk" <- hk_norm(object, data_type=data_type)) })

run_Q3 <- function(object, data_type) { #run Q3 steps }