Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amine GHOZLANE
shaman
Commits
4f7fed66
Commit
4f7fed66
authored
Aug 03, 2016
by
Amine GHOZLANE
Browse files
Debug biom file load, change biomformat library
parent
adc4f32a
Changes
2
Hide whitespace changes
Inline
Side-by-side
LoadPackages.R
View file @
4f7fed66
...
...
@@ -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
)
...
...
internal.R
View file @
4f7fed66
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment