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

IGV Panel #22

Open
shihabdider opened this issue Dec 5, 2024 · 1 comment
Open

IGV Panel #22

shihabdider opened this issue Dec 5, 2024 · 1 comment
Assignees

Comments

@shihabdider
Copy link
Contributor

shihabdider commented Dec 5, 2024

Some remaining features for the IGV Panel.

  • Add a debounce to the zoom/translation on view port (for all tracks)
  • Make SNV events zoom into the mutation (i.e remove the padding that encapsulates the whole gene instead replace with a padding of 250bp with the mutation centered)
    See:
    if (["SNV", "DEL"].includes(event.vartype)) {
    // center the SNV in the plot while encapsulating its gene in the
    // window
    try {
    const snvMatch = regex.exec(event.Variant_g);
    const snvStartPoint = parseInt(snvMatch[2]);
    const snvEndPoint = parseInt(snvMatch[3]);
    const geneStartPoint = parseInt(startPoint);
    const geneEndPoint = parseInt(endPoint);
    let padding =
    snvStartPoint - geneStartPoint > geneEndPoint - snvEndPoint
    ? snvStartPoint - geneStartPoint
    : geneEndPoint - snvEndPoint;
    padding += 1000;
    startPoint = parseInt(snvStartPoint - padding);
    endPoint = parseInt(snvEndPoint + padding);
    location = event.Variant_g;
    actualLocation = `${chromosome}:${startPoint}-${chromosome}:${endPoint}`;

    Just set padding to 250 instead of computing it based on gene position.
  • set sort by base as the default view
    add "sort": { option: "BASE" }, to
    const igvOptions = {
    genome: "hg19",
    locus: domainToLoci(chromoBins, domain),
    tracks: [
    {
    name,
    url,
    indexURL,
    format,
    },
    ],
    };
  • (low-priority) Make the center line toggle in the IGV Panel also display a center line in the other tracks
  • (low-priority) make double-clicking on a mutations point center all tracks (including IGV panel) on that mutation's location (without changing the zoom level). Essentially this would be similar to a call to the handler that translates the view port on user mouse drag. When the user double-clicks on a mutation point, it should be as if the user had dragged their mouse to make the mutation point the center of the view port.
@xanthopoulakis
Copy link
Collaborator

@shihabdider , I managed to resolve the bullet items 1, 2, and 5, for the othes (3, 4) I will probably need to pick your brains

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants