Skip to content

Commit

Permalink
Merge pull request #490 from KPMP/KPMP-5072_ShowProteins
Browse files Browse the repository at this point in the history
Kpmp 5072 show proteins
  • Loading branch information
zwright authored Mar 5, 2024
2 parents d19c0d7 + 8e043ad commit 89796dd
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions src/components/ExpressionTables/DiffexByCluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,42 @@ class DiffexByCluster extends Component {
}
}

getAccessionLink = (gene, accession) => {
return <button onClick={() => this.handleClick(gene)} type='button' className='table-column btn btn-link text-start p-0'>{accession}</button>
}

getGeneLink = (gene) => {
return <button onClick={() => this.handleClick(gene)} type='button' className='table-column btn btn-link text-start p-0'>{gene}</button>
};

getColumns = () => {
let columns = [];
if (this.props.dataType === 'rp') {
columns.push(
{
title: 'PROTEIN',
field: 'accession',
align: 'left',
width: "15%",
headerStyle: { fontSize: "15px" },
cellStyle: { fontSize: '14px', padding: "2px" },
render: rowData => this.getAccessionLink(rowData.gene, rowData.accession)
}
);
} else {
columns.push(
{
title: 'GENE',
field: 'gene',
align: 'left',
width: "15%",
headerStyle: { fontSize: "15px" },
cellStyle: { fontSize: '14px', padding: "2px" },
render: rowData => this.getGeneLink(rowData.gene)
}
);
}
columns.push(
{
title: 'GENE',
field: 'gene',
align: 'left',
width: "15%",
headerStyle: { fontSize: "11px" },
cellStyle: { fontSize: '14px', padding: "2px" },
render: rowData => this.getGeneLink(rowData.gene)
},
{
title: <span>FOLD CHANGE <span className="icon-info"><FontAwesomeIcon className='kpmp-light-blue' id='fold-change-info' icon={faInfoCircle} /></span>
<UncontrolledTooltip placement='bottom' target='fold-change-info' >
Expand Down

0 comments on commit 89796dd

Please sign in to comment.