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

heatmap only displayed 200 genes: now displaying all in memory store #362

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
7 changes: 5 additions & 2 deletions public/js/p3/store/ProteinFamiliesServiceMemoryStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ define([
) {

var pfStateDefault = {
familyType: 'plfam', // default
familyType: 'pgfam', // default
heatmapAxis: '',
genomeIds: [],
genomeFilterStatus: {},
Expand Down Expand Up @@ -251,6 +251,7 @@ define([
console.log('query = ', query);
console.log('opts = ', opts);
// add fields if needed
// TODO: unnecessary, can be removed
if (query === '' || query === undefined) {
query = { 'familyType': this.pfState.familyType };
}
Expand All @@ -266,6 +267,7 @@ define([
if (query.familyType === 'plfam') {
data = this.plfam_data;
}
// TODO: issues with filtering
data = this.conditionFilter(data);
var total_length = data.length;
// if opts.sort, apply remaining filters
Expand All @@ -277,6 +279,7 @@ define([
data = data.sort((a, b) => (a[sort_field] > b[sort_field]) ? 1 : -1);
}
}
// TODO: this is why the heatmap is showing only 200 genes
var start = 0;
var count = 200;
if (opts && opts.start) {
Expand Down Expand Up @@ -477,7 +480,7 @@ define([
opts.sort = this.pfState.columnSort;
}

var data = this.query({ 'familyType': this.pfState.familyType });
var data = this.query({ 'familyType': this.pfState.familyType }, { 'selectAll': true });
// console.log('heatmap data', data);

var familyOrderMap = {};
Expand Down
6 changes: 2 additions & 4 deletions public/js/p3/widget/ProteinFamiliesServiceContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ define([
// - This container contains the tables and switch between heatmap view and table view

constructor: function (options) {
this.topicId = 'plfam';
this.topicId = 'pgfam';

Topic.subscribe(this.topicId, lang.hitch(this, function () {
var key = arguments[0],
Expand Down Expand Up @@ -297,13 +297,11 @@ define([

var cbType = this.family_type_selector = new Select({
name: 'familyType',
value: 'plfam', // default value on load
value: 'pgfam', // default value on load
options: [{
value: 'plfam', label: 'PATRIC genus-specific families (PLfams)'
}, {
value: 'pgfam', label: 'PATRIC cross-genus families (PGfams)'
}, {
value: 'figfam', label: 'FIGFam'
}]
});
cbType.on('change', lang.hitch(this, function (value) {
Expand Down
4 changes: 2 additions & 2 deletions public/js/p3/widget/ProteinFamiliesServiceHeatmapContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ define([
var key = arguments[0],
value = arguments[1];
console.log('key, ', key, ': value, ', value);

switch (key) {
case 'updatePfState':
this.pfState = value;
Expand Down Expand Up @@ -59,4 +59,4 @@ define([
*/

});
});
});
2 changes: 1 addition & 1 deletion public/js/p3/widget/WorkspaceBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ define([
this.browserHeader.addAction('ProteinFamiliesServiceViewer', 'MultiButton fa icon-eye fa -2x', {
label: 'ProteinFamilies',
validTypes: ['ComparativeSystems'],
tooltip: 'View Pathways Tables'
tooltip: 'View ProteinFamilies Tables'
}, function (selection, container, button) {
console.log(selection);
var path;
Expand Down