Giter Site home page Giter Site logo

Comments (3)

GuidoGallo avatar GuidoGallo commented on June 30, 2024 1

Dear Matt
Thank you so much for the rapid answer. You are right, one of the the bam files I was using had an inconsistency with the chromosomes as defined in the vcf header, I didn't realize it.
Thanks again and congratulations for the great tool, it worked perfectly :)

from hiphase.

holtjma avatar holtjma commented on June 30, 2024

Hi @GuidoGallo,

So assuming you're on the latest version, it's getting an error at this point in the code:

bam.fetch((chrom, pos, pos+1)).unwrap();

That line is trying to fetch a region in the BAM file. I've never actually encountered an error there before, so I'm going to do some guessing as to what might be causing it, most of which involve a deviation from "normal" processing that is leaving BAMs and/or VCFs in an inconsistent state:

  1. It looks like you're using multiple BAM files. Is it possible that one or more of the BAM files is missing one or more chromosomes from the dataset? This may be a missing entry in the header. It may also be a chromosome with no alignments to it, I'm not sure what the fetch would do in that instance (if this is the case, we may need to patch it).
  2. Were the VCFs processed in a way that their chromosome lists do not match the BAM headers? If so, it may be trying to fetch a region from the VCF that does match exist in the BAM.
  3. Are you able to tell roughly where this is happening in the processing? In other words, is it happening on a "core" chromosome, or is it throwing errors somewhere in an ALT contig or similar? That may help provide some clues if neither of the above is true.

Hope this helps,
Matt

from hiphase.

holtjma avatar holtjma commented on June 30, 2024

Great, glad it worked out! I'll make a note to improve the messaging there. Hopefully future users won't encounter a cryptic panic message and instead get something a little more insightful.

from hiphase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.