Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HIDDEN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sPlot
HIDDEN
Commits
69338819
Commit
69338819
authored
5 years ago
by
Francesco Sabatini
Browse files
Options
Downloads
Patches
Plain Diff
Updated 01b to save intermediate steps
parent
d1cb8fbe
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
01b_MesobromionCluster.R
+9
-7
9 additions, 7 deletions
01b_MesobromionCluster.R
session.R
+4
-4
4 additions, 4 deletions
session.R
with
13 additions
and
11 deletions
01b_MesobromionCluster.R
+
9
−
7
View file @
69338819
...
...
@@ -72,9 +72,9 @@ Mesobromion <- function(species.path, traits.path, output, myfunction="get.corXY
species
<-
read_delim
(
species.path
,
delim
=
"\t"
)
%>%
as.data.frame
()
traits
<-
read_delim
(
traits.path
,
delim
=
"\t"
)
%>%
as.data.frame
()
#
%>%
as.data.frame
()
%>%
### TEMPORARY FOR TESTING!
#
dplyr::select(1:11)
dplyr
::
select
(
1
:
11
)
traits
<-
traits
%>%
...
...
@@ -115,8 +115,9 @@ Mesobromion <- function(species.path, traits.path, output, myfunction="get.corXY
if
(
combinations
==
"sequential"
){
corXY.
output
<-
NULL
corXY.
ci
<-
NULL
for
(
nround
in
1
:
max.inter.t
){
corXY.output
<-
NULL
## select combination of traits based on best
if
(
nround
==
1
)
{
allcomb.t
<-
lapply
(
1
:
ncol
(
traits
),
function
(
x
){
return
(
x
)})
...
...
@@ -167,7 +168,8 @@ Mesobromion <- function(species.path, traits.path, output, myfunction="get.corXY
#save(corXY.output, file = paste(output, "_", nround, ".RData", sep=""))
print
(
paste
(
"Summarize after round"
,
nround
,
"and find best, significant trait combos"
))
corXY.ci
<-
get.ci
(
corXY.output
)
corXY.ci
<-
corXY.ci
%>%
bind_rows
(
get.ci
(
corXY.output
))
##get best or new best
if
(
nround
==
1
)
{
traits.sign.alone
<-
corXY.ci
%>%
...
...
@@ -208,9 +210,9 @@ Mesobromion <- function(species.path, traits.path, output, myfunction="get.corXY
print
(
paste
(
"new best at round="
,
nround
,
"is trait combination"
,
best
))
}
else
{
print
(
paste
(
"no new best at round="
,
nround
))}
}
}
save
(
corXY.output
,
file
=
paste
(
output
,
".RData"
,
sep
=
""
))
print
(
paste
(
"save intermediate results at round"
,
nround
))
save
(
corXY.output
,
file
=
paste
(
output
,
"_round_"
,
nround
,
".RData"
,
sep
=
""
))
}
}
if
(
ncores
>
1
){
stopCluster
(
cl
)}
}
This diff is collapsed.
Click to expand it.
session.R
+
4
−
4
View file @
69338819
species.path
<-
"_data/Mesobromion/species.out.10perc.txt"
traits.path
<-
"_data/Mesobromion/traits.out.10perc.txt"
output
<-
"test"
output
<-
"test
99
"
myfunction
<-
"get.corXY.bootstrap"
max.inter.t
<-
4
chunkn
<-
1
max.inter.t
<-
3
chunk.i
<-
NA
nperm
<-
2
5
nperm
<-
2
0
ncores
<-
10
chunkn
<-
3
*
ncores
combinations
<-
"sequential"
source
(
"01b_MesobromionCluster.R"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment