BGScoreTest-methods: Testing for features above the background

BGScoreTestR Documentation

Testing for features above the background

Description

Testing for features above the background using Poisson background model as reference

Testing for features above the background using Poisson background model as reference

Usage

BGScoreTest(object, ...)

## S4 method for signature 'NanoStringGeoMxSet'
BGScoreTest(
  object,
  split = FALSE,
  adj = 1,
  removeoutlier = FALSE,
  useprior = FALSE
)

## S4 method for signature 'matrix'
BGScoreTest(
  object,
  BGmod,
  adj = 1,
  probenum,
  removeoutlier = FALSE,
  useprior = FALSE
)

Arguments

object

count matrix with features in rows and samples in columns

...

additional argument list that might be used

split

indicator variable on whether it is for multiple slides (Yes, TRUE; No, FALSE)

adj

adjustment factor for the number of feature in each gene, default =1 i.e. each target only consists of one probe

removeoutlier

whether to remove outlier

useprior

whether to use the prior that the expression level of background follows a Beta distribution, leading to a more conservative test

BGmod

a list of sizefact, sizefact, and countmat

probenum

a vector of numbers of probes in each gene

Value

a valid GeoMx S4 object including the following items

  • pvalues - Background score test pvalues, in featureData

  • scores - Background score test statistics, in featureData

if split is TRUE, a valid GeoMx S4 object including the following items

  • pvalues_XX - Background score test pvalues vector, column name (denoted as XX) the same as slide names, in featureData

  • scores_XX - Background score test statistics vector, column name (denoted as XX) the same as slide names, in featureData

a list of following items

  • pvalues - Background score test pvalues

  • scores - Background score test statistics

Examples


data(demoData)
demoData <- fitPoisBG(demoData, size_scale = "sum")
demoData <- aggreprobe(demoData, use = "cor")
demoData <- BGScoreTest(demoData, adj = 1, useprior = FALSE)
demoData <- fitPoisBG(demoData, size_scale = "sum", groupvar = "slide name")
demoData <- BGScoreTest(demoData, adj = 1, useprior = TRUE, split = TRUE)


Nanostring-Biostats/GeoDiff documentation built on April 11, 2024, 5:31 a.m.