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

Error when training model from scratch #39

Open
oshiomah1 opened this issue Jul 28, 2022 · 2 comments
Open

Error when training model from scratch #39

oshiomah1 opened this issue Jul 28, 2022 · 2 comments

Comments

@oshiomah1
Copy link

oshiomah1 commented Jul 28, 2022

Hello I'm following the gnomic demo tutorial. I'm running the line below adapted from the tutorial. I am using a Conda environment through a Mac terminal

python3 /share/hennlab/progs/gnomix/gnomix.py /share/genomes/1000genomes/phase3/ALL.chr22.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz /share/hennlab/progs/gnomix/demo/data/allchrs.b37.gmap /share/hennlab/progs/gnomix/demo/data/output 22 False /share/hennlab/progs/gnomix/demo/data/reference_1000g.vcf /share/hennlab/progs/gnomix/demo/data/1000g.smap > /share/hennlab/progs/gnomix/demo/training_log.txt`

I keep getting this error:
FileNotFoundError: [Errno 2] No such file or directory: 'False'

Is gnomix interpreting False as a file? How can I troubleshoot this error?
I'm using python 3.7.4 and I downloaded all required packages from the requirements.txt file

This is the python script that I used to create the gnomic call above:

`import numpy as np
import os
import pandas as pd

data_path = "/share/hennlab/progs/gnomix/demo/data"
query_file = "/share/genomes/1000genomes/phase3/" + "ALL.chr22.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz"
reference_file = "/share/hennlab/progs/gnomix/demo/data/" + "reference_1000g.vcf"
sample_map_file = "/share/hennlab/progs/gnomix/demo/data/" + "1000g.smap"
genetic_map_file = "/share/hennlab/progs/gnomix/demo/data/" + "chr22.b37.gmap"
chm_nr = "22"
phase = "False"
output_basename = "/share/hennlabprogs/gnomix/demo/data/output"

train_cmd = " ".join(["python3 /share/hennlab/progs/gnomix/gnomix.py",
query_file, genetic_map_file, output_basename, chm, phase, reference_file, sample_map_file]) +
" > /share/hennlab/progs/gnomix/demo/training_log.txt"
print("Running in command line: \n\t", train_cmd)
os.system(train_cmd)

@fsharifi
Copy link

fsharifi commented Aug 16, 2023

@oshiomah1 I was getting the same error, but went through the gnomix.py script, and it seems that genetic_map_file should be the 5th argument, not the second one as in demo.ipynb. So, when I used the following command it worked:

train_cmd = " ".join(["python3 /share/hennlab/progs/gnomix/gnomix.py",
query_file, output_basename, chm, phase, genetic_map_file, reference_file, sample_map_file]) + " > /share/hennlab/progs/gnomix/demo/training_log.txt"  

or

python3 gnomix.py ./demo/data/ALL.chr22.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz ./demo/output 22 False ./demo/data/allchrs.b37.gmap ./demo/data/reference_1000g.vcf ./demo/data/1000g.smap > ./demo/training_log.txt 

@oshiomah1
Copy link
Author

@fsharifi thank you so much for your suggestion! I will try this out. My colleague took over the gnomix project while I traveled for data collection. Now that i'm back i'll attempt this again

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