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
fbb2a3cc
Commit
fbb2a3cc
authored
Sep 02, 2021
by
Etienne Rifa
Browse files
misc changes
parent
99aa1bf7
Pipeline
#40758
passed with stage
in 12 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
R/aggregate_fun.R
View file @
fbb2a3cc
...
...
@@ -84,7 +84,6 @@ aggregate_fun <- function(data = data, metacoder = NULL, deseq = NULL, mgseq = N
flog.warn
(
'File does not exists.'
)
deseqT
<-
data.frame
()
}
# print(head(deseqT))
flog.info
(
'MetagenomeSeq.'
)
if
(
file.exists
(
paste
(
mgseq
,
"/signtab_"
,
column1
,
"_"
,
combinaisons
[
1
,
col
],
"_vs_"
,
combinaisons
[
2
,
col
],
".csv"
,
sep
=
""
))){
mgseqT
<-
read.table
(
paste
(
mgseq
,
"/signtab_"
,
column1
,
"_"
,
combinaisons
[
1
,
col
],
"_vs_"
,
combinaisons
[
2
,
col
],
".csv"
,
sep
=
""
),
h
=
TRUE
,
sep
=
"\t"
)
...
...
R/diversity_beta_light.R
View file @
fbb2a3cc
...
...
@@ -10,6 +10,7 @@
#' @param ord0 Currently supported method options are: c("DCA", "CCA", "RDA", "CAP", "DPCoA", "NMDS", "MDS", "PCoA")
#' @param output The output file directory.
#' @param tests Whether to compute tests or not (TRUE/FALSE)
#' @param verbose Verbose level. (1: quiet, 2: print infos, 3: print infos + debug)
#'
#' @return Return specific plots and tests in list and output them in the output directory.
#'
...
...
@@ -24,7 +25,18 @@
# Decontam Function
diversity_beta_light
<-
function
(
psobj
,
rank
=
"ASV"
,
col
=
NULL
,
cov
=
NULL
,
dist0
=
"bray"
,
ord0
=
"MDS"
,
output
=
"./plot_div_beta/"
,
tests
=
TRUE
)
{
diversity_beta_light
<-
function
(
psobj
,
rank
=
"ASV"
,
col
=
NULL
,
cov
=
NULL
,
dist0
=
"bray"
,
ord0
=
"MDS"
,
output
=
"./plot_div_beta/"
,
tests
=
TRUE
,
verbose
=
2
)
{
if
(
verbose
==
3
){
invisible
(
flog.threshold
(
DEBUG
))
}
if
(
verbose
==
2
){
invisible
(
flog.threshold
(
INFO
))
}
if
(
verbose
==
1
){
invisible
(
flog.threshold
(
ERROR
))
}
if
(
!
dir.exists
(
output
)){
dir.create
(
output
,
recursive
=
TRUE
)
...
...
R/generate_phyloseq_fun.R
View file @
fbb2a3cc
...
...
@@ -56,7 +56,7 @@ generate_phyloseq_fun <- function(dada_res = dada_res, tax.table = tax.table, tr
data
<-
phyloseq
(
dada_res
$
otu.table
,
tax_table
(
as.matrix
(
tax.table
)),
sample.metadata
,
DNAStringSet
(
sequences
))
}
else
{
flog.info
(
'Building phyloseq object with tree...'
)
data
<-
phyloseq
(
dada_res
$
otu.table
,
tax.table
,
sample.metadata
,
phy_tree
(
tree
),
DNAStringSet
(
sequences
))
data
<-
phyloseq
(
dada_res
$
otu.table
,
tax_table
(
as.matrix
(
tax.table
))
,
sample.metadata
,
phy_tree
(
tree
),
DNAStringSet
(
sequences
))
}
flog.info
(
'Done.'
)
data_rel
<-
transform_sample_counts
(
data
,
function
(
x
)
x
/
sum
(
x
)
)
...
...
R/heatmap_fun.R
View file @
fbb2a3cc
...
...
@@ -17,8 +17,6 @@
#' @export
# Decontam Function
heatmap_fun
<-
function
(
data
=
data
,
column1
=
""
,
top
=
20
,
output
=
"./plot_heatmap/"
,
rank
=
"Species"
,
relative
=
TRUE
,
aggregate
=
TRUE
,
legend
=
"Abundance"
){
LL
=
list
()
...
...
@@ -28,6 +26,8 @@ heatmap_fun <- function(data = data, column1 = "", top = 20, output = "./plot_he
}
flog.info
(
'Done.'
)
if
(
is.na
(
match
(
column1
,
sample_variables
(
data
)))
){
stop
(
"This factor is not in sample_variables(data)."
)}
ps.glom.rel
<-
psobj.top
<-
dataglom
<-
data
if
(
!
is.null
(
rank
)){
...
...
Etienne Rifa
@etienne.rifa
mentioned in issue
#19 (closed)
·
Sep 14, 2021
mentioned in issue
#19 (closed)
mentioned in issue #19
Toggle commit list
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