question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use of int8 for variant_contig results in integer overflow with fragmented reference genomes

See original GitHub issue

Many (non human) reference genomes contain 1000s of contigs that have not been assembled into full chromosomes. Currently the variant_contig array is hard coded as int8 (line) which results in integer overflow making it impossible to join variants to their contig.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
jeromekellehercommented, Jun 1, 2021

We should make it an option to specify the dtype for variant_contig probably - even int16 will overflow sometimes. There are lots of VCFs out there with huge numbers of contigs.

Although, I guess this is the sort of thing we should be able to query the IO library for (“how many contigs are there” should be efficiently computable on any indexed VCF), so we should be able to automatically detect the minimal dtype. Even then though, I suppose people might want to manually specify the dtype, for their own reasons.

2reactions
tomwhitecommented, Sep 14, 2021

Nice!

I’ve created a fix in #667. Hopefully we can get that merged soon for you to use.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pysam.AlignmentFile Example - Program Talk
Learn how to use python api pysam. ... the cut arrays are sorted by genomic coordinate Returns: contig, {cell: np.array([cut1(int),cut2(int)])} ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found