mcveanlab / mccortex

De novo genome assembly and multisample variant calling
https://github.com/mcveanlab/mccortex/wiki
MIT License
113 stars 25 forks source link

ld cannot find libcurses.so #88

Closed markcharder closed 4 years ago

markcharder commented 4 years ago

Apologies in advance for the novice computing skills, but I thought this might be a useful issue to fix or present in the docs for biologists like me!

Just letting you know that if libncurses is installed from source (e.g. if you don't have admin rights on a server), programs that use it should link to libncurses.a.

It seems like the samtools version bundled with mccortex tries to link to libcurses.so, which doesn't come with libncurses by default.

I'm not sure what's happening with APT as mccortex will build fine when libncurses is installed through the APT. I've found a workaround by creating a symlink from libcurses.so to libncurses.a, which I think is the actual file that ld is looking for during compilation.

I've not tested mccortex yet but fingers crossed it works.

winni2k commented 4 years ago

If you are having a hard time compiling mccortex, then you could also give the bioconda package a go: https://bioconda.github.io/recipes/mccortex/README.html

markcharder commented 4 years ago

Thanks for the quick reply. Compilation is fine, it just needs to access libncurses.a through its old name. I'd prefer to install it as a module on the server rather than use Bioconda but thanks for the suggestion.

I do have another issue now, possibly you'll be able to help. I'm using 100GB memory and 28 cpus (machine has 128 GB RAM). If I run the following commands:

make-pipeline.pl -r genome.fasta \
                            --ploidy 1 31,61 \
                            mc_calls mccortex-inputs.txt > job1.mk

make -f job1.mk CTXDIR=/path/to/mccortex MEM=100GB NTHREADS=28 \
                       JOINT_CALLING=yes USE_LINKS=no brk-geno-vcf

I get the following error message:

[16 Apr 2020 17:09:42-BAq][hash_table.c:247] Fatal Error: Hash table is full

In the last line of the file joint.brk.gz.log.

I've had the same issue on a smaller computer which was why I migrated to the larger one.

I'd really appreciate your help.

winni2k commented 4 years ago

I think I've run into this as well.

I would guess the relevant command line options might be:

  -m, --memory <M>      Memory e.g. 1GB [default: 1GB]
  -n, --nkmers <H>      Hash entries [default: 4M, ~4 million]

I don't know anything about how make-pipeline.pl works.

Good luck.

markcharder commented 4 years ago

Thank you @winni2k. I'm closing this issue since the original problem was resolved - my intention was just to make the developers aware.

I've moved discussion of the secondary issue here, as somebody else mentioned it a long time ago.