Skip to content

Commit

Permalink
update mutation mapper version, left align gnomad column
Browse files Browse the repository at this point in the history
  • Loading branch information
leexgh committed Jan 21, 2020
1 parent 92ac523 commit 766bd29
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ export default class GnomadFrequency extends React.Component<GnomadFrequencyProp
display = (
<span>
{result['Total'].alleleFrequency.toLocaleString(undefined, {
maximumSignificantDigits: 4,
minimumSignificantDigits: 1,
maximumSignificantDigits: 2,
minimumSignificantDigits: 2,
})}
</span>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export function frequencyOutput(frequency: number) {
return (
<span>
{frequency.toLocaleString(undefined, {
maximumSignificantDigits: 4,
minimumSignificantDigits: 1,
maximumSignificantDigits: 2,
minimumSignificantDigits: 2,
})}
</span>
);
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/mutationTable/MutationTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ export default class MutationTable<P extends IMutationTableProps> extends React.
Overall population allele frequency is shown. Hover over a frequency to see the frequency for each specific population.</span>),
defaultSortDirection: "desc",
visible: false,
align: "right"
align: "left"
};

this._columns[MutationTableColumnType.CLINVAR] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,21 @@ import {Circle} from "better-react-spinkit";
import 'rc-tooltip/assets/bootstrap_white.css';
import {Mutation} from "shared/api/generated/CBioPortalAPI";
import {
DefaultTooltip,
TableCellStatusIndicator,
TableCellStatus,
MyVariantInfo,
MyVariantInfoAnnotation,
Gnomad,
AlleleCount,
AlleleNumber,
Homozygotes,
AlleleFrequency
MyVariantInfoAnnotation
} from 'cbioportal-frontend-commons';
import GenomeNexusMyVariantInfoCache, { GenomeNexusCacheDataType } from "shared/cache/GenomeNexusMyVariantInfoCache";
import {calculateGnomadAllelFrequency, GnomadFrequency, gnomadSortValue} from "react-mutation-mapper";
import generalStyles from "./styles.module.scss";

export default class GnomadColumnFormatter {

public static renderFunction(data: Mutation[],
genomeNexusMyVariantInfoCache: GenomeNexusMyVariantInfoCache | undefined) {
const genomeNexusCacheData = GnomadColumnFormatter.getGenomeNexusDataFromCache(data, genomeNexusMyVariantInfoCache);
return (
<div className={generalStyles["integer-data"]}>
<span data-test='gnomad-column' data-test2={data[0].sampleId}>{GnomadColumnFormatter.getGnomadDataViz(genomeNexusCacheData)}</span>
</div>
<span data-test='gnomad-column' data-test2={data[0].sampleId}>{GnomadColumnFormatter.getGnomadDataViz(genomeNexusCacheData)}</span>
);
}

Expand Down

0 comments on commit 766bd29

Please sign in to comment.