Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into release-1.13.0
Browse files Browse the repository at this point in the history
Former-commit-id: 6e474ef
  • Loading branch information
inodb committed May 10, 2018
2 parents 35191c3 + 5885681 commit 53ac086
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 26 deletions.
15 changes: 8 additions & 7 deletions src/pages/resultsView/mutation/MutationMapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,14 @@ export default class MutationMapper extends React.Component<IMutationMapperProps
<div style={{'paddingBottom':10}}>
<h4>{hugoGeneSymbol}</h4>
<div className={this.props.store.uniprotId.result ? '' : 'invisible'}>
<span data-test="GeneSummaryUniProt">UniProt: </span>
<a
href={`http://www.uniprot.org/uniprot/${uniprotId}`}
target="_blank"
>
{uniprotId}
</a>
<span data-test="GeneSummaryUniProt">{'UniProt: '}
<a
href={`http://www.uniprot.org/uniprot/${uniprotId}`}
target="_blank"
>
{uniprotId}
</a>
</span>
</div>
<div className={this.props.store.canonicalTranscript.result ? '' : 'invisible'}>
<span>Transcript: </span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ const exampleData = [
"adjustedPValue": 0.023809523809523704,
"association": "Mutual exclusivity"
},
{
"geneA": "TP53",
"geneB": "BRAF",
"neitherCount": 6,
"aNotBCount": 0,
"bNotACount": 1,
"bothCount": 3,
"logOddsRatio": Infinity,
"pValue": 0.03333333333333314,
"adjustedPValue": 0.19999999999999885,
"association": "Co-occurrence"
},
{
"geneA": "EGFR",
"geneB": "TP53",
Expand Down Expand Up @@ -73,18 +85,6 @@ const exampleData = [
"pValue": 0.2619047619047609,
"adjustedPValue": 1,
"association": "Co-occurrence"
},
{
"geneA": "TP53",
"geneB": "BRAF",
"neitherCount": 6,
"aNotBCount": 0,
"bNotACount": 1,
"bothCount": 3,
"logOddsRatio": Infinity,
"pValue": 0.03333333333333314,
"adjustedPValue": 0.19999999999999885,
"association": "Co-occurrence"
}
];

Expand Down Expand Up @@ -242,8 +242,8 @@ describe("MutualExclusivityUtil", () => {
"bNotACount": 5,
"bothCount": 0,
"logOddsRatio": -6.51,
"pValue": 0.04,
"adjustedPValue": 0.08,
"pValue": 0.02,
"adjustedPValue": 0.04,
"association": "Mutual exclusivity"
},
{
Expand Down Expand Up @@ -277,8 +277,8 @@ describe("MutualExclusivityUtil", () => {
"bNotACount": 5,
"bothCount": 0,
"logOddsRatio": -6.51,
"pValue": 0.04,
"adjustedPValue": 0.08,
"pValue": 0.02,
"adjustedPValue": 0.04,
"association": "Mutual exclusivity"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { getCumulativePValue } from "../../../shared/lib/FisherExactTestCalculat
import { MutualExclusivity } from "../../../shared/model/MutualExclusivity";
import Combinatorics from 'js-combinatorics';
import Dictionary = _.Dictionary;
import * as _ from 'lodash';

export function calculateAssociation(logOddsRatio: number): string {
return logOddsRatio > 0 ? "Co-occurrence" : "Mutual exclusivity";
Expand Down Expand Up @@ -55,7 +56,7 @@ export function getMutuallyExclusiveCounts(data: MutualExclusivity[],
let significantCount = null;

const exclusiveData = data.filter(mutualExclusivity => exclusive(mutualExclusivity.logOddsRatio));
const significantData = exclusiveData.filter(mutualExclusivity => mutualExclusivity.pValue < 0.05);
const significantData = exclusiveData.filter(mutualExclusivity => mutualExclusivity.adjustedPValue < 0.05);

const exclusiveLength = exclusiveData.length;
const significantLength = significantData.length;
Expand Down Expand Up @@ -105,7 +106,7 @@ export function getData(isSampleAlteredMap: Dictionary<boolean[]>): MutualExclus
bothCount: counts[3], logOddsRatio, pValue,
adjustedPValue: calculateAdjustedPValue(pValue, combinations.length), association });
});
return data;
return _.sortBy(data, ["pValue"]);
}

export function getFilteredData(data: MutualExclusivity[], mutualExclusivityFilter: boolean, coOccurenceFilter: boolean,
Expand All @@ -120,7 +121,7 @@ export function getFilteredData(data: MutualExclusivity[], mutualExclusivityFilt
result = result || mutualExclusivity.logOddsRatio > 0;
}
if (significantPairsFilter) {
result = result && mutualExclusivity.pValue < 0.05;
result = result && mutualExclusivity.adjustedPValue < 0.05;
}
return result;
});
Expand Down

0 comments on commit 53ac086

Please sign in to comment.