Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor: Bug fixes #536

Merged
merged 7 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Expand Up @@ -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 ;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions index-es.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions index-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions index-zh.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 0 additions & 1 deletion js/beadplot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading