compareMSI_hc_sub: Fit hiearchical spatial model to MSI data, with improved...

Description Usage Arguments Value

Description

compareMSI_hc is used to fit a hiearchical Bayesian spatial model to MSI data using a Gibbs Sampler MCMC approach. The model is fit separately for each m/z feature. This version is distinct from compareMSI because it uses hiearchical centering to improve mixing of the MCMC. This function will be called by msiCompare if the MSImageSet is a multi tissue experiment with all tissues coming from the same donor or all from different donors.

Usage

1
2
3
4
5
6
7
compareMSI_hc_sub(msset, conditionOfInterest, feature, nsim = 5000,
  burnin = 2500, trace = T, piPrior = 0.1, seed = 1, logbase2 = F,
  coord = NULL, type.neighbor = "radius", radius.neighbor = 1,
  maxdist.neighbor = NULL, spInit = NULL, bioRep = NULL, techRep,
  beta0 = 0, prec0 = 0.01, precAlpha0 = 0.01, a0_eps = 0.001,
  b0_eps = 0.001, a0_bio = 0.001, b0_bio = 0.001, a0_tec = 0.001,
  b0_tec = 0.001, a0_sp = 0.001, b0_sp = 0.001, rd = 1e-05)

Arguments

msset

an object of class "MSImageSet"

conditionOfInterest

a vector or factor giving the level of the condition of interest for each pixel in msset

feature

the index of the m/z features for which the model should be fit

nsim

number of desired MCMC samples

burnin

number of MCMC samples to discard

trace

logical, should the full list of MCMC samples be returned for each variable?

piPrior

prior probability of differential abundance

seed

random seed

logbase2

logical, should the intensities be log transformed?

coord

data fram of coordinates of the MSImageSet, with columns 'x' and 'y'

type.neighbor

neighborhood type (see adj.grid)

radius.neighbor

desired neighborhood radius if neighborhood type 'radius' is selected (see adj.grid)

maxdist.neighbor

maximum distance for locations to be considered neighbors if neighborhood type 'max.dist' is selected (see adj.grid)

spInit

optional, provide precomputed spatial information from output of intializeSpatial

bioRep

optional, vector or factor giving the individual/donor to which pixel in the msset belongs

techRep

vector or factor giving the tissue to which each pixel in the msset belongs

beta0

prior mean of baseline effect

prec0

prior variance of baseline effect

precAlpha0

prior mean of condition 2 effect

a0_eps

shape parameter for measurment error precision hyperprior

b0_eps

scale parameter for measurment error precision hyperprior

a0_bio

shape parameter for biological replicate error precision hyperprior

b0_bio

scale parameter for biological replicate error precision hyperprior

a0_tec

shape parameter for sample to sample error precision hyperprior

b0_tec

scale parameter for sample to sample error precision hyperprior

a0_sp

shape parameter for spatial precision hyperprior

b0_sp

scale parameter for spatial precision hyperprior

rd

ratio of spike variance to slab variance for condition 2 effect

Value

res


ajharry/msiCompare documentation built on May 28, 2019, 4:53 p.m.