annotation: Decoding and Encoding Phylogenetic Classification Annotations

Description Usage Arguments Value Examples

Description

Functions to represent, decode and encode phylogenetic classification annotations used in FASTA files by RDP and the Greengenes project.

Usage

1
2
3
4
5
6
7
GenClass16S(Kingdom=NA, Phylum=NA, Class=NA, Order=NA,
            Family=NA, Genus=NA, Species=NA, Otu=NA, 
            Org_name=NA, Id=NA)
decode_RDP(annotation)
encode_RDP(classification)
decode_Greengenes(annotation)
encode_Greengenes(classification)

Arguments

Kingdom

Name of the kingdom to which the organism belongs.

Phylum

Name of the phylum to which the organism belongs.

Class

Name of the class to which the organism belongs.

Order

Name of the order to which the organism belongs.

Family

Name of the family to which the organism belongs.

Genus

Name of the genus to which the organism belongs.

Species

Name of the species to which the organism belongs.

Otu

Name of the otu to which the organism belongs.

Org_name

Name of the organism.

Id

ID of the sequence.

annotation

Annotation from a FASTA file containing the classification information.

classification

A data.frame created with GenClass16S() with the classification information.

Value

GenClass16S() and decodeX() return a data.frame. encodeX() returns a string with the corresponding annotation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
seq <- readRNAStringSet(system.file("examples/RNA_example.fasta",
	package="rRDP"))

### the FASTA annotation is read as names. This data has a Greengenes format
### annotation
names(seq)
  
classification <- decode_Greengenes(names(seq))  
classification

### look at the Genus of all sequences
classification[, "Genus"]  
  
### to train the RDP classifier, the annotations need to be in RDP format
annotation <- encode_RDP(classification)
names(seq) <- annotation
seq  

### now we can train the classifier
customRDP <- trainRDP(seq)
customRDP
  
## clean up
removeRDP(customRDP)

rRDP documentation built on Nov. 17, 2017, 12:47 p.m.