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
1fed77f8
Commit
1fed77f8
authored
Oct 01, 2021
by
Etienne Rifa
Browse files
debug aggregate table
stats was done on raw table inducing NAs.
parent
cd2ee6a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
R/aggregate_fun.R
View file @
1fed77f8
...
...
@@ -46,9 +46,9 @@ aggregate_fun <- function(data = data, metacoder = NULL, deseq = NULL, mgseq = N
if
(
!
dir.exists
(
output
)){
dir.create
(
output
,
recursive
=
T
)
}
flog.info
(
'Done.'
)
# data.glom <- tax_glom(data, taxrank=rank, h=TRUE)
flog.info
(
'Glom Tax.'
)
data.glom
<-
tax_glom
(
data
,
taxrank
=
rank
)
if
(
comp
==
''
){
fun
<-
paste
(
'combinaisons <- combn(na.omit(unique(sample_data(data)$'
,
column1
,
')),2)'
,
sep
=
''
)
...
...
@@ -176,7 +176,7 @@ aggregate_fun <- function(data = data, metacoder = NULL, deseq = NULL, mgseq = N
names
(
TABf
)[
ncol
(
TABf
)]
=
names
(
TF
)[
j
]
}
TABfbak
<-
TABf
TABfbak
0
<-
TABf
# add new columns, sumMethods, DeseqLFC, Mean Relative Abundance (TSS) condition 1 & 2
row.names
(
deseqT
)
=
deseqT
[,
1
]
...
...
@@ -192,7 +192,7 @@ aggregate_fun <- function(data = data, metacoder = NULL, deseq = NULL, mgseq = N
# clr = function(x){log(x+1) - rowMeans(log(x+1))}
# otableNORM <- clr(otable)
normf
=
function
(
x
){
x
/
sum
(
x
)
}
data.norm
<-
transform_sample_counts
(
data
,
normf
)
data.norm
<-
transform_sample_counts
(
data
.glom
,
normf
)
otableNORM
<-
otu_table
(
data.norm
)
Gtab
<-
cbind
(
as.data.frame
(
ssample
),
t
(
otableNORM
))
...
...
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