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
024667b2
Commit
024667b2
authored
Jan 21, 2020
by
mahendra-mariadassou
Browse files
Fix bug with n() when dplyr is not loaded
parent
13236bc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
R/utils.R
View file @
024667b2
...
...
@@ -29,7 +29,8 @@ create_otu_dictionary <- function(physeq) {
## If all taxa names are long, sequences are likely to have been processed by DADA
## Move OTU names to sequence column and rename OTU with shorter names
if
(
long_taxa_names
(
otu_dictionary
$
sequence
))
{
otu_dictionary
<-
otu_dictionary
%>%
dplyr
::
mutate
(
OTU
=
paste0
(
"ASV"
,
1
:
n
()))
otu_dictionary
<-
otu_dictionary
%>%
dplyr
::
mutate
(
OTU
=
paste0
(
"ASV"
,
1
:
nrow
(
otu_dictionary
)))
}
else
{
otu_dictionary
<-
otu_dictionary
%>%
dplyr
::
mutate
(
OTU
=
sequence
)
}
...
...
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