Phemd-methods {phemd} | R Documentation

## Setter function for protein / gene markers

### Description

Setter function for protein / gene markers

Setter function for stored expression data

Setter function for single-cell expression data aggregated from multiple samples

Setter function for indices of cells subsampled from each sample during aggregation

Setter function for boolean denoting whether cells were subsampled from each sample during aggregation

Setter function for Monocle2 CellDataSet object for experiment

Setter function for Seurat object for experiment

Setter function for cell subtype frequencies of each single-cell sample

Setter function for batch IDs of each single-cell sample

Setter function for EMD ground distance matrix

### Usage

    selectMarkers(obj) <- value

    ## S4 replacement method for signature 'Phemd'
    selectMarkers(obj) <- value

    rawExpn(obj) <- value

    ## S4 replacement method for signature 'Phemd'
    rawExpn(obj) <- value

    pooledCells(obj) <- value

    ## S4 replacement method for signature 'Phemd'
    pooledCells(obj) <- value

    subsampledIdx(obj) <- value

    ## S4 replacement method for signature 'Phemd'
    subsampledIdx(obj) <- value

    subsampledBool(obj) <- value

    ## S4 replacement method for signature 'Phemd'
    subsampledBool(obj) <- value

    monocleInfo(obj) <- value

    ## S4 replacement method for signature 'Phemd'
    monocleInfo(obj) <- value

    seuratInfo(obj) <- value

    ## S4 replacement method for signature 'Phemd'
    seuratInfo(obj) <- value

    celltypeFreqs(obj) <- value

    ## S4 replacement method for signature 'Phemd'
    celltypeFreqs(obj) <- value

    batchIDs(obj) <- value

    ## S4 replacement method for signature 'Phemd'
    batchIDs(obj) <- value

    GDM(obj) <- value

    ## S4 replacement method for signature 'Phemd'
    GDM(obj) <- value

### Arguments

`obj` | A Phemd object
`value` | Assignment object

### Value

Updated Phemd object

Updated Phemd object

Updated Phemd object

Updated Phemd object

Updated Phemd object

Updated Phemd object containing Seurat object

Updated Phemd object

Updated Phemd object

Updated Phemd object

### Examples

    phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
    new_genes <- all_genes
    new_genes[1] <- 'IL2R'
    selectMarkers(phemdObj) <- new_genes

    phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
    new_expn_data <- all_expn_data
    new_expn_data <- lapply(new_expn_data, function(x) {log2(x+1)})
    rawExpn(phemdObj) <- new_expn_data

    phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
    aggregated_data <- t(do.call(rbind,all_expn_data))
    pooledCells(phemdObj) <- aggregated_data

    phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
    subsampledIdxList<- rep(list(1:10), length(all_expn_data)) #subsampled cells 1-10 from each sample
    subsampledIdx(phemdObj) <- subsampledIdxList

    phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
    subsampledBool(phemdObj) <- TRUE

    phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
    mydata <- pooledCells(phemdObj)
    myCellDataSet <- newCellDataSet(mydata,phenoData=NULL, expressionFamily=VGAM::negbinomial.size())
    monocleInfo(phemdObj) <- myCellDataSet

    phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
    my_seuratObj <- Seurat::CreateSeuratObject(counts = t(all_expn_data[[1]]), project = "A")
    seuratInfo(phemdObj) <- my_seuratObj

    phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
    myCellTypeFreqs <- matrix(rexp(length(all_expn_data)*10, rate=.1), ncol=10)
    myCellTypeFreqs <- apply(myCellTypeFreqs, 1, function(x) {x / sum(x)})
    celltypeFreqs(phemdObj) <- myCellTypeFreqs

    phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
    my_seuratObj <- Seurat::CreateSeuratObject(counts = t(all_expn_data[[1]]), project = "A")
    seuratInfo(phemdObj) <- my_seuratObj
    batchIDs(phemdObj) <- rep('A', length(all_expn_data))

    phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
    cluster_locs <- 1:10
    myGDM <- as.matrix(dist(cluster_locs))
    GDM(phemdObj) <- myGDM

[Package phemd version 1.1.1 Index]