Skip to content
GitLab
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
e676c88e
Commit
e676c88e
authored
Sep 12, 2019
by
Amine GHOZLANE
Browse files
Be sure to use DESeq2shaman and improvement of treeweight
parent
73cdf25b
Changes
3
Show whitespace changes
Inline
Side-by-side
Rfunctions/Stat_Model.R
View file @
e676c88e
...
...
@@ -35,7 +35,7 @@ GetInteraction2 <- function(target,VarInt)
## Get the dds object of DESeq2
Get_dds_object
<-
function
(
input
,
counts
,
target
,
design
,
normFactorsOTU
,
CT_noNorm
,
CT_Norm
,
tree
=
NULL
)
{
dds
<-
DESeqDataSetFromMatrix
(
countData
=
counts
,
colData
=
target
,
design
=
design
,
ignoreRank
=
TRUE
)
dds
<-
DESeq2shaman
::
DESeqDataSetFromMatrix
(
countData
=
counts
,
colData
=
target
,
design
=
design
,
ignoreRank
=
TRUE
)
sizeFactors
(
dds
)
=
normFactorsOTU
ddstmp
=
NULL
...
...
@@ -63,18 +63,18 @@ Get_dds_object <- function(input,counts,target,design,normFactorsOTU,CT_noNorm,C
# dds <- nbinomWaldTest(dds,modelMatrixType = "expanded")
if
(
nrow
(
counts
)
*
nrow
(
target
)
>=
50000
)
{
dds
=
DESeq
(
dds
,
fitType
=
input
$
fitType
,
parallel
=
TRUE
,
minReplicatesForReplace
=
Inf
)
dds
=
DESeq2shaman
::
DESeq
(
dds
,
fitType
=
input
$
fitType
,
parallel
=
TRUE
,
minReplicatesForReplace
=
Inf
)
# try(DESeq(dds,fitType=input$fitType,parallel = TRUE,minReplicatesForReplace = Inf) ->ddstmp,silent = TRUE)
# if(!is.null(ddstmp)) dds = ddstmp
}
if
(
nrow
(
counts
)
*
nrow
(
target
)
<
50000
||
is.null
(
dds
))
{
dds
<-
estimateDispersions
(
dds
,
fitType
=
input
$
fitType
)
dds
<-
nbinomWaldTest
(
dds
)
dds
<-
DESeq2shaman
::
estimateDispersions
(
dds
,
fitType
=
input
$
fitType
)
dds
<-
DESeq2shaman
::
nbinomWaldTest
(
dds
)
}
# dds <- DESeq(dds,fitType=input$fitType,modelMatrixType = "expanded",parallel = TRUE)
# }
countsNorm
=
counts
(
dds
,
normalized
=
TRUE
)
countsNorm
=
DESeq2shaman
::
counts
(
dds
,
normalized
=
TRUE
)
#save(dds,file="dds.RData")
...
...
Rfunctions/VisuPlot.R
View file @
e676c88e
...
...
@@ -844,7 +844,7 @@ Plot_Visu_Tree <- function(input,resDiff,CT_Norm_OTU,taxo_table)
nodeFind
=
input
$
selectTaxoPlot
if
(
length
(
input
$
selectTaxoPlot
)
==
0
)
nodeFind
=
NULL
#save(merge_dat,conditions,levels,nodeFind,file="abuntree.RDATA")
res
=
treeWeightD3
(
merge_dat
,
conditions
,
levels
,
nodeFind
=
nodeFind
,
height
=
input
$
heightVisu
+10
,
width
=
if
(
input
$
modifwidthVisu
){
input
$
widthVisu
})
res
=
treeWeightD3
(
merge_dat
,
conditions
,
levels
,
nodeFind
=
nodeFind
,
height
=
input
$
heightVisu
+10
,
width
=
if
(
input
$
modifwidthVisu
){
input
$
widthVisu
}
,
input
$
isColorRandom
,
input
$
colorLevel
)
}
}
return
(
res
)
...
...
ui.R
View file @
e676c88e
...
...
@@ -1174,7 +1174,15 @@ function(request) {
column
(
width
=
6
,
sliderInput
(
"lowerMargin"
,
h6
(
"Lower"
),
min
=
0
,
max
=
30
,
value
=
6
,
step
=
1
))
)
),
### ###
### _______TreeWeightplot ####
### ###
conditionalPanel
(
condition
=
"input.PlotVisuSelect=='Tree'"
,
fluidRow
(
column
(
width
=
12
,
checkboxInput
(
"isColorRandom"
,
"Random colors"
,
value
=
FALSE
)),
column
(
width
=
12
,
sliderInput
(
"colorLevel"
,
h6
(
"Color Level"
),
min
=
1
,
max
=
4
,
value
=
1
,
step
=
1
))
)
),
### ###
### _______scatterplot ####
### ###
...
...
@@ -1212,12 +1220,12 @@ function(request) {
## ###
## _______common to several plots ####
### ###
conditionalPanel
(
condition
=
"input.PlotVisuSelect!='Rarefaction' && input.PlotVisuSelect!='Scatterplot' && input.PlotVisuSelect!='Krona' && input.PlotVisuSelect!='Phylogeny' && input.PlotVisuSelect!='Network'"
,
conditionalPanel
(
condition
=
"input.PlotVisuSelect!='Rarefaction' && input.PlotVisuSelect!='Scatterplot' && input.PlotVisuSelect!='Krona' &&
input.PlotVisuSelect!='Tree' &&
input.PlotVisuSelect!='Phylogeny' && input.PlotVisuSelect!='Network'"
,
radioButtons
(
inputId
=
"SensPlotVisu"
,
label
=
h6
(
strong
(
"Orientation"
)),
choices
=
c
(
"Vertical"
=
"Vertical"
,
"Horizontal"
=
"Horizontal"
),
selected
=
"Vertical"
,
inline
=
TRUE
)
)
),
### _____Export ####
conditionalPanel
(
condition
=
"input.PlotVisuSelect!='Krona' && input.PlotVisuSelect!='Phylogeny' "
,
conditionalPanel
(
condition
=
"input.PlotVisuSelect!='Krona' && input.PlotVisuSelect!='Phylogeny'
&& input.PlotVisuSelect!='Tree'
"
,
box
(
title
=
"Export"
,
width
=
NULL
,
status
=
"primary"
,
solidHeader
=
TRUE
,
collapsible
=
TRUE
,
collapsed
=
TRUE
,
conditionalPanel
(
condition
=
"input.PlotVisuSelect=='Barplot'"
,
radioButtons
(
"positionBarPlot"
,
"Position"
,
c
(
"Grouped"
=
"dodge"
,
"Stacked"
=
"fill"
),
selected
=
"fill"
,
inline
=
TRUE
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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