Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Phylum
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Castillo
Phylum
Commits
984a812c
Commit
984a812c
authored
Oct 13, 2016
by
Castillo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ram and cores params
parent
d78c36b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
3 deletions
+19
-3
PhyloSpark.py
PhyloSpark.py
+12
-2
phylum_srv.py
phylum_srv.py
+5
-1
form.html
templates/form.html
+2
-0
No files found.
PhyloSpark.py
View file @
984a812c
...
...
@@ -10,6 +10,7 @@ from InterUnion import Utils
import
simplejson
as
json
import
os
import
datetime
import
pprint
def
lineal_comparisons
(
years
):
D
=
{}
...
...
@@ -112,8 +113,17 @@ class Period:
class
Phylo
:
def
__init__
(
self
,
t
=
[]
,
minK
=
4
,
minJ
=
0.0
):
self
.
sc
=
SparkContext
(
"local"
,
"simple app"
)
def
__init__
(
self
,
t
=
[]
,
minK
=
4
,
minJ
=
0.0
,
memm
=
"4g"
,
ncores
=
"12"
):
SparkContext
.
setSystemProperty
(
'spark.executor.memory'
,
memm
)
SparkContext
.
setSystemProperty
(
'spark.driver.memory'
,
memm
)
# SparkContext.setSystemProperty('spark.executor.cores', 12)
# SparkContext.setSystemProperty('spark.driver.cores', 12)
self
.
sc
=
SparkContext
(
"local["
+
ncores
+
"]"
,
"simple app"
)
print
(
""
)
print
(
""
)
pprint
.
pprint
(
self
.
sc
.
_conf
.
getAll
()
)
print
(
""
)
print
(
""
)
self
.
utls
=
Utils
()
self
.
years
=
list
(
range
(
t
[
0
],
t
[
1
]
+
1
)
)
# combinations(self.years, 2)
self
.
pairs
,
self
.
pairsD
=
lineal_comparisons
(
self
.
years
)
...
...
phylum_srv.py
View file @
984a812c
...
...
@@ -31,6 +31,8 @@ class BabelForm(Form):
minsupp
=
DecimalField
(
'Min. support'
,
[
validators
.
NumberRange
(
min
=
0.00
,
max
=
0.99
)])
minfsetsize
=
IntegerField
(
'Min. FI size'
,
[
validators
.
NumberRange
(
min
=
1
,
max
=
10
)])
minjaccard
=
DecimalField
(
'Min. Jaccard'
,
[
validators
.
NumberRange
(
min
=
0.00
,
max
=
0.99
)])
ram
=
StringField
(
'RAM'
,
validators
=
[
DataRequired
()])
cores
=
StringField
(
'#cores'
,
validators
=
[
DataRequired
()])
# cooccs = IntegerField('Min. term voisinage', [validators.NumberRange(min=1, max=10)])
def
flash_errors
(
form
):
...
...
@@ -57,7 +59,9 @@ def form_example():
sID
=
p_
[
"instname"
]
if
sID
not
in
I
:
I
[
sID
]
=
Phylo
(
t
=
[
p_
[
"from_"
]
,
p_
[
"to_"
]
]
,
minJ
=
p_
[
"minjaccard"
])
periods_
=
[
p_
[
"from_"
]
,
p_
[
"to_"
]
]
minjaccard
=
p_
[
"minjaccard"
]
I
[
sID
]
=
Phylo
(
t
=
periods_
,
minJ
=
minjaccard
,
memm
=
p_
[
"ram"
]
,
ncores
=
p_
[
"cores"
])
# executes a fp-growth per year
I
[
sID
]
.
FPG_chain
()
...
...
templates/form.html
View file @
984a812c
...
...
@@ -12,6 +12,8 @@
{{ form.minsupp.label }} {{ form.minsupp(value="0.0001") }}
<br>
{{ form.minfsetsize.label }} {{ form.minfsetsize(value="4") }}
<br>
{{ form.minjaccard.label }} {{ form.minjaccard(value="0.2") }}
<br>
{{ form.ram.label }} {{ form.ram(value="5g") }}
<br>
{{ form.cores.label }} {{ form.cores(value="8") }}
<br>
{{ form.csrf_token }}
</p>
<p>
...
...
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