Skip to content

Commit

Permalink
Merge pull request #536 from PoonLab/dev
Browse files Browse the repository at this point in the history
Minor: Bug fixes
GopiGugan authored Sep 20, 2024
2 parents b9aada0 + be186af commit 9daab54
Showing 7 changed files with 36 additions and 14 deletions.
23 changes: 23 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#### Front-end checks to do prior to merging pull request:
- [ ] Search
- [ ] Search by accession number
- [ ] Search by lineage
- [ ] Search by country
- [ ] Search by country (with date filter)
- [ ] Tree filtering
- [ ] Download Time-scaled tree (nwk)
- [ ] Download Time-scaled tree (csv)
- [ ] Download Beadplot (svg)
- [ ] Download Beadplot (nwk)
- [ ] Download mutation list (csv)
- [ ] Beadplot cutoff slider
- [ ] Expanding Beadplot
- [ ] Translated pages
- [ ] Changing the colour of the tree based on divergence, collection date, etc.
- [ ] View different displays (Non-Recombinants, Recombinants, etc.)
- [ ] Left/Right arrow key to move between beads
- [ ] Ensure Tooltips get rendered
- [ ] Hover over accession number in the "Samples" tab to ensure that the acknowledgement tooltips get generated
- [ ] Countries/Samples/Mutations tabs are populating the correct information
- [ ] Build front-end database without issues
- [ ] Port front-end change to `epicov` branch
10 changes: 5 additions & 5 deletions dbmanager.js
Original file line number Diff line number Diff line change
@@ -89,19 +89,19 @@ class DBManager {
}

get_tips() {
return this.db_.collection($COLLECTION__TIPS).find().toArray()
return this.db_.collection($COLLECTION__TIPS).find({}, { projection: { _id: 0 } }).toArray()
}

get_df() {
return this.db_.collection($COLLECTION__DF_TREE).find().toArray();
return this.db_.collection($COLLECTION__DF_TREE).find({}, { projection: { _id: 0 } }).toArray();
}

get_xbb_df() {
return this.db_.collection($COLLECTION__XBB_TREE).find().toArray();
return this.db_.collection($COLLECTION__XBB_TREE).find({}, { projection: { _id: 0 } }).toArray();
}

get_regionMap() {
return this.db_.collection($COLLECTION__REGION_MAP).find().toArray().then((docs,err)=>{
return this.db_.collection($COLLECTION__REGION_MAP).find({}, { projection: { _id: 0 } }).toArray().then((docs,err)=>{
if(err){
console.log(`dbmanager::get_regionMap error`,err);
return ;
@@ -214,7 +214,7 @@ class DBManager {
}

get_recombinantTips() {
return this.db_.collection($COLLECTION__RECOMBINANT_TIPS).find().toArray().then((docs,err)=>{
return this.db_.collection($COLLECTION__RECOMBINANT_TIPS).find({}, { projection: { _id: 0 } }).toArray().then((docs,err)=>{
if(err){
console.log(`dbmanager::get_recombinantTips error`,err)
return;
4 changes: 2 additions & 2 deletions index-es.html
Original file line number Diff line number Diff line change
@@ -145,8 +145,8 @@ <h2 class="modal-title">Search Error</h2>
<option value="Region">Región</option>
<option value="No. samples">No. muestras</option>
<option value="Collection date">Fecha de colección</option>
<option value="Divergence" selected>Divergencia</option>
<option value="Infections">Infecciones</option>
<option value="Divergence">Divergencia</option>
<option value="Infections" selected>Infecciones</option>
</select>
<div class="legend" id="div-region-legend"></div>
<div class="legend" id="svg-sample-legend"></div>
4 changes: 2 additions & 2 deletions index-fr.html
Original file line number Diff line number Diff line change
@@ -145,8 +145,8 @@ <h2 class="modal-title">Search Error</h2>
<option value="Region">R&eacute;gion</option>
<option value="No. samples">T. de l'&eacute;chantillon</option>
<option value="Collection date">Date de collecte</option>
<option value="Divergence" selected>Divergence</option>
<option value="Infections">Infections</option>
<option value="Divergence">Divergence</option>
<option value="Infections" selected>Infections</option>
</select>
<div class="legend" id="div-region-legend"></div>
<div class="legend" id="svg-sample-legend"></div>
4 changes: 2 additions & 2 deletions index-zh.html
Original file line number Diff line number Diff line change
@@ -146,8 +146,8 @@ <h2 class="modal-title">Search Error</h2>
<option value="Region">区域</option>
<option value="No. samples">样本编号</option>
<option value="Collection date">收集日期</option>
<option value="Divergence" selected>趋异</option>
<option value="Infections">感染</option>
<option value="Divergence">趋异</option>
<option value="Infections" selected>感染</option>
</select>
<div class="legend" id="div-region-legend"></div>
<div class="legend" id="svg-sample-legend"></div>
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -146,8 +146,8 @@ <h2 class="modal-title">Search Error</h2>
<option value="Region">Region</option>
<option value="No. samples">No. samples</option>
<option value="Collection date">Collection date</option>
<option value="Divergence" selected>Divergence</option>
<option value="Infections">Infections</option>
<option value="Divergence">Divergence</option>
<option value="Infections" selected>Infections</option>
</select>
<div class="legend" id="div-region-legend"></div>
<div class="legend" id="svg-sample-legend"></div>
1 change: 0 additions & 1 deletion js/beadplot.js
Original file line number Diff line number Diff line change
@@ -1381,7 +1381,6 @@ function serialize_branch(parent, edgelist) {
// terminal node, emit string
// TODO: add count information (number of samples per variant)
coldate = branch[0].x1.toISOString().split('T')[0];
console.log("coldate=",coldate);
return branch[0].child+'|'+coldate+':'+branch[0].dist; // node name : branch length
}
else {

0 comments on commit 9daab54

Please sign in to comment.