Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

radsex map not working #18

Closed
DrPintoThe2nd opened this issue Apr 26, 2020 · 8 comments
Closed

radsex map not working #18

DrPintoThe2nd opened this issue Apr 26, 2020 · 8 comments

Comments

@DrPintoThe2nd
Copy link

Hi Romain,

Great job on this software, can't stress enough how great it is!
I'm having issues with version 1.0, I can't seem to get the map function to work, although I had it working a few months ago with the same data (albeit different reference genome), I'm currently working in a Ubuntu 18.04 virtual environment via Windows 10.

My command is comparable to your example:
$ radsex map --markers-file coverage_table.tsv --output-file alignment_results.tsv --popmap popmap.txt --genome-file LG.fasta --min-quality 20 --min-frequency 0.1 --min-depth 5 --groups M,F

and the error is always some variation of "Segmentation fault (core dumped)", e.g.
'''
[2020-04-26 10:16:12]::INFO Loaded popmap ("M": 7, "F": 9)
[2020-04-26 10:16:12]::INFO RADSex started
[2020-04-26 10:16:12]::INFO Comparing groups "M" and "F" [M::bwa_idx_load_from_disk] read 0 ALT contigs
terminate called after throwing an instance of 'std::out_of_range'
what(): _Map_base::at
Aborted (core dumped)
'''

Thanks again, hope this isn't too widespread!
Best,
bjp

@RomainFeron
Copy link
Collaborator

Hi Brendan,
Thanks a lot for the nice comments!

This looks like it could be a tough problem to solve; it could be a dataset-related issue or an environment-related one. To help pinpoint what went wrong, it'd be helpful to know:

  • Did you start the analysis from scratch after updating to 1.0?
  • If possible, did you try aligning markers from the same dataset to the same assembly?
  • Did you try other datasets and if yes, do you have the same problem?
  • In case we can't pinpoint the issue like this, would you be open to sharing the data with me so I can try to debug it locally?

Best,
Romain

@DrPintoThe2nd
Copy link
Author

DrPintoThe2nd commented Apr 28, 2020

Hi Romain,

Some more information that could be relevant, I am running radsex in its own conda environment with only radsex and bwa installed.

  • Yes, I started from scratch with v1.0.
  • I did attempt to re-create the previous analysis (same reference) to no avail.
  • I've tried using the map function on RADseq from 3 different species, same reference genome, one is the same as the reference. Always the same issue.
  • I'd be happy to share a subset the data with you, although I am not entirely sure the most efficient way to do so.

Best,
bjp

@RomainFeron
Copy link
Collaborator

Hi Brendan,

Thanks for the precision, my guess is that it's likely tied to the genome you're using. The easiest is probably to share the genome + the markers table from process for one dataset and I can investigate what's going on more easily. I will contact you with a way to do that safely.

Thanks!
Romain

@RomainFeron
Copy link
Collaborator

I think this should be fixed in release 1.1.2 (and in the latest repo version).
Could you try to run map again after updating radsex and tell me if it works for you now?

@DrPintoThe2nd
Copy link
Author

Hi Romain,
Thanks again for taking on these bug fizes so quickly.
Full disclosure: I've never actually been able to assemble radsex from its source code, so I can't test these fixes yet.
On my linux, my gcc compliler is out-of-date and I can't update it.. oh well. haha
However, on my desktop (where I usually run radsex in a virtual enviroment) I get this error and I can't find a workaround:

(cd ./include/bwa && make CC=gcc -j 1)
make[1]: Entering directory '~/radsex/include/bwa'
gcc -g -Wall -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-result -O2   -c -o bntseq.o bntseq.c
bntseq.c:31:10: fatal error: zlib.h: No such file or directory
 #include <zlib.h>
          ^~~~~~~~
compilation terminated.
<builtin>: recipe for target 'bntseq.o' failed
make[1]: *** [bntseq.o] Error 1
make[1]: Leaving directory '~/radsex/include/bwa'
Makefile:50: recipe for target 'include/bwa/libbwa.a' failed
make: *** [include/bwa/libbwa.a] Error 2

Do you have any ideas? I've tried a few things including installing a zlib folder within the radsex folder, but to no avail.
Best,
bjp

@RomainFeron
Copy link
Collaborator

Hi Brendan,

I have two suggestions:

  • This error usually occurs when zlib-dev is not installed. I don't know exactly what type of environment you're using but If you can, try to install zlib-dev in it. For instance if you're on an ubuntu virtual machine (with a recent ubuntu version), you'd need to install it with "sudo apt install zlib1g-dev".
  • You could try to install radsex with conda if you have conda setup

Let me know if either solution works!

@DrPintoThe2nd
Copy link
Author

DrPintoThe2nd commented Apr 29, 2020

Brilliant! Installing the zlib1g-dev package fixed it.

and it appears to be running!

[M::bwa_idx_load_from_disk] read 0 ALT contigs
[2020-04-29 09:33:51]::INFO    Progress: [#.................................................] - 2% (353770 markers)  

Thanks Romain! You've perhaps saved my dissertation! <3
Best,
bjp

@RomainFeron
Copy link
Collaborator

Cool! Best of luck with the dissertation ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants