Skip to content

Commit

Permalink
Merge pull request #2802 from adamabeshouse/plots-coexp-mrna-profiles
Browse files Browse the repository at this point in the history
Dont filter out profiles without data for selection in coexpression and plots

Former-commit-id: d715725ed41a94dff8e59a9885dd23d878046576
  • Loading branch information
adamabeshouse authored Oct 22, 2019
2 parents cee9b0f + 812c14f commit fac863e
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 16 deletions.
1 change: 1 addition & 0 deletions end-to-end-test/local/specs/gsva.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ describe('gsva feature', function() {
it('shows gene sets in table when GSVA scores selected in subject profile select box', () => {
selectReactSelectOption($('.coexpression-select-query-profile'), 'GSVA scores on oncogenic signatures gene sets (5 samples)');
$('//*[@id="coexpressionTabGeneTabs"]').waitForExist();
$('span*=GO_').waitForExist();
assert.equal($$('span*=GO_').length, 7);
});

Expand Down
6 changes: 3 additions & 3 deletions src/pages/resultsView/ResultsViewPageStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1243,15 +1243,15 @@ export class ResultsViewPageStore {
});

readonly coexpressionTabMolecularProfiles = remoteData<MolecularProfile[]>({
await: () => [this.molecularProfilesWithData],
await: () => [this.molecularProfilesInStudies],
invoke: () =>
Promise.resolve(
sortRnaSeqProfilesToTop(
filterAndSortProfiles(
this.molecularProfilesWithData.result!
this.molecularProfilesInStudies.result!
).concat(
getGenesetProfiles(
this.molecularProfilesWithData.result!
this.molecularProfilesInStudies.result!
)
)
)
Expand Down
1 change: 1 addition & 0 deletions src/pages/resultsView/coExpression/CoExpressionTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ export default class CoExpressionTab extends React.Component<ICoExpressionTabPro

@bind
private geneTabs() {
// we hack together MSKTabs this way because of some particular responsiveness needs and mobxpromise behavior that may or may not still be relevant
if (this.selectedGeneticEntity.isComplete &&
this.selectedProfileX.isComplete &&
this.selectedProfileY.isComplete &&
Expand Down
31 changes: 21 additions & 10 deletions src/pages/resultsView/coExpression/CoExpressionViz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -393,16 +393,27 @@ export default class CoExpressionViz extends React.Component<ICoExpressionVizPro
data-test="CoExpressionGeneTabContent"
>
<div className="clearfix">
<div style={{width:"40%", float:"left", marginTop:6}}>
<Observer>
{this.table}
</Observer>
</div>
<div style={{width:"60%", float:"right", marginTop:6 /*align with table controls*/}}>
<Observer>
{this.plot}
</Observer>
</div>
{ this.dataStore.allData.length > 0 ? [
<div style={{width:"40%", float:"left", marginTop:6}}>
<Observer>
{this.table}
</Observer>
</div>,
<div style={{width:"60%", float:"right", marginTop:6 /*align with table controls*/}}>
<Observer>
{this.plot}
</Observer>
</div>
] : (
<div style={{
position:"absolute",
top:200,
left:"50%",
transform:"translate(-50%, 0)"
}}>
There is no expression data for <strong>{this.props.geneticEntity.geneticEntityName}</strong> with the selected samples in <strong>{this.props.profileX.name}</strong>.
</div>
)}
</div>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/resultsView/plots/PlotsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -977,11 +977,11 @@ export default class PlotsTab extends React.Component<IPlotsTabProps,{}> {

readonly dataTypeToDataSourceOptions = remoteData<{[dataType:string]:{value:string, label:string}[]}>({
await:()=>[
this.props.store.molecularProfilesWithData,
this.props.store.molecularProfilesInStudies,
this.clinicalAttributeOptions
],
invoke:()=>{
const profiles = this.props.store.molecularProfilesWithData.result!;
const profiles = this.props.store.molecularProfilesInStudies.result!;
const map = _.mapValues(
_.groupBy(profiles, profile=>profile.molecularAlterationType), // create a map from profile type to list of profiles of that type
profilesOfType=>(
Expand Down
3 changes: 2 additions & 1 deletion src/shared/api/generated/CBioPortalAPIInternal-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,8 @@
"required": [
"counts",
"entrezGeneId",
"hugoGeneSymbol"
"hugoGeneSymbol",
"pValue"
],
"properties": {
"counts": {
Expand Down

0 comments on commit fac863e

Please sign in to comment.