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
umrf
ranomaly
Commits
c439e564
Commit
c439e564
authored
Nov 03, 2021
by
Etienne Rifa
Browse files
some fixes
fix message at ranomaly startup add message when no significant features in aggregate
parent
7acdfd87
Pipeline
#43906
passed with stage
in 12 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
NAMESPACE
View file @
c439e564
...
...
@@ -50,7 +50,6 @@ import(metagenomeSeq)
import(mixOmics)
import(pairwiseAdonis)
import(phyloseq)
import(plotly)
import(psadd)
import(reshape2)
import(scales)
...
...
@@ -63,10 +62,13 @@ importFrom(DECIPHER,AlignSeqs)
importFrom(DESeq2,DESeq)
importFrom(DESeq2,results)
importFrom(DESeq2,resultsNames)
importFrom(dplyr,`%>%`)
importFrom(dplyr,across)
importFrom(dplyr,arrange)
importFrom(dplyr,group_by)
importFrom(dplyr,group_map)
importFrom(dplyr,left_join)
importFrom(dplyr,mutate)
importFrom(ggpubr,ggtexttable)
importFrom(ggpubr,text_grob)
importFrom(ggpubr,ttheme)
...
...
@@ -95,7 +97,11 @@ importFrom(phangorn,NJ)
importFrom(phangorn,dist.ml)
importFrom(phangorn,phyDat)
importFrom(phangorn,pml)
importFrom(plotly,config)
importFrom(plotly,ggplotly)
importFrom(plotly,layout)
importFrom(plotly,plot_ly)
importFrom(plotly,subplot)
importFrom(ranacapa,ggrare)
importFrom(reshape2,melt)
importFrom(tibble,rownames_to_column)
...
...
R/aggregate_fun.R
View file @
c439e564
...
...
@@ -274,10 +274,9 @@ aggregate_fun <- function(data = data, metacoder = NULL, deseq = NULL, mgseq = N
# print(TABfinal)
if
(
length
(
TABfinal
)
>
0
){
if
(
length
(
TABfinal
$
ListAllOtu
)
>
0
){
flog.info
(
'Building csv file...'
)
TAX
<-
cbind
(
seqid
=
rownames
(
ttax
[
as.character
(
TABfinal
$
ListAllOtu
),]),
as.data.frame
(
ttax
[
as.character
(
TABfinal
$
ListAllOtu
),]))
sseq
<-
cbind
(
seqid
=
row.names
(
as.data.frame
(
sseq
)),
as.data.frame
(
sseq
))
...
...
@@ -328,7 +327,7 @@ aggregate_fun <- function(data = data, metacoder = NULL, deseq = NULL, mgseq = N
# save(data, file=paste(output,"/signif_phyloseq.rdata",sep=""))
#
}
}
else
{
flog.info
(
"No significant results in the three methods..."
)}
}
R/bars_fun.R
View file @
c439e564
...
...
@@ -7,7 +7,7 @@
#'
#' @return A plotly graph.
#'
#' @import plotly
#' @import
From
plotly
ggplotly
#' @importFrom ranacapa ggrare
#'
#' @export
...
...
@@ -73,10 +73,10 @@ aggregate_top_taxa <- function (x, top, level){
#'
#' @return Returns barplots in an interactive plotly community plot
#'
#' @import plotly
#' @import
From
plotly
ggplotly plot_ly layout subplot
#' @importFrom reshape2 melt
#' @importFrom gtools mixedsort
#' @importFrom dplyr group_map group_by across
#' @importFrom dplyr group_map group_by across
`%>%` mutate arrange
#'
#'
#' @export
...
...
@@ -221,8 +221,8 @@ if( all(Ord1 != sample_variables(data))){
meltdat
$
sample.id
=
factor
(
meltdat
$
sample.id
,
levels
=
unique
(
meltdat
$
sample.id
))
# keep sample ids order from metadata.
}
p1
=
meltdat
%>%
arrange
(
across
({
Ord1
}))
%>%
group_by
(
across
({
Ord1
}))
%>%
mutate
(
across
(
where
(
is.character
),
as.factor
))
%>%
p1
=
meltdat
%>%
dplyr
::
arrange
(
across
({
Ord1
}))
%>%
dplyr
::
group_by
(
across
({
Ord1
}))
%>%
dplyr
::
mutate
(
across
(
where
(
is.character
),
as.factor
))
%>%
dplyr
::
group_map
(
~
plot_ly
(
data
=
.
,
x
=
~
sample.id
,
y
=
~
value
,
type
=
'bar'
,
name
=
~
variable
,
color
=
~
variable
,
legendgroup
=
~
variable
,
...
...
@@ -230,13 +230,13 @@ if( all(Ord1 != sample_variables(data))){
keep
=
TRUE
)
%>%
subplot
(
nrows
=
1
,
shareX
=
TRUE
,
shareY
=
TRUE
,
titleX
=
FALSE
)
%>%
layout
(
title
=
""
,
xaxis
=
list
(
title
=
glue
(
"{Ord1} =
{levels(meltdat[, Ord1])[1]}"
)),
xaxis
=
list
(
title
=
glue
(
"{Ord1} =
\n
{levels(meltdat[, Ord1])[1]}"
)),
yaxis
=
list
(
title
=
ylab
),
barmode
=
'stack'
)
for
(
i
in
2
:
length
(
unique
(
meltdat
[,
Ord1
])))
{
p1
$
x
$
layoutAttrs
[[
1
]][[
paste0
(
"xaxis"
,
i
)]]
=
NULL
p1
$
x
$
layoutAttrs
[[
1
]][[
paste0
(
"xaxis"
,
i
)]]
$
title
<-
glue
(
"{Ord1} =
{levels(meltdat[, Ord1])[i]}"
)
p1
$
x
$
layoutAttrs
[[
1
]][[
paste0
(
"xaxis"
,
i
)]]
$
title
<-
glue
(
"{Ord1} =
\n
{levels(meltdat[, Ord1])[i]}"
)
}
if
(
!
is.null
(
outfile
)){
htmlwidgets
::
saveWidget
(
p1
,
outfile
)
...
...
R/diversity_beta_light.R
View file @
c439e564
...
...
@@ -20,7 +20,7 @@
#' @import ggplot2
#' @import pairwiseAdonis
#' @import vegan
#' @importFrom plotly ggplotly
#' @importFrom plotly ggplotly
config
#'
#' @export
...
...
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