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

Can't find reference #188

Open
ktruve opened this issue May 30, 2024 · 1 comment
Open

Can't find reference #188

ktruve opened this issue May 30, 2024 · 1 comment

Comments

@ktruve
Copy link

ktruve commented May 30, 2024

Hi,

I installed hap.py with apptainer. When trying to run with the following command:
apptainer run hap.py_latest.sif /opt/hap.py/bin/hap.py truth.vcf comp.vcf -f HG002_GRCh38_1_22_v4.2.1_benchmark_noinconsistent.bed -o HG002_hg38_comp -r full_path_to.fasta

I get the following error:
2024-05-30 12:23:05,656 WARNING No reference file found at default locations. You can set the environment variable 'HGREF' or 'HG19' to point to a suitable Fasta file.
2024-05-30 12:23:05,664 WARNING No reference file found at default locations. You can set the environment variable 'HGREF' or 'HG19' to point to a suitable Fasta file.
2024-05-30 12:23:05,895 ERROR Please specify a valid reference path using -r.
2024-05-30 12:23:05,896 ERROR Traceback (most recent call last):
2024-05-30 12:23:05,896 ERROR File "/opt/hap.py/bin/hap.py", line 508, in
2024-05-30 12:23:05,896 ERROR main()
2024-05-30 12:23:05,896 ERROR File "/opt/hap.py/bin/hap.py", line 208, in main
2024-05-30 12:23:05,896 ERROR raise Exception("Please specify a valid reference path using -r.")
2024-05-30 12:23:05,896 ERROR Exception: Please specify a valid reference path using -r.

Please help me how to solve this problem.
I have tried to write export HGREF=$ref_genome_path which doesn't help

Best,
Katarina

@pgonzale60
Copy link

Hi Katarina,

I had the same issue and didn't manage to overcome in apptainer/singularity nor in docker. In both cases it failed with Please specify a valid reference path using -r. I ensured that the environmental variable was set by explicitly calling sh and doing echo $HGREF, which showed me the environmental variable was set inside the container but the script was unable to detect it. I suspect it might have to do with which paths are available from the container, but even after attaching the relevant directories with presumed correct inside container paths, not working.

Have you seen this other issue? Axel shares his recommendations on singularity command.

Best,
Pablo

P.S. What worked for me was to use the installation script in a conda environment with the requirements.

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