Comments (14)
if you use choosenim
then it's simply: choosenim 0.17.2
or choosenim 0.18.0
.
from hts-nim.
Would be great to join forces.
Yes! When I get this working, I will gladly drop my htslib-wrapping work. What I need the most is a subset of networkx, for graph libraries.
Just sent you an invite for bio-nim. If you want to host hts-nim there, I'd even make you an owner. Otherwise, we'll just updated our fork now and then.
from hts-nim.
I joined. I'm not opposed to moving, but don't want to do it now as it just came out. If it gains traction and contributors then the bio-nim namespace would be nice.
from hts-nim.
With nim-0.18.0, the cigar.nim
valgrind warnings are gone. (There are still tons in Nim alloc.nim
, but that's because of Nim's memory-management.) And the tests never fail. Excellent!
Closing.
from hts-nim.
I think this is a bug in the testing framework in nim. I see it periodically but I can never recreate in real code. We've run mosdepth 10's of thousands of times, and each of those writes multiple bgzf files and never get a failure.
how did you link statically?
from hts-nim.
I ran valgrind on tests/all
, and I found some possible problems:
==5486== Use of uninitialised value of size 8
==5486== at 0x459A6A: ref_coverage_YBLv47zweGLEtZG2KmYifw (cigar.nim:100)
==5486== by 0x4264C7: hts_cigartestInit000 (cigartest.nim:23)
==5486== by 0x40223F: PreMainInner (system.nim:2844)
==5486== by 0x40229B: PreMain (system.nim:2862)
==5486== by 0x4022B7: NimMain (system.nim:2874)
==5486== by 0x40230B: main (system.nim:2884)
==5486==
==5486== Use of uninitialised value of size 8
==5486== at 0x459174: X5BX5D__Wj0nQaHHpbJA69bFJgqE2BQbam (cigar.nim:51)
==5486== by 0x459A88: ref_coverage_YBLv47zweGLEtZG2KmYifw (cigar.nim:100)
==5486== by 0x4264C7: hts_cigartestInit000 (cigartest.nim:23)
==5486== by 0x40223F: PreMainInner (system.nim:2844)
==5486== by 0x40229B: PreMain (system.nim:2862)
==5486== by 0x4022B7: NimMain (system.nim:2874)
==5486== by 0x40230B: main (system.nim:2884)
18 test "ref coverage":
19 var b:hts.Bam
20 open(b, "tests/HG02002.bam")
21 for rec in b:
22 if rec.flag.unmapped: continue
23 var pieces = rec.cigar.ref_coverage(ipos=rec.start)
I think rec.cigar
is not fully initialized there. I hope that helps.
from hts-nim.
How did you link statically?
Actually, I don't know.
Hint: gcc -o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/all /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/hts_all.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_system.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/hts_cigartest.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/hts_faitest.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_unittest.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_macros.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_strutils.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_streams.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_times.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_sets.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_parseutils.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_math.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_algorithm.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_hashes.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_os.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_posix.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_ospaths.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_terminal.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_termios.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/hts_bam.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/hts_hts_concat.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/hts_simpleoption.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/stdlib_typetraits.o /home/UNIXHOME/cdunn/repo/gh/hts-nim/tests/nimcache/hts_fai.o -lm -lrt -ldl [Exec]
I don't see where that links with htslib. It's definitely not dynamically linked:
$ ldd tests/all
linux-vdso.so.1 => (0x00007ffe63752000)
libm.so.6 => /lib64/libm.so.6 (0x00002ac4332ee000)
librt.so.1 => /lib64/librt.so.1 (0x00002ac4335f1000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002ac4337f9000)
libc.so.6 => /lib64/libc.so.6 (0x00002ac4339fd000)
/lib64/ld-linux-x86-64.so.2 (0x00005574d0019000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002ac433dc1000)
from hts-nim.
can you try with nim 0.18.XX ? I just did:
for i in $(seq 200); do ./tests/all || break; done
and got no problems. but got a break nearly immediately with 0.17.2
from hts-nim.
I have to install 0.18.
I'll update this ticket when I do.
from hts-nim.
We have an older glibc, so I have to do something special to install. (Long story.)
* https://github.com/nim-lang/Nim/issues/1734
* https://forum.nim-lang.org/t/1972
* https://github.com/nim-lang/Nim/issues/3138
Not sure if that's solved yet. (Araq would have to update csources.)
from hts-nim.
ouch. yeah, that's a pain. can you setup your own gcc via (bio)conda and use that?
I see you probably have more experience in nim than I do! I hadn't seen your stuff. Would be great to join forces.
from hts-nim.
What versions of htslib does this work with? I had to do some special if-wrapping for older htslib.
from hts-nim.
1.6+ for sure. maybe 1.5+
from hts-nim.
The biggest annoyance was new return values on old functions. In C, those funcs are still binary-compatible, but in Nim you have to "discard" or use the return values.
I don't think you need to worry about 1.5 though. You're lucky you started with 1.6!
from hts-nim.
Related Issues (20)
- Issue with vcf.nim when running nimble test or importing HOT 3
- VCF: Clear all INFO field HOT 2
- Multiple iterators with items*(v:VCF) HOT 3
- hts-1.10 assertion failed HOT 3
- bai index HOT 8
- Write to bam/cram instead of sam HOT 3
- Version bump HOT 3
- Static binary not working from AMD nodes HOT 6
- Failure to compile when using new Nim Gas (ORC and ARC) HOT 2
- No public facing method for closing Fai file HOT 3
- Version tag in 0.3.13 is wrong HOT 1
- Static build with libRmath-nim library causing undefined reference HOT 3
- Error: unhandled exception: invalid bgzf file [ValueError]
- Get list of INFO and FORMAT keys from Header HOT 1
- Is there any way to get the variant's row index when using the iterator query() HOT 2
- Modifying GT from ivcf and write to ovcf for multiple pairs of inputs and outputs HOT 6
- Issues with nimble test HOT 6
- Trouble with newRecord "undeclared identifier" in bam HOT 7
- Question about multiple nalts for single record HOT 4
- Question: changing BAM alignment records in place HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hts-nim.