This document explains the functionalities available in the a4Classif package.
This package contains for classification of Affymetrix microarray data, stored in an ExpressionSet
. This package integrates within the Automated Affymetrix Array Analysis suite of packages.
## Loading required package: a4Core
## Loading required package: a4Preproc
##
## a4Classif version 1.40.0
## Loading required package: Biobase
## Loading required package: BiocGenerics
## Loading required package: parallel
##
## Attaching package: 'BiocGenerics'
## The following objects are masked from 'package:parallel':
##
## clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
## clusterExport, clusterMap, parApply, parCapply, parLapply,
## parLapplyLB, parRapply, parSapply, parSapplyLB
## The following objects are masked from 'package:stats':
##
## IQR, mad, sd, var, xtabs
## The following objects are masked from 'package:base':
##
## Filter, Find, Map, Position, Reduce, anyDuplicated, append,
## as.data.frame, basename, cbind, colnames, dirname, do.call,
## duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
## lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
## pmin.int, rank, rbind, rownames, sapply, setdiff, sort, table,
## tapply, union, unique, unsplit, which.max, which.min
## Welcome to Bioconductor
##
## Vignettes contain introductory material; view with
## 'browseVignettes()'. To cite Bioconductor, see
## 'citation("Biobase")', and for packages 'citation("pkgname")'.
To demonstrate the functionalities of the package, the ALL
dataset is used. The genes are annotated thanks to the addGeneInfo
utility function of the a4Preproc
package.
data(ALL, package = "ALL")
ALL <- addGeneInfo(ALL)
## Loading required package: hgu95av2.db
## Loading required package: AnnotationDbi
## Loading required package: stats4
## Loading required package: IRanges
## Loading required package: S4Vectors
##
## Attaching package: 'S4Vectors'
## The following objects are masked from 'package:base':
##
## I, expand.grid, unname
## Loading required package: org.Hs.eg.db
##
##
ALL$BTtype <- as.factor(substr(ALL$BT,0,1))
resultLasso <- lassoClass(object = ALL, groups = "BTtype")
plot(resultLasso,
label = TRUE,
main = "Lasso coefficients in relation to degree of penalization."
)
topTable(resultLasso, n = 15)
## The lasso selected 16 genes. The top 15 genes are:
##
## Gene Coefficient
## 38319_at CD3D 0.95966733
## 35016_at CD74 -0.60928095
## 38147_at SH2D1A 0.49240967
## 35792_at MGLL 0.46856925
## 37563_at SRGAP3 0.26648240
## 38917_at YME1L1 0.25100075
## 40278_at GGA2 -0.25017550
## 41164_at IGHM -0.12387272
## 41409_at THEMIS2 -0.10581122
## 38242_at BLNK -0.10309606
## 35523_at HPGDS 0.10169706
## 38949_at PRKCQ 0.07832802
## 33316_at TOX 0.06963509
## 33839_at ITPR2 0.05801832
## 40570_at FOXO1 -0.04858863
resultPam <- pamClass(object = ALL, groups = "BTtype")
plot(resultPam,
main = "Pam misclassification error versus number of genes."
)
topTable(resultPam, n = 15)
## Pam selected 1 genes. The top 15 genes are:
##
## GeneSymbol B.score T.score av.rank.in.CV prop.selected.in.CV
## 38319_at CD3D -0.1693 0.4875 1 1
confusionMatrix(resultPam)
## predicted
## true B T
## B 95 0
## T 1 32
# select only a subset of the data for computation time reason
ALLSubset <- ALL[sample.int(n = nrow(ALL), size = 100, replace = TRUE), ]
resultRf <- rfClass(object = ALLSubset, groups = "BTtype")
plot(resultRf)
topTable(resultRf, n = 15)
## Random forest selected 7 genes. The top 15 genes are:
##
## GeneSymbol
## 32697_at IMPA1
## 35334_at GYG2
## 36629_at TSC22D3
## 39327_at PXDN
## 41423_at CLSTN3
## 41490_at PRPS2
## 41809_at TMEM243
ROCcurve(gene = "ABL1", object = ALL, groups = "BTtype")
## Warning in ROCcurve(gene = "ABL1", object = ALL, groups = "BTtype"): Gene ABL1 corresponds to 6 probesets; only the first probeset ( 1635_at ) has been displayed on the plot.
## R version 4.1.0 (2021-05-18)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.2 LTS
##
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.13-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.13-bioc/R/lib/libRlapack.so
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_GB LC_COLLATE=C LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## attached base packages:
## [1] stats4 parallel stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] hgu95av2.db_3.2.3 org.Hs.eg.db_3.13.0 AnnotationDbi_1.54.0 IRanges_2.26.0 S4Vectors_0.30.0 ALL_1.33.0 Biobase_2.52.0 BiocGenerics_0.38.0 a4Classif_1.40.0 a4Preproc_1.40.0 a4Core_1.40.0
##
## loaded via a namespace (and not attached):
## [1] KEGGREST_1.32.0 shape_1.4.6 xfun_0.23 bslib_0.2.5.1 splines_4.1.0 lattice_0.20-44 vctrs_0.3.8 htmltools_0.5.1.1 yaml_2.2.1 blob_1.2.1 survival_3.2-11 rlang_0.4.11 jquerylib_0.1.4 DBI_1.1.1 bit64_4.0.5 GenomeInfoDbData_1.2.6 foreach_1.5.1 zlibbioc_1.38.0 stringr_1.4.0 Biostrings_2.60.0 codetools_0.2-18
## [22] evaluate_0.14 memoise_2.0.0 knitr_1.33 varSelRF_0.7-8 fastmap_1.1.0 GenomeInfoDb_1.28.0 highr_0.9 pamr_1.56.1 Rcpp_1.0.6 ROCR_1.0-11 cachem_1.0.5 XVector_0.32.0 jsonlite_1.7.2 bit_4.0.4 png_0.1-7 digest_0.6.27 stringi_1.6.2 grid_4.1.0 tools_4.1.0 bitops_1.0-7 magrittr_2.0.1
## [43] sass_0.4.0 RCurl_1.98-1.3 glmnet_4.1-1 RSQLite_2.2.7 randomForest_4.6-14 cluster_2.1.2 pkgconfig_2.0.3 crayon_1.4.1 Matrix_1.3-3 rmarkdown_2.8 httr_1.4.2 iterators_1.0.13 R6_2.5.0 compiler_4.1.0