Skip to content

Commit

Permalink
- Change everything to MongoDB
Browse files Browse the repository at this point in the history
- Minor changes
  • Loading branch information
LucaCilibrasi committed Sep 10, 2021
1 parent 9b9e6e4 commit f90d823
Show file tree
Hide file tree
Showing 7 changed files with 3,633 additions and 1,112 deletions.
4,501 changes: 3,455 additions & 1,046 deletions backend/apis/analyze.py

Large diffs are not rendered by default.

78 changes: 53 additions & 25 deletions frontend/src/components/FreeTargetVsBackground.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1697,14 +1697,14 @@ export default {
...mapState(['queryFreeTarget', 'queryFreeBackground', 'numSequencesQueryFreeTarget',
'numSequencesQueryFreeBackground', 'all_protein', 'startDateQueryFreeTarget', "stopDateQueryFreeTarget",
'startDateQueryFreeBackground', 'stopDateQueryFreeBackground', 'toExcludeFreeTarget', 'toExcludeFreeBackground',
'colorPValueInfoBox', 'color_1', 'color_2', 'color_3']),
'colorPValueInfoBox', 'color_1', 'color_2', 'color_3', 'startAndStopQueryFreeTarget', 'startAndStopQueryFreeBackground']),
...mapGetters({}),
},
methods: {
...mapMutations(['setStartDateQueryFreeTarget', 'setStartDateQueryFreeBackground',
'setStopDateQueryFreeTarget', 'setStopDateQueryFreeBackground', 'setNumSequencesQueryFreeTarget',
'setNumSequencesQueryFreeBackground']),
...mapActions(['setQueryFreeTarget', 'setQueryFreeBackground']),
'setNumSequencesQueryFreeBackground', 'setStartAndStopQueryFreeBackground', 'setStartAndStopQueryFreeTarget']),
...mapActions(['setQueryFreeTarget', 'setQueryFreeBackground', 'setToExcludeFreeTarget', 'setToExcludeFreeBackground']),
deleteAllAccIdsTargetInserted(){
this.listAccIdsTargetInserted = [];
this.dialogAccIdsTargetInserted = false;
Expand Down Expand Up @@ -2828,10 +2828,16 @@ export default {
this.setQueryFreeTarget({field: 'country', list: null});
this.setQueryFreeTarget({field: 'region', list: null});
this.setQueryFreeTarget({field: 'province', list: null});
this.setStartDateQueryFreeTarget(null);
this.setStopDateQueryFreeTarget(null);
let obj = {'start': null, 'stop': null}
this.setStartAndStopQueryFreeTarget(obj);
// this.setStartDateQueryFreeTarget(null);
// this.setStopDateQueryFreeTarget(null);
// this.setQueryFreeBackground({field: 'accession_id', list: this.listAccIdsTarget});
this.setNumSequencesQueryFreeTarget(0);
this.setToExcludeFreeTarget({field: 'geo_group', list: null});
this.setToExcludeFreeTarget({field: 'country', list: null});
this.setToExcludeFreeTarget({field: 'region', list: null});
this.setToExcludeFreeTarget({field: 'province', list: null});
}
else{
let id1 = 'tabTargetFree2';
Expand Down Expand Up @@ -2865,9 +2871,15 @@ export default {
this.setQueryFreeBackground({field: 'country', list: null});
this.setQueryFreeBackground({field: 'region', list: null});
this.setQueryFreeBackground({field: 'province', list: null});
this.setStartDateQueryFreeBackground(null);
this.setStopDateQueryFreeBackground(null);
let obj = {'start': null, 'stop': null}
this.setStartAndStopQueryFreeBackground(obj);
// this.setStartDateQueryFreeBackground(null);
// this.setStopDateQueryFreeBackground(null);
this.setNumSequencesQueryFreeBackground(0);
this.setToExcludeFreeBackground({field: 'geo_group', list: null});
this.setToExcludeFreeBackground({field: 'country', list: null});
this.setToExcludeFreeBackground({field: 'region', list: null});
this.setToExcludeFreeBackground({field: 'province', list: null});
}
else{
let id1 = 'tabBackgroundFree2';
Expand All @@ -2894,8 +2906,10 @@ export default {
this.setQueryFreeTarget({field: 'country', list: null});
this.setQueryFreeTarget({field: 'region', list: null});
this.setQueryFreeTarget({field: 'province', list: null});
this.setStartDateQueryFreeTarget(null);
this.setStopDateQueryFreeTarget(null);
let obj = {'start': null, 'stop': null}
this.setStartAndStopQueryFreeTarget(obj);
// this.setStartDateQueryFreeTarget(null);
// this.setStopDateQueryFreeTarget(null);
if(this.listAccIdsTargetFile.length > 0){
arrayFull = JSON.parse(JSON.stringify(this.listAccIdsTargetFile));
for(let i = 0; i < this.listAccIdsTargetInserted.length; i = i + 1){
Expand Down Expand Up @@ -2926,8 +2940,10 @@ export default {
this.setQueryFreeBackground({field: 'country', list: null});
this.setQueryFreeBackground({field: 'region', list: null});
this.setQueryFreeBackground({field: 'province', list: null});
this.setStartDateQueryFreeBackground(null);
this.setStopDateQueryFreeBackground(null);
let obj = {'start': null, 'stop': null};
this.setStartAndStopQueryFreeBackground(obj);
// this.setStartDateQueryFreeBackground(null);
// this.setStopDateQueryFreeBackground(null);
if(this.listAccIdsBackgroundFile.length > 0){
arrayFull = JSON.parse(JSON.stringify(this.listAccIdsBackgroundFile));
for(let i = 0; i < this.listAccIdsBackgroundInserted.length; i = i + 1){
Expand Down Expand Up @@ -2958,8 +2974,10 @@ export default {
this.setQueryFreeTarget({field: 'country', list: null});
this.setQueryFreeTarget({field: 'region', list: null});
this.setQueryFreeTarget({field: 'province', list: null});
this.setStartDateQueryFreeTarget(null);
this.setStopDateQueryFreeTarget(null);
let obj = {'start': null, 'stop': null};
this.setStartAndStopQueryFreeTarget(obj);
// this.setStartDateQueryFreeTarget(null);
// this.setStopDateQueryFreeTarget(null);
if(this.fileAccIdsTarget !== null) {
this.listAccIdsTargetFile = this.fileAccIdsTarget;
for(let i = 0; i < this.listAccIdsTargetFile.length; i = i + 1){
Expand Down Expand Up @@ -2999,8 +3017,10 @@ export default {
this.setQueryFreeBackground({field: 'country', list: null});
this.setQueryFreeBackground({field: 'region', list: null});
this.setQueryFreeBackground({field: 'province', list: null});
this.setStartDateQueryFreeBackground(null);
this.setStopDateQueryFreeBackground(null);
let obj = {'start': null, 'stop': null};
this.setStartAndStopQueryFreeBackground(obj);
// this.setStartDateQueryFreeBackground(null);
// this.setStopDateQueryFreeBackground(null);
if(this.fileAccIdsBackground !== null){
this.listAccIdsBackgroundFile = this.fileAccIdsBackground;
for(let i = 0; i < this.listAccIdsBackgroundFile.length; i = i + 1){
Expand Down Expand Up @@ -3194,22 +3214,30 @@ export default {
all_protein(){
this.possibleProtein = this.all_protein;
},
startDateQueryFreeTarget(){
startAndStopQueryFreeTarget(){
this.resetApplied();
this.countOverlappingSequenceTargetBackground();
},
stopDateQueryFreeTarget(){
this.resetApplied();
this.countOverlappingSequenceTargetBackground();
},
startDateQueryFreeBackground(){
this.resetApplied();
this.countOverlappingSequenceTargetBackground();
},
stopDateQueryFreeBackground(){
// startDateQueryFreeTarget(){
// this.resetApplied();
// this.countOverlappingSequenceTargetBackground();
// },
// stopDateQueryFreeTarget(){
// this.resetApplied();
// this.countOverlappingSequenceTargetBackground();
// },
startAndStopQueryFreeBackground(){
this.resetApplied();
this.countOverlappingSequenceTargetBackground();
},
// startDateQueryFreeBackground(){
// this.resetApplied();
// this.countOverlappingSequenceTargetBackground();
// },
// stopDateQueryFreeBackground(){
// this.resetApplied();
// this.countOverlappingSequenceTargetBackground();
// },
queryFreeTarget(){
this.resetApplied();
this.countOverlappingSequenceTargetBackground();
Expand Down
32 changes: 24 additions & 8 deletions frontend/src/components/SelectorsQueryFree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -234,42 +234,58 @@ export default {
},
'queryFreeTarget.geo_group': function (){
if(this.field === 'geo_group' && (!this.queryFreeTarget['geo_group'] || this.queryFreeTarget['geo_group'].length === 0)) {
this.clearToExcludeField();
if(this.type === 'target') {
this.clearToExcludeField();
}
}
},
'queryFreeTarget.country': function (){
if(this.field === 'country' && (!this.queryFreeTarget['country'] || this.queryFreeTarget['country'].length === 0)) {
this.clearToExcludeField();
if(this.type === 'target') {
this.clearToExcludeField();
}
}
},
'queryFreeTarget.region': function (){
if(this.field === 'region' && (!this.queryFreeTarget['region'] || this.queryFreeTarget['region'].length === 0)) {
this.clearToExcludeField();
if(this.type === 'target') {
this.clearToExcludeField();
}
}
},
'queryFreeTarget.province': function (){
if(this.field === 'province' && (!this.queryFreeTarget['province'] || this.queryFreeTarget['province'].length === 0 )) {
this.clearToExcludeField();
if(this.type === 'target') {
this.clearToExcludeField();
}
}
},
'queryFreeBackground.geo_group': function (){
if(this.field === 'geo_group' && (!this.queryFreeBackground['geo_group'] || this.queryFreeBackground['geo_group'].length === 0)) {
this.clearToExcludeField();
if(this.type === 'background') {
this.clearToExcludeField();
}
}
},
'queryFreeBackground.country': function (){
if(this.field === 'country' && (!this.queryFreeBackground['country'] || this.queryFreeBackground['country'].length === 0)) {
this.clearToExcludeField();
if(this.type === 'background') {
this.clearToExcludeField();
}
}
},
'queryFreeBackground.region': function (){
if(this.field === 'region' && (!this.queryFreeBackground['region'] || this.queryFreeBackground['region'].length === 0)) {
this.clearToExcludeField();
if(this.type === 'background') {
this.clearToExcludeField();
}
}
},
'queryFreeBackground.province': function (){
if(this.field === 'province' && (!this.queryFreeBackground['province'] || this.queryFreeBackground['province'].length === 0 )) {
this.clearToExcludeField();
if(this.type === 'background') {
this.clearToExcludeField();
}
}
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@
</v-row>
</v-container>

<v-overlay :value="overlay">
<v-progress-circular
indeterminate
size="64"
></v-progress-circular>
</v-overlay>

</div>
</template>

Expand Down
80 changes: 58 additions & 22 deletions frontend/src/components/TimeSelectorQueryFree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
color="#F48C0680"
track-color="grey"
height="2px"
@mouseup="mouseUpSlider"
>
</v-range-slider>
</div>
Expand Down Expand Up @@ -118,6 +119,13 @@
</v-row>
</v-container>

<v-overlay :value="overlay">
<v-progress-circular
indeterminate
size="64"
></v-progress-circular>
</v-overlay>

</div>
</template>

Expand Down Expand Up @@ -220,8 +228,29 @@ export default {
},
methods: {
...mapMutations(['setStartDateQueryFreeTarget', 'setStopDateQueryFreeTarget', 'setStartDateQueryFreeBackground',
'setStopDateQueryFreeBackground', 'setNumSequencesQueryFreeTarget', 'setNumSequencesQueryFreeBackground']),
'setStopDateQueryFreeBackground', 'setNumSequencesQueryFreeTarget', 'setNumSequencesQueryFreeBackground',
'setStartAndStopQueryFreeTarget', 'setStartAndStopQueryFreeBackground']),
...mapActions(['setQueryFreeTarget', 'setQueryFreeBackground']),
mouseUpSlider() {
let min = this.slider[0];
let max = this.slider[1];
this.changeMarkerAndRender(min, max);
this.last_start_date = this.translateIndexToDate(this.slider[0]);
this.last_stop_date = this.translateIndexToDate(this.slider[1]);
if(this.type === 'target') {
let obj = {'start': this.last_start_date, 'stop': this.last_stop_date}
this.setStartAndStopQueryFreeTarget(obj);
// this.setStartDateQueryFreeTarget(this.last_start_date);
// this.setStopDateQueryFreeTarget(this.last_stop_date);
}
else if(this.type === 'background') {
let obj = {'start': this.last_start_date, 'stop': this.last_stop_date}
this.setStartAndStopQueryFreeBackground(obj);
// this.setStartDateQueryFreeBackground(this.last_start_date);
// this.setStopDateQueryFreeBackground(this.last_stop_date);
}
},
download(){
let url = this.my_chart.getConnectedDataURL({
pixelRatio: 2,
Expand Down Expand Up @@ -501,16 +530,21 @@ export default {
}
this.slider = [index_start, index_stop];
this.mouseUpSlider();
this.last_start_date = this.translateIndexToDate(this.slider[0]);
this.last_stop_date = this.translateIndexToDate(this.slider[1]);
this.changeMarkerAndRender(this.slider[0], this.slider[0]);
this.changeMarkerAndRender(this.slider[0], this.slider[1]);
if(this.type === 'target') {
this.setStartDateQueryFreeTarget(this.last_start_date);
this.setStopDateQueryFreeTarget(this.last_stop_date);
let obj = {'start': this.last_start_date, 'stop': this.last_stop_date}
this.setStartAndStopQueryFreeTarget(obj);
// this.setStartDateQueryFreeTarget(this.last_start_date);
// this.setStopDateQueryFreeTarget(this.last_stop_date);
}
else if(this.type === 'background') {
this.setStartDateQueryFreeBackground(this.last_start_date);
this.setStopDateQueryFreeBackground(this.last_stop_date);
let obj = {'start': this.last_start_date, 'stop': this.last_stop_date}
this.setStartAndStopQueryFreeBackground(obj);
// this.setStartDateQueryFreeBackground(this.last_start_date);
// this.setStopDateQueryFreeBackground(this.last_stop_date);
}
this.chosenApplied = true;
Expand All @@ -529,6 +563,7 @@ export default {
else {
let stop = this.slider[1];
this.slider = [start, stop];
this.mouseUpSlider();
}
},
last_stop_date(){
Expand All @@ -540,6 +575,7 @@ export default {
else {
let start = this.slider[0];
this.slider = [start, stop];
this.mouseUpSlider();
}
},
queryFreeTarget() {
Expand All @@ -562,22 +598,22 @@ export default {
this.loadData();
}
},
slider(){
let min = this.slider[0];
let max = this.slider[1];
this.changeMarkerAndRender(min, max);
this.last_start_date = this.translateIndexToDate(this.slider[0]);
this.last_stop_date = this.translateIndexToDate(this.slider[1]);
if(this.type === 'target') {
this.setStartDateQueryFreeTarget(this.last_start_date);
this.setStopDateQueryFreeTarget(this.last_stop_date);
}
else if(this.type === 'background') {
this.setStartDateQueryFreeBackground(this.last_start_date);
this.setStopDateQueryFreeBackground(this.last_stop_date);
}
},
// slider(){
// let min = this.slider[0];
// let max = this.slider[1];
// this.changeMarkerAndRender(min, max);
//
// this.last_start_date = this.translateIndexToDate(this.slider[0]);
// this.last_stop_date = this.translateIndexToDate(this.slider[1]);
// if(this.type === 'target') {
// this.setStartDateQueryFreeTarget(this.last_start_date);
// this.setStopDateQueryFreeTarget(this.last_stop_date);
// }
// else if(this.type === 'background') {
// this.setStartDateQueryFreeBackground(this.last_start_date);
// this.setStopDateQueryFreeBackground(this.last_stop_date);
// }
// },
},
mounted() {
this.loadData();
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/components/TimeSelectorQueryGeo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,12 @@
</v-row>
</v-container>

<!-- <v-overlay :value="overlay">-->
<!-- <v-progress-circular-->
<!-- indeterminate-->
<!-- size="64"-->
<!-- ></v-progress-circular>-->
<!-- </v-overlay>-->
<v-overlay :value="overlay">
<v-progress-circular
indeterminate
size="64"
></v-progress-circular>
</v-overlay>

</div>
</template>
Expand Down Expand Up @@ -782,7 +782,7 @@ export default {
this.changeMarkerAndRender(this.slider[0], this.slider[0]);
this.setStartDateQueryGeo(this.last_start_date);
this.setStopDateQueryGeo(this.last_stop_date);
this.overlay = false;
});
});
}
Expand Down
Loading

0 comments on commit f90d823

Please sign in to comment.