Description Usage Arguments Value Examples
View source: R/getRelevantGenes.R
This function returns a subset of the AIBSARNA dataset, containing only
the genes in data
, which may be a vector, a SummarizedExperiment
or derivative assay()
and rowData()
, or a CellScabbard.
If a vector is used, it must consist of numerical gene expression values
with names comparable to one column of identifiers present in AIBSARNA.
If data
is a CellScabbard, results are stored in the relevantGenes
slot of the object.
1 2 3 4 5 6 7 | getRelevantGenes(
data,
dataSetId = NULL,
AIBSARNA = NULL,
AIBSARNAid = c("gene_id", "ensembl_gene_id", "gene_symbol", "entrez_id",
"refseq_ids")
)
|
data |
a vector of named gene expression values, or a compatible data set |
dataSetId |
(Optional) If |
AIBSARNA |
an instance of the AIBSARNA dataset, built using the
|
AIBSARNAid |
the name of the column of rowData(AIBSARNA) that is comparable to dataSetId. One of "gene_id", "ensembl_gene_id", "gene_symbol", "entrez_id", "refseq_ids" |
a SummarizedExperiment consisting of genes in data
, sorted
to match the order of the genes in data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | AIBSARNA <- buildAIBSARNA(mini = TRUE)
# Example 1 - using CellScabbard class
# get a random sample of 3 genes
totalGenes <- nrow(AIBSARNA)
gene_idx <- sample.int(totalGenes, 3)
sample_idx <- c(1,3,5)
# Subset AIBSARNA
exprs <- assay(AIBSARNA)[gene_idx, sample_idx]
fd <- rowData(AIBSARNA)[gene_idx, ]
pd <- colData(AIBSARNA)[sample_idx, ]
# build a trimmed data set
myGenes <- CellScabbard(exprsData = exprs, phenoData = pd, featureData = fd,
AIBSARNA = AIBSARNA, autoTrim = TRUE)
relevantGenes(myGenes)
# Example 2 - manual gene selection and relevant gene extraction
myGenes <- c(4.484885, 0.121902, 0.510035)
names(myGenes) <- c("TSPAN6", "DPM1", "C1orf112")
myGeneSet <- getRelevantGenes(myGenes, AIBSARNA = AIBSARNA,
AIBSARNAid = "gene_symbol")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.