refpkg: Summary data and plots for reference packages

Description Usage Arguments Value Author(s) References Examples

Description

Summary data and plots for reference packages

Usage

1
2
3
4
5
refpkg(refpkg_path,type="summary",rank_tree="species",
rank_pie=c("phylum","class","order","family","genus"),
scale_pie=TRUE,alpha_order=TRUE,cex.text=0.7,
cex.legend=1,asb=TRUE,rotate_label=TRUE,
out_krona="for_krona.txt",text2krona=NULL)

Arguments

refpkg_path

The path of the reference package directory

type

The type of summary to perform with "summary", "taxonomy", "info", "tree", "pie" or "krona" available

rank_tree

The desired rank for tree coloring

rank_pie

The ranks to be plot for the taxonomy pie chart

scale_pie

Wether or not to take into account the number of sequences available within the reference package for the pie chart

alpha_order

Wether or not the color should follow taxa alpahabetic order when type set to "tree"

cex.text

The tip labels cex parameter when type is set to "tree" and the text cex parameter when type is set to "pie"

cex.legend

The size of the legend when type set to "tree"

asb

Add a scale bar on the tree

rotate_label

Rotates the pie slice labels

out_krona

The name of the output file when type is set to "krona".

text2krona

The full path to the krona "ImportText.pl" script when KronaTools is installed and you wish to directly produce the html krona file.

Value

A summary print on screen when type set to "summary". A data frame when type set to "taxonomy" or "info". A file written to the disk when type is set to "krona". A plot otherwise.

Author(s)

pierre lefeuvre

References

https://github.com/marbl/Krona/wiki/KronaTools http://fhcrc.github.io/taxtastic/

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
25
26
refpkg_path <- paste(find.package("BoSSA"),"/extdata/example.refpkg",sep="")

### summary
refpkg(refpkg_path)

### taxonomy
taxonomy <- refpkg(refpkg_path,type="taxonomy")
head(taxonomy)

### info
refpkg(refpkg_path,type="info")

### tree
refpkg(refpkg_path,type="tree",rank_tree="order",cex.text=0.5)

### pie
refpkg(refpkg_path,type="pie",rank_pie=c("class","order","family"),cex.text=0.6)

### krona
# it will produce a flat text file
# this file can be use as input for the the "ImportText.pl" krona script
# see https://github.com/marbl/Krona/wiki/KronaTools for more details on krona
## Not run: 
refpkg(refpkg_path,type="krona",out_krona="for_krona.txt")

## End(Not run)

BoSSA documentation built on Oct. 23, 2020, 7:55 p.m.