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
Cedric Midoux
Easy16S
Commits
b16f0541
Commit
b16f0541
authored
Apr 22, 2020
by
Cedric Midoux
Browse files
select 'none'
parent
cfd6e78d
Changes
1
Hide whitespace changes
Inline
Side-by-side
panels/dataInput.R
View file @
b16f0541
...
...
@@ -281,8 +281,9 @@ transformSample <- function() {
radioButtons
(
inputId
=
"transformFun"
,
label
=
"Transform function : "
,
selected
=
character
(
0
),
choices
=
c
(
"Proportional Transformation"
=
"prop"
,
selected
=
"none"
,
choices
=
c
(
"None"
=
"none"
,
"Proportional Transformation"
=
"prop"
,
"Square Root Transformation"
=
"sqrt"
,
"Centered Log-Ratio (CLR) Transformation"
=
"clr"
)
),
...
...
@@ -299,6 +300,7 @@ transformSample <- function() {
output
$
transformFun
<-
renderText
({
validate
(
need
(
input
$
transformFun
,
""
))
switch
(
input
$
transformFun
,
"none"
=
""
,
"prop"
=
paste
(
"count_to_prop <- function(x) {return( x / sum(x) )}"
,
"data_prop <- transform_sample_counts(data, count_to_prop)"
,
sep
=
"\n"
),
...
...
@@ -323,6 +325,7 @@ observeEvent(input$transformData, {
}
else
{
try
(
switch
(
input
$
transformFun
,
"none"
=
{
return
(
physeq
())},
"prop"
=
{
count_to_prop
<-
function
(
x
)
{
return
(
x
/
sum
(
x
)
)}
physeq
(
transform_sample_counts
(
physeq
(),
count_to_prop
))
...
...
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