Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Read Cycle Layout #389

Merged
merged 12 commits into from
Feb 26, 2024
18 changes: 18 additions & 0 deletions src/components/ExampleSelectButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,24 @@ class ExampleSelectButtons extends Component {
>
Alignments to Reverse Nodes
</Button>
<Button
color="primary"
id="example8"
onClick={() =>
this.handleClick(dataOriginTypes.EXAMPLE_8, "plainColors")
}
>
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
26 changes: 26 additions & 0 deletions src/components/TubeMapContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,32 @@ class TubeMapContainer extends Component {
0,
1 // Examples always have reads as track 1
);
break;
case dataOriginTypes.EXAMPLE_8:
vg = data.cycleGraph;
nodes = tubeMap.vgExtractNodes(vg);
tracks = tubeMap.vgExtractTracks(vg, 0, 0); // Examples have paths and haplotypes as track 0.
reads = tubeMap.vgExtractReads(
nodes,
tracks,
data.cycleReads,
0,
1 // Examples always have reads as track 1
);

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
2 changes: 2 additions & 0 deletions src/enums.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ export const dataOriginTypes = {
EXAMPLE_5: "example 5",
EXAMPLE_6: "example 6",
EXAMPLE_7: "example 7",
EXAMPLE_8: "example 8",
EXAMPLE_9: "example 9",
NO_DATA: "no data",
};
Loading
Loading