Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vig
Sublinear Algorithms for VA
pseudo
Commits
ba4a9f96
Commit
ba4a9f96
authored
Sep 23, 2020
by
Kruyff,D.L.W. (Dylan)
Browse files
Slight tweaking for reasonable results
Former-commit-id:
a7b26b32
parent
ba241de2
Changes
10
Hide whitespace changes
Inline
Side-by-side
AngularApp/prototype/src/app/cache.service.ts
View file @
ba4a9f96
...
...
@@ -17,9 +17,9 @@ export class CacheService {
private
_sliderValue
;
private
_queryWindow
;
public
windowSize
=
50
0
;
public
nrOfTables
=
1
0
;
public
hashSize
=
5
;
public
windowSize
=
12
0
;
public
nrOfTables
=
5
0
;
public
hashSize
=
4
;
public
stepSize
=
200
;
public
querySelectionMode
=
true
;
...
...
AngularApp/prototype/src/app/labeling-window/labeling-window.component.css
View file @
ba4a9f96
...
...
@@ -6,6 +6,7 @@
.subplot-container
{
display
:
flex
;
flex-wrap
:
wrap
;
overflow-x
:
scroll
;
width
:
95%
;
}
...
...
AngularApp/prototype/src/app/labeling-window/labeling-window.component.ts
View file @
ba4a9f96
...
...
@@ -91,7 +91,7 @@ export class LabelingWindowComponent implements OnInit {
pad
:
4
},
height
:
150
,
width
:
15
0
,
width
:
30
0
,
titlefont
:
{
size
:
9
},
...
...
AngularApp/prototype/src/app/overview-window/overview-window.component.ts
View file @
ba4a9f96
...
...
@@ -172,7 +172,7 @@ export class OverviewWindowComponent implements OnInit {
x
:
clickData
.
x
,
y
:
clickData
.
y
});
const
index
=
Math
.
floor
(
xyInformation
[
0
].
scalenumvalue
/
(
12000
/
6
));
const
index
=
80503
//
Math.floor(xyInformation[0].scalenumvalue / (12000 / 6));
this
.
service
.
queryWindow
=
await
this
.
service
.
getQueryWindow
(
index
);
const
temp
=
{};
temp
[
index
]
=
true
;
...
...
AngularApp/prototype/src/app/progress-view/progress-view.component.ts
View file @
ba4a9f96
...
...
@@ -102,7 +102,7 @@ export class ProgressViewComponent implements OnInit {
showticklabels
:
false
,
},
height
:
300
,
width
:
2
00
,
width
:
3
00
,
sliders
:
[{
active
:
highest
,
pad
:
{
t
:
30
},
...
...
AngularApp/prototype/src/app/query-window/query-window.component.ts
View file @
ba4a9f96
...
...
@@ -39,7 +39,7 @@ export class QueryWindowComponent implements OnInit {
pad
:
4
},
height
:
150
,
width
:
1
50
,
width
:
3
50
,
titlefont
:
{
size
:
9
},
...
...
Flaskserver/.idea/workspace.xml
View file @
ba4a9f96
...
...
@@ -20,20 +20,13 @@
</component>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"556080ba-825c-4b55-a92a-867a4df4fb32"
name=
"Default Changelist"
comment=
""
>
<change
afterPath=
"$PROJECT_DIR$/bigwig.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/test.bigWig"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/utils.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../AngularApp/prototype/src/app/api.service.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../AngularApp/prototype/src/app/api.service.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../AngularApp/prototype/src/app/cache.service.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../AngularApp/prototype/src/app/cache.service.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../AngularApp/prototype/src/app/labeling-window/labeling-window.component.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../AngularApp/prototype/src/app/labeling-window/labeling-window.component.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../AngularApp/prototype/src/app/overview-window/overview-window.component.html"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../AngularApp/prototype/src/app/overview-window/overview-window.component.html"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../AngularApp/prototype/src/app/overview-window/overview-window.component.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../AngularApp/prototype/src/app/overview-window/overview-window.component.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../AngularApp/prototype/src/app/progress-view/progress-view.component.ts"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../AngularApp/prototype/src/app/progress-view/progress-view.component.ts"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/misc.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/misc.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/main.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/main.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/processed-data.npy"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/processed-data.npy"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/../run-flask-server.bat"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/../run-flask-server.bat"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
...
Flaskserver/__pycache__/main.cpython-38.pyc
View file @
ba4a9f96
No preview for this file type
Flaskserver/main.py
View file @
ba4a9f96
...
...
@@ -23,6 +23,7 @@ def index():
@
app
.
route
(
'/read-data'
,
methods
=
[
'GET'
])
def
read_data
():
t0
=
time
()
size
=
bbi
.
chromsizes
(
'test.bigWig'
)[
'chr1'
]
bins
=
100000
data
=
bigwig
.
get
(
'test.bigWig'
,
'chr1'
,
0
,
size
,
bins
)
...
...
@@ -32,10 +33,12 @@ def read_data():
"values"
:
data
.
tolist
()
}
response
=
orjson
.
dumps
(
response
)
print
(
'Data read: '
+
str
(
time
()
-
t0
))
return
response
@
app
.
route
(
'/create-windows'
,
methods
=
[
'POST'
])
def
create_windows
():
t0
=
time
()
if
reload
:
size
=
bbi
.
chromsizes
(
'test.bigWig'
)[
'chr1'
]
raw_data
=
request
.
json
...
...
@@ -50,6 +53,7 @@ def create_windows():
)
print
(
data
.
shape
)
np
.
save
(
'processed-data'
,
data
)
print
(
'Windows created: '
+
str
(
time
()
-
t0
))
return
'1'
@
app
.
route
(
'/create-tables'
,
methods
=
[
'POST'
])
...
...
@@ -57,6 +61,7 @@ def create_tables():
t0
=
time
()
print
(
"loading"
)
data
=
np
.
load
(
'processed-data.npy'
)
print
(
'Number of tables: '
+
str
(
data
.
shape
))
print
(
time
()
-
t0
)
raw_data
=
orjson
.
loads
(
request
.
data
)
print
(
time
()
-
t0
)
...
...
@@ -65,7 +70,7 @@ def create_tables():
table_size
=
int
(
raw_data
[
'parameters'
][
"tablesize"
])
data
=
np
.
array
(
data
)
print
(
'Starting: '
+
str
(
time
()
-
t0
))
tables_hash_function
=
[
np
.
random
.
uniform
(
-
1
,
1
,
size
=
(
window_size
,
hash_size
))
for
_
in
range
(
table_size
)]
tables_hash_function
=
[
np
.
random
.
uniform
(
-
1
00
,
1
00
,
size
=
(
window_size
,
hash_size
))
for
_
in
range
(
table_size
)]
print
(
'Init time: '
+
str
(
time
()
-
t0
))
tables
=
[]
for
index
in
range
(
table_size
):
...
...
@@ -112,7 +117,6 @@ def window():
indices
=
raw_data
[
'indices'
]
output
=
np
.
load
(
'processed-data.npy'
)[
indices
]
response
=
orjson
.
dumps
(
output
.
tolist
())
print
(
output
)
print
(
"Query done: "
+
str
(
time
()
-
t0
))
return
response
...
...
Flaskserver/processed-data.npy
LFS
View file @
ba4a9f96
No preview for this file type
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