Commit 4f7fed66 authored by Amine  GHOZLANE's avatar Amine GHOZLANE
Browse files

Debug biom file load, change biomformat library

parent adc4f32a
......@@ -47,16 +47,17 @@ if (!require(d3heatmap)) {
library(d3heatmap)
}
if (!require(biom)) {
install.packages('biom')
library(biom)
}
if (!require(devtools)) {
install.packages('devtools')
library(devtools)
}
# Let us use biomformat instead of biom
if (!require(biomformat)){
library(biomformat)
devtools::install_github("biomformat", "aghozlane")
}
if (!require(scatterD3)) {
install.packages('scatterD3')
library(scatterD3)
......
......@@ -125,15 +125,14 @@ CheckCountsTable <- function(counts)
## Taxonomy table
taxo = as.data.frame(observation_metadata(dataBIOM))
OTUnames = rownames(taxo)
## Modif taxo table (remove p__,... and change the colnames)
taxo = as.data.frame(sapply(taxo,gsub,pattern="^.*__",replacement=""))
colnames(taxo) = c("Kingdom", "Phylum","Class","Order","Family","Genus","Species")
rownames(taxo) = OTUnames
## Remove empty row
taxo[taxo==""] = NA
taxo = na.omit(taxo)
taxo[taxo=="Unassigned"] = NA
taxo=taxo[rowSums(is.na(taxo))!=dim(taxo)[2], ]
CheckTaxo = CheckTaxoTable(taxo,counts)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment