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

Support GAF alignment files #417

Open
adamnovak opened this issue Apr 9, 2024 · 2 comments
Open

Support GAF alignment files #417

adamnovak opened this issue Apr 9, 2024 · 2 comments

Comments

@adamnovak
Copy link
Member

Now that vg supports indexed GAF files, we should be able to support GAF alongside GAM as a file type for read tracks.

@adamnovak adamnovak converted this from a draft issue Apr 9, 2024
@adamnovak
Copy link
Member Author

This might need the -F option to vg chunk when passing it a GAF.

@adamnovak
Copy link
Member Author

To make this work, we need to:

  • Add gaf as a recognized extension:
    "read": ".gam"
  • Change a bunch of code in the server that uses "gam" to refer to the concept of a reads file:
    let gamFiles = getGams(req.body.tracks);
    console.log("graphFile ", graphFile);
    console.log("gbwtFile ", gbwtFile);
    console.log("bedFile ", bedFile);
    console.log("gamFiles ", gamFiles);
    req.withGam = true;
    if (!gamFiles || !gamFiles.length) {
    req.withGam = false;
    console.log("no gam index provided.");
    }

    // push all gam files
    for (const gamFile of gamFiles) {
    if (!gamFile.endsWith(".gam")) {
    throw new BadRequestError("GAM file doesn't end in .gam: " + gamFile);
    }
    if (!isAllowedPath(gamFile)) {
    throw new BadRequestError("GAM file path not allowed: " + gamFile);
    }
    // Use a GAM index
    console.log("pushing gam file", gamFile);
    vgChunkParams.push("-a", gamFile, "-g");
    }
  • Also in that last block, add code to use -F for GAF files. I think this might be a flag to mark the "GAM" files as actually GAF; we might really need to teach vg chunk to mix GAM and GAF files to do this properly.
  • Fix some more loactions where we explicitly say we're passing around GAM files:
    gamIndices: ["cactus-NA12879.sorted.gam"],

  • Adjust the importer scripts to allow GAF files in addition to GAM files.

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

No branches or pull requests

1 participant