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
migale
affiliationExplorer
Commits
20b20eeb
Commit
20b20eeb
authored
Feb 13, 2020
by
mahendra-mariadassou
Browse files
Revert back to original names when exporting
parent
985a10dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
R/app_server.R
View file @
20b20eeb
...
...
@@ -85,7 +85,11 @@ app_server <- function(input, output, session) {
content
=
function
(
con
)
{
## Update taxonomy of object phyloseq
phyloseq
::
tax_table
(
physeq
)[
rownames
(
affiliations
$
cleaned
),
]
<-
affiliations
$
cleaned
## TODO revert short OTU names back to original names
## revert short OTU names back to original names
dict
<-
setNames
(
object
=
otu_dictionary
$
sequence
,
nm
=
otu_dictionary
$
OTU
)
phyloseq
::
taxa_names
(
physeq
)
<-
dict
[
phyloseq
::
taxa_names
(
physeq
)]
## Export
phyloseq.extended
::
write_phyloseq
(
physeq
=
physeq
,
biom_file
=
con
,
...
...
R/utils.R
View file @
20b20eeb
...
...
@@ -26,7 +26,7 @@ create_otu_dictionary <- function(physeq) {
abundance
=
phyloseq
::
taxa_sums
(
physeq
)
)
%>%
dplyr
::
arrange
(
desc
(
abundance
))
## If all taxa names are long, sequences are likely to have been processed by DADA
## If all taxa names are long, sequences are likely to have been processed by DADA
2
## Move OTU names to sequence column and rename OTU with shorter names
if
(
long_taxa_names
(
otu_dictionary
$
sequence
))
{
otu_dictionary
<-
otu_dictionary
%>%
...
...
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