Skip to content

Support for CRAM v3.1 #224

Closed
Closed

Description

@adthrasher

I've looked through the documentation, but I don't see any explicit list on mosdepth or hts-nim. However, when I try to run mosdepth on a v3.1 CRAM file, I get decoding errors. These v3.1 CRAM files work fine with other software. mosdepth also works fine when I use a v3.0 CRAM file for the sample. Can you clarify if mosdepth 0.3.6 supports v3.1 CRAM files?

[E::cram_next_slice] Failure to decode slice
[hts-nim] error:-2 in bam.queryi for tid:0 0..248956422
[E::cram_next_slice] Failure to decode slice
[hts-nim] error:-2 in bam.queryi for tid:1 0..242193529
[E::cram_next_slice] Failure to decode slice
[hts-nim] error:-2 in bam.queryi for tid:2 0..198295559
[E::cram_next_slice] Failure to decode slice
[hts-nim] error:-2 in bam.queryi for tid:3 0..190214555

Activity

  1. brentp commented on Mar 18, 2024

    @brentp
    Owner

    Hi, I do expect it to work.
    Can you verify this still occurs when you use a single thread (-t 0)?
    And can you make sure to re-index the cram and see if you still get an error?

  2. adthrasher commented on Mar 18, 2024

    @adthrasher
    Author

    Thanks @brentp. I was already running with a single thread, but I explicitly added -t 0 to check. I still see the error. I've also reindexed the CRAM file and continue to get the error. I also regenerated the CRAM file from the source BAM as well as generating a small CRAM file from a subset of the BAM. I continue to see the above errors.

    When I regenerate the subset CRAM as a v3.0, then mosdepth works as expected.

    Is there any option to enable debugging output? I don't see an option to mosdepth.

  3. brentp commented on Mar 19, 2024

    @brentp
    Owner

    Hi Andrew, will you give this binary a try? (gunzip and chmod +x)
    I built it with latest version of htslib which has some cram fixes since the version I was using previously.
    mosdepth_hts1_19_1.gz

  4. brentp commented on Mar 19, 2024

    @brentp
    Owner

    if that doesn't work and you could upload a small cram that displays this problem, I'll investigate further.

  5. added a commit that references this issue on Mar 19, 2024
  6. adthrasher commented on Mar 19, 2024

    @adthrasher
    Author

    Thanks @brentp! The updated binary works with my v3.1 CRAM files. I did generate them with samtools v1.19.2 which uses htslib 1.19.1. Thanks for your quick help on this!

  7. added a commit that references this issue on Mar 20, 2024
    71e5fd2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions