DECIPHER logo

  • Alignment▸
  • Classification▸
  • Homology▸
  • Oligo Design▸
  • Phylogenetics▸
  • Tutorials▾
  • Examples Gallery
  • Documentation
  • R Lessons
  • Bioinformatics
  • Home
  • News
  • Downloads
  • Contact
  • Citations

Gallery - Example 8

Below is the R code to reproduce the example:

Hide output
library(DECIPHER)
Loading required package: Biostrings
Loading required package: BiocGenerics

Attaching package: ‘BiocGenerics’
The following objects are masked from ‘package:stats’:
IQR, mad, sd, var, xtabs
The following objects are masked from ‘package:base’:
anyDuplicated, aperm, append, as.data.frame, basename, cbind, colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind, Reduce, rownames, sapply, setdiff, table, tapply, union, unique, unsplit, which.max, which.min
Loading required package: S4Vectors Loading required package: stats4
Attaching package: ‘S4Vectors’
The following object is masked from ‘package:utils’:
findMatches
The following objects are masked from ‘package:base’:
expand.grid, I, unname
Loading required package: IRanges Loading required package: XVector Loading required package: GenomeInfoDb
Attaching package: ‘Biostrings’
The following object is masked from ‘package:base’:
strsplit
> > load("GTDB_r220-mod_April2024.RData", verbose=TRUE) Loading objects: trainingSet > > # import test sequences > fas <- system.file("extdata", "Bacteria_175seqs.fas", package="DECIPHER") > dna <- readDNAStringSet(fas) > > # remove any gaps in the sequences > dna <- RemoveGaps(dna) > > # classify the test sequences > ids <- IdTaxa(dna, trainingSet, strand="top", processors=NULL) |========================================| 100%
Time difference of 13.42 secs
> ids A test set of class 'Taxa' with length 175 confidence name taxon [1] 79% uncultured bacter... Root; Bac... [2] 91% uncultured bacter... Root; Bac... [3] 94% uncultured bacter... Root; Bac... [4] 95% uncultured bacter... Root; Bac... [5] 60% uncultured bacter... Root; Bac... ... ... ... ... [171] 41% uncultured bacter... Root; unc... [172] 87% uncultured bacter... Root; Bac... [173] 33% uncultured bacter... Root; unc... [174] 56% uncultured bacter... Root; unc... [175] 59% uncultured bacter... Root; unc... > > # view the results > plot(ids)