Skip to content

Commit

Permalink
show blast runs table as detail panel
Browse files Browse the repository at this point in the history
  • Loading branch information
chgibb committed Jul 6, 2019
1 parent 1699dec commit f2b8f56
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
23 changes: 22 additions & 1 deletion src/req/renderer/containers/BLASTRunsTable.tsx
Expand Up @@ -24,7 +24,28 @@ export function BLASTRunsTable(props : BLASTRunsTableProps) : JSX.Element
}
},
{
title
title : "Stop",
render : (row) => {
return row.stop
}
},
{
title : "Reads BLASTed",
render : (row) => {
return row.readsBLASTed;
}
},
{
title : "Program",
render : (row) => {
return row.program;
}
},
{
title : "Date Ran",
render : (row) => {
return row.dateStampString;
}
}
]}
/>
Expand Down
26 changes: 24 additions & 2 deletions src/req/renderer/containers/alignmentsReportTable.tsx
Expand Up @@ -11,6 +11,7 @@ import {AtomicOperationIPC} from "../../atomicOperationsIPC";
import {TableCellHover} from "./tableCellHover";
import {SNPPositionsTable} from "./snpPositionsTable";
import {ReadsPerContigTable} from "./readsPerContigTable";
import { BLASTRunsTable } from './BLASTRunsTable';

const ipc = electron.ipcRenderer;

Expand All @@ -37,6 +38,11 @@ export class AlignmentsReportTable extends React.Component<AlignmentsReportTable
return `${row.uuid}ViewAlignment`;
}

public BLASTRunsCellId(row : AlignData) : string
{
return `${row.uuid}ViewBLASTRuns`;
}

public render(): JSX.Element
{
return (
Expand Down Expand Up @@ -70,6 +76,17 @@ export class AlignmentsReportTable extends React.Component<AlignmentsReportTable
/>
);
}
},
{
tooltip: "BLAST Runs",
render : (rowData : AlignData) => {
return (
<BLASTRunsTable
align={rowData}
isSubTable={true}
/>
);
}
}
]}
onRowClick={(event: React.MouseEvent<HTMLElement>, rowData: AlignData, toggleDetailPanel) =>
Expand Down Expand Up @@ -130,6 +147,11 @@ export class AlignmentsReportTable extends React.Component<AlignmentsReportTable
} as AtomicOperationIPC
);
}

else if(this.BLASTRunsCellId(rowData) == el.id)
{
toggleDetailPanel(2);
}
}
}}
columns={[
Expand All @@ -138,7 +160,7 @@ export class AlignmentsReportTable extends React.Component<AlignmentsReportTable
render: (row: AlignData) =>
{
return (<div id={this.aliasCellId(row)} className={TableCellHover.cellHoverClass}>{row.alias}</div>);
}
},
},
{
title: "Aligner",
Expand Down Expand Up @@ -229,7 +251,7 @@ export class AlignmentsReportTable extends React.Component<AlignmentsReportTable
title: "BLAST Runs",
render: (row: AlignData) =>
{
return row.BLASTSegmentResults ? row.BLASTSegmentResults.length : 0;
return row.BLASTSegmentResults ? (<div id={this.BLASTRunsCellId(row)} className={TableCellHover.cellHoverClass}>{row.BLASTSegmentResults.length}</div>) : 0;
}
},
{
Expand Down

0 comments on commit f2b8f56

Please sign in to comment.