Next tuesday 25th january around 21.30 we'll be upgrading to GitLab version 14.7

Commit ba4a9f96 authored by Kruyff,D.L.W. (Dylan)'s avatar Kruyff,D.L.W. (Dylan)
Browse files

Slight tweaking for reasonable results


Former-commit-id: a7b26b32
parent ba241de2
...@@ -17,9 +17,9 @@ export class CacheService { ...@@ -17,9 +17,9 @@ export class CacheService {
private _sliderValue; private _sliderValue;
private _queryWindow; private _queryWindow;
public windowSize = 500; public windowSize = 120;
public nrOfTables = 10; public nrOfTables = 50;
public hashSize = 5; public hashSize = 4;
public stepSize = 200; public stepSize = 200;
public querySelectionMode = true; public querySelectionMode = true;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
.subplot-container { .subplot-container {
display: flex; display: flex;
flex-wrap: wrap;
overflow-x: scroll; overflow-x: scroll;
width: 95%; width: 95%;
} }
......
...@@ -91,7 +91,7 @@ export class LabelingWindowComponent implements OnInit { ...@@ -91,7 +91,7 @@ export class LabelingWindowComponent implements OnInit {
pad: 4 pad: 4
}, },
height: 150, height: 150,
width: 150, width: 300,
titlefont: { titlefont: {
size: 9 size: 9
}, },
......
...@@ -172,7 +172,7 @@ export class OverviewWindowComponent implements OnInit { ...@@ -172,7 +172,7 @@ export class OverviewWindowComponent implements OnInit {
x: clickData.x, x: clickData.x,
y: clickData.y 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); this.service.queryWindow = await this.service.getQueryWindow(index);
const temp = {}; const temp = {};
temp[index] = true; temp[index] = true;
......
...@@ -102,7 +102,7 @@ export class ProgressViewComponent implements OnInit { ...@@ -102,7 +102,7 @@ export class ProgressViewComponent implements OnInit {
showticklabels: false, showticklabels: false,
}, },
height: 300, height: 300,
width: 200, width: 300,
sliders: [{ sliders: [{
active: highest, active: highest,
pad: {t: 30}, pad: {t: 30},
......
...@@ -39,7 +39,7 @@ export class QueryWindowComponent implements OnInit { ...@@ -39,7 +39,7 @@ export class QueryWindowComponent implements OnInit {
pad: 4 pad: 4
}, },
height: 150, height: 150,
width: 150, width: 350,
titlefont: { titlefont: {
size: 9 size: 9
}, },
......
...@@ -20,20 +20,13 @@ ...@@ -20,20 +20,13 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="556080ba-825c-4b55-a92a-867a4df4fb32" name="Default Changelist" comment=""> <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/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/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/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$/../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$/.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$/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$/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> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
......
...@@ -23,6 +23,7 @@ def index(): ...@@ -23,6 +23,7 @@ def index():
@app.route('/read-data', methods=['GET']) @app.route('/read-data', methods=['GET'])
def read_data(): def read_data():
t0 = time()
size = bbi.chromsizes('test.bigWig')['chr1'] size = bbi.chromsizes('test.bigWig')['chr1']
bins = 100000 bins = 100000
data = bigwig.get('test.bigWig', 'chr1', 0, size, bins) data = bigwig.get('test.bigWig', 'chr1', 0, size, bins)
...@@ -32,10 +33,12 @@ def read_data(): ...@@ -32,10 +33,12 @@ def read_data():
"values": data.tolist() "values": data.tolist()
} }
response = orjson.dumps(response) response = orjson.dumps(response)
print('Data read: ' + str(time()-t0))
return response return response
@app.route('/create-windows', methods=['POST']) @app.route('/create-windows', methods=['POST'])
def create_windows(): def create_windows():
t0 = time()
if reload: if reload:
size = bbi.chromsizes('test.bigWig')['chr1'] size = bbi.chromsizes('test.bigWig')['chr1']
raw_data = request.json raw_data = request.json
...@@ -50,6 +53,7 @@ def create_windows(): ...@@ -50,6 +53,7 @@ def create_windows():
) )
print(data.shape) print(data.shape)
np.save('processed-data', data) np.save('processed-data', data)
print('Windows created: ' + str(time()-t0))
return '1' return '1'
@app.route('/create-tables', methods=['POST']) @app.route('/create-tables', methods=['POST'])
...@@ -57,6 +61,7 @@ def create_tables(): ...@@ -57,6 +61,7 @@ def create_tables():
t0 = time() t0 = time()
print("loading") print("loading")
data = np.load('processed-data.npy') data = np.load('processed-data.npy')
print('Number of tables: ' + str(data.shape))
print(time()-t0) print(time()-t0)
raw_data = orjson.loads(request.data) raw_data = orjson.loads(request.data)
print(time()-t0) print(time()-t0)
...@@ -65,7 +70,7 @@ def create_tables(): ...@@ -65,7 +70,7 @@ def create_tables():
table_size = int(raw_data['parameters']["tablesize"]) table_size = int(raw_data['parameters']["tablesize"])
data = np.array(data) data = np.array(data)
print('Starting: ' + str(time()-t0)) 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(-100, 100, size=(window_size, hash_size)) for _ in range(table_size)]
print('Init time: ' + str(time() - t0)) print('Init time: ' + str(time() - t0))
tables = [] tables = []
for index in range(table_size): for index in range(table_size):
...@@ -112,7 +117,6 @@ def window(): ...@@ -112,7 +117,6 @@ def window():
indices = raw_data['indices'] indices = raw_data['indices']
output = np.load('processed-data.npy')[indices] output = np.load('processed-data.npy')[indices]
response = orjson.dumps(output.tolist()) response = orjson.dumps(output.tolist())
print(output)
print("Query done: " + str(time() - t0)) print("Query done: " + str(time() - t0))
return response return response
......
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment