Skip to content

Commit

Permalink
Segment cycle detection improvement and new exmaple data
Browse files Browse the repository at this point in the history
  • Loading branch information
ducku committed Feb 12, 2024
1 parent 2c75e70 commit a9554eb
Show file tree
Hide file tree
Showing 5 changed files with 493 additions and 19 deletions.
11 changes: 10 additions & 1 deletion src/components/ExampleSelectButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,16 @@ class ExampleSelectButtons extends Component {
this.handleClick(dataOriginTypes.EXAMPLE_8, "plainColors")
}
>
Multiple Nodes Cycle
Multiple Nodes Cycle 1
</Button>
<Button
color="primary"
id="example9"
onClick={() =>
this.handleClick(dataOriginTypes.EXAMPLE_9, "plainColors")
}
>
Multiple Nodes Cycle 2
</Button>
</Form>
);
Expand Down
17 changes: 14 additions & 3 deletions src/components/TubeMapContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ class TubeMapContainer extends Component {
0,
1 // Examples always have reads as track 1
);
console.log("READS", reads);
break;
case dataOriginTypes.EXAMPLE_8:
vg = data.cycleGraph;
Expand All @@ -285,8 +284,20 @@ class TubeMapContainer extends Component {
0,
1 // Examples always have reads as track 1
);

console.log("READS", reads);

break;
case dataOriginTypes.EXAMPLE_9:
vg = data.cycle2Graph;
nodes = tubeMap.vgExtractNodes(vg);
tracks = tubeMap.vgExtractTracks(vg, 0, 0); // Examples have paths and haplotypes as track 0.
reads = tubeMap.vgExtractReads(
nodes,
tracks,
data.cycle2Reads,
0,
1 // Examples always have reads as track 1
);

break;
case dataOriginTypes.NO_DATA:
// Leave the data empty.
Expand Down
1 change: 1 addition & 0 deletions src/enums.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ export const dataOriginTypes = {
EXAMPLE_6: "example 6",
EXAMPLE_7: "example 7",
EXAMPLE_8: "example 8",
EXAMPLE_9: "example 9",
NO_DATA: "no data",
};
Loading

0 comments on commit a9554eb

Please sign in to comment.