Title: | Sample Classifier |
---|---|
Description: | The package is designed to classify microarray RNA-seq gene expression profiles. |
Authors: | Khadija El Amrani [aut, cre] |
Maintainer: | Khadija El Amrani <[email protected]> |
License: | Artistic-2.0 |
Version: | 1.31.0 |
Built: | 2024-11-25 06:14:30 UTC |
Source: | https://github.com/bioc/sampleClassifier |
The package is designed to classify samples from microarray and RNA-seq gene expression datasets.
Package: | sampleClassifier |
Type: | Package |
Version: | 1.0.0 |
License: | GPL-3 |
Khadija El Amrani Maintainer: Khadija El Amrani <[email protected]>
## Not run: library(sampleClassifierData) data("se_micro_refmat") micro_refmat <- assay(se_micro_refmat) data("se_micro_testmat") micro_testmat <- assay(se_micro_testmat) res1.list <- classifyProfile(ref_matrix=micro_refmat, query_mat=micro_testmat, chip1="hgu133plus2",chip2="hgu133a", write2File=FALSE) res1.list ## End(Not run)
## Not run: library(sampleClassifierData) data("se_micro_refmat") micro_refmat <- assay(se_micro_refmat) data("se_micro_testmat") micro_testmat <- assay(se_micro_testmat) res1.list <- classifyProfile(ref_matrix=micro_refmat, query_mat=micro_testmat, chip1="hgu133plus2",chip2="hgu133a", write2File=FALSE) res1.list ## End(Not run)
Function to classify microarray gene expression profiles
classifyProfile(ref_matrix, query_mat, chip1 = "hgu133plus2", chip2 = "hgu133a", fun1 = median, fun2 = mean, write2File=FALSE, out.dir=getwd())
classifyProfile(ref_matrix, query_mat, chip1 = "hgu133plus2", chip2 = "hgu133a", fun1 = median, fun2 = mean, write2File=FALSE, out.dir=getwd())
ref_matrix |
Normalized microarray data matrix to be used as reference, with probe sets corresponding to rows and samples corresponding to columns. |
query_mat |
Normalized microarray query matrix to be classified, with probe sets corresponding to rows and samples corresponding to columns. |
chip1 |
Chip name of the reference matrix. |
chip2 |
Chip name of the query matrix. This parameter can be ignored if the reference and query matrix are from the same chip. |
fun1 |
mean or median. This will specify the number of marker genes that will be used for classification. Default is median. |
fun2 |
mean or median. This will be used to summarize the expression values of probe sets that belong to the same gene. This parameter can be ignored if the reference and query matrix are from the same chip. Default is mean. |
write2File |
If TRUE, the classification results for each query profile will be written to a file. |
out.dir |
Path to a directory to write the classification results, default is the current working directory. |
Each query profile is compared to all sample types in the reference matrix and a similarity score is calculated. The similarity score is based on the number of marker genes that are shared between the query and the reference. These marker genes are given in a file if write2File is TRUE.
A list with top hits for each query profile, sorted according to a similarity score.
Khadija El Amrani <[email protected]>
see also getMarkerGenes
.
library(sampleClassifierData) data("se_micro_refmat") micro_refmat <- assay(se_micro_refmat) data("se_micro_testmat") micro_testmat <- assay(se_micro_testmat) res1.list <- classifyProfile(ref_matrix=micro_refmat, query_mat=micro_testmat, chip1="hgu133plus2",chip2="hgu133a", write2File=FALSE) res1.list
library(sampleClassifierData) data("se_micro_refmat") micro_refmat <- assay(se_micro_refmat) data("se_micro_testmat") micro_testmat <- assay(se_micro_testmat) res1.list <- classifyProfile(ref_matrix=micro_refmat, query_mat=micro_testmat, chip1="hgu133plus2",chip2="hgu133a", write2File=FALSE) res1.list
Function to classify RNA-seq gene expression profiles
classifyProfile.rnaseq(ref_matrix, query_mat, gene.ids.type="ensembl", fun1 = median, write2File=FALSE, out.dir=getwd())
classifyProfile.rnaseq(ref_matrix, query_mat, gene.ids.type="ensembl", fun1 = median, write2File=FALSE, out.dir=getwd())
ref_matrix |
RNA-seq data matrix to be used as reference, with genes corresponding to rows and samples corresponding to columns. |
query_mat |
RNA-seq query matrix to be classified, with genes corresponding to rows and samples corresponding to columns. |
gene.ids.type |
Type of the used gene identifiers, the following gene identifiers are supported: ensembl, refseq and ucsc gene ids. Default is ensembl. |
fun1 |
mean or median. This will specify the number of marker genes that will be used for classification. Default is median. |
write2File |
A logical value. If TRUE the classification results will be written to a file. |
out.dir |
Path to the directory, in which to write the results. Default is the actual working directory. |
Each query profile is compared to all sample types in the reference matrix and a similarity score is calculated. The similarity score is based on the number of marker genes that are shared between the query and the reference. These marker genes are given in a file if write2File is TRUE.
A list with top hits for each query profile, sorted according to a similarity score.
Khadija El Amrani <[email protected]>
library(sampleClassifierData) data("se_rnaseq_refmat") rnaseq_refmat <- assay(se_rnaseq_refmat) data("se_rnaseq_testmat") rnaseq_testmat <- assay(se_rnaseq_testmat) res2.list <- classifyProfile.rnaseq(ref_matrix=rnaseq_refmat, query_mat=rnaseq_testmat, gene.ids.type="ensembl",write2File=FALSE) res2.list
library(sampleClassifierData) data("se_rnaseq_refmat") rnaseq_refmat <- assay(se_rnaseq_refmat) data("se_rnaseq_testmat") rnaseq_testmat <- assay(se_rnaseq_testmat) res2.list <- classifyProfile.rnaseq(ref_matrix=rnaseq_refmat, query_mat=rnaseq_testmat, gene.ids.type="ensembl",write2File=FALSE) res2.list
Function to classify RNA-seq gene expression profiles using support vector machines (SVM)
classifyProfile.rnaseq.svm(ref_matrix, query_mat, gene.ids.type="ensembl", fun1 = median)
classifyProfile.rnaseq.svm(ref_matrix, query_mat, gene.ids.type="ensembl", fun1 = median)
ref_matrix |
RNA-seq data matrix to be used as reference, with genes corresponding to rows and samples corresponding to columns. |
query_mat |
RNA-seq query matrix to be classified, with genes corresponding to rows and samples corresponding to columns. |
gene.ids.type |
Type of the used gene identifiers, the following gene identifiers are supported: ensembl, refseq and ucsc gene ids. Default is ensembl. |
fun1 |
mean or median. This will specify the number of marker genes that will be used for classification. Default is median. |
This function is based on the function svm from the R-package 'e1071'.
A data frame with the predicted classes for each query profile.
Khadija El Amrani <[email protected]>
library(sampleClassifierData) data("se_rnaseq_refmat") rnaseq_refmat <- assay(se_rnaseq_refmat) data("se_rnaseq_testmat") rnaseq_testmat <- assay(se_rnaseq_testmat) res2.svm.df <- classifyProfile.rnaseq.svm(ref_matrix=rnaseq_refmat, query_mat=rnaseq_testmat, gene.ids.type="ensembl") res2.svm.df
library(sampleClassifierData) data("se_rnaseq_refmat") rnaseq_refmat <- assay(se_rnaseq_refmat) data("se_rnaseq_testmat") rnaseq_testmat <- assay(se_rnaseq_testmat) res2.svm.df <- classifyProfile.rnaseq.svm(ref_matrix=rnaseq_refmat, query_mat=rnaseq_testmat, gene.ids.type="ensembl") res2.svm.df
Function to classify microarray gene expression profiles using support vector machines (SVM)
classifyProfile.svm(ref_matrix, query_mat, chip1 = "hgu133plus2", chip2 = "hgu133a", fun1 = median, fun2 = mean)
classifyProfile.svm(ref_matrix, query_mat, chip1 = "hgu133plus2", chip2 = "hgu133a", fun1 = median, fun2 = mean)
ref_matrix |
Normalized microarray data matrix to be used as reference, with probe sets corresponding to rows and samples corresponding to columns. |
query_mat |
Normalized microarray query matrix to be classified, with probe sets corresponding to rows and samples corresponding to columns. |
chip1 |
Chip name of the reference matrix. |
chip2 |
Chip name of the query matrix. This parameter can be ignored if the reference and query matrix are from the same chip. |
fun1 |
mean or median. This will specify the number of marker genes that will be used for classification. Default is median. |
fun2 |
mean or median. This will be used to summarize the expression values of probe sets that belong to the same gene. This parameter can be ignored if the reference and query matrix are from the same chip. Default is mean. |
This function is based on the function svm from the R-package 'e1071'.
A data frame with the predicted classes for each query profile.
Khadija El Amrani <[email protected]>
see also getMarkerGenes
.
library(sampleClassifierData) data("se_micro_refmat") micro_refmat <- assay(se_micro_refmat) data("se_micro_testmat") micro_testmat <- assay(se_micro_testmat) res1.svm.df <- classifyProfile.svm(ref_matrix=micro_refmat, query_mat=micro_testmat, chip1="hgu133plus2",chip2="hgu133a") res1.svm.df
library(sampleClassifierData) data("se_micro_refmat") micro_refmat <- assay(se_micro_refmat) data("se_micro_testmat") micro_testmat <- assay(se_micro_testmat) res1.svm.df <- classifyProfile.svm(ref_matrix=micro_refmat, query_mat=micro_testmat, chip1="hgu133plus2",chip2="hgu133a") res1.svm.df
Function to display the classification predictions as a heatmap
get.heatmap(res.list)
get.heatmap(res.list)
res.list |
the result list returned by the function |
This function is based on the function ggplot from the R-package 'ggplot2'.
This function is used only for the side effect of creating a heatmap.
Khadija El Amrani <[email protected]>
library(sampleClassifierData) data("se_micro_refmat") micro_refmat <- assay(se_micro_refmat) data("se_micro_testmat") micro_testmat <- assay(se_micro_testmat) res1.list <- classifyProfile(ref_matrix=micro_refmat, query_mat=micro_testmat, chip1="hgu133plus2",chip2="hgu133a", write2File=FALSE) get.heatmap(res1.list)
library(sampleClassifierData) data("se_micro_refmat") micro_refmat <- assay(se_micro_refmat) data("se_micro_testmat") micro_testmat <- assay(se_micro_testmat) res1.list <- classifyProfile(ref_matrix=micro_refmat, query_mat=micro_testmat, chip1="hgu133plus2",chip2="hgu133a", write2File=FALSE) get.heatmap(res1.list)