Closed lnalinaf closed 8 months ago
Hi Alina,
How many files .h5 files are there in the /processed_data/genotype/ folder? Could you list the files in this folder? According to the error there were multiple .h5 files but they do not have the expected names. if you have the names test1 and test2 it might be best to move the older files to a separate folder and try again.
Best,
Arno
Hi Arno,
thank you for the answer!
Did a new test and got a similar error:
python GenNet/GenNet.py convert -g /content/vcf_data -study_name test1 -o /content/convert_out -vcf
Traceback (most recent call last):
File "GenNet/GenNet.py", line 284, in <module>
main()
File "GenNet/GenNet.py", line 28, in main
convert(args)
File "/content/GenNet/GenNet_utils/Convert.py", line 454, in convert
merge_hdf5_hase(args)
File "/content/GenNet/GenNet_utils/Convert.py", line 63, in merge_hdf5_hase
g = h5py.File(filepath_hase.format(0), 'r')['genotype']
File "/usr/local/lib/python3.7/dist-packages/h5py/_hl/files.py", line 408, in __init__ swmr=swmr)
File "/usr/local/lib/python3.7/dist-packages/h5py/_hl/files.py", line 173, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 88, in h5py.h5f.open
OSError: Unable to open file (unable to open file: name = '/content/convert_out//genotype/0_test1.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
Closing remaining open files:/content/convert_out/probes/test1.h5...done/content/convert_out/probes/test1.h5...done
The folder /content/convert_out/genotype
is empty.
Hi Alina,
I think you simply forgot to define the -step. Can you try adding -step all
to your command? I should change the standard argument to all, that was an oversight.
Best,
Arno
Hi Arno,
I saw in the code default='all'
for the -step option. I've tried both cases with all folders cleared before each one for a pure test, and both (with -step all and without) gave the same result:
python GenNet/GenNet.py convert -g /content/vcf_data -study_name test_convert1 -vcf -step all
FileNotFoundError: [Errno 2] No such file or directory: '/content/processed_data//SNPs_info.txt'
Namespace(data='/content/processed_data//SUB_ID.txt', flag='individuals', id=None, out='/content/processed_data/', study_name='test_convert1')
Creating directories...
Directories "genotype","probes","individuals" are already exist in /content/processed_data/...
Traceback (most recent call last):
File "/content/GenNet/GenNet_utils/hase/tools/VCF2hdf5.py", line 99, in <module> ind_VCF2hdf5(args.data, args.out, args.study_name)
File "/content/GenNet/GenNet_utils/hase/tools/VCF2hdf5.py", line 46, in ind_VCF2hdf5 f = open(data_path, 'r')
FileNotFoundError: [Errno 2] No such file or directory: '/content/processed_data//SUB_ID.txt'
rm: cannot remove '/content/processed_data//SNPs_info.txt': No such file or directory using /content/processed_data//
Traceback (most recent call last):
File "GenNet/GenNet.py", line 284, in <module>
main()
File "GenNet/GenNet.py", line 28, in main
convert(args)
File "/content/GenNet/GenNet_utils/Convert.py", line 449, in convert
hase_convert(args)
File "/content/GenNet/GenNet_utils/Convert.py", line 50, in hase_convert
G.VCF2hdf5(args.out)
File "/content/GenNet/GenNet_utils/hase/hdgwas/converter.py", line 331, in VCF2hdf5
f = open(os.path.join(out, 'vcf_convert.sh'), 'w')
FileNotFoundError: [Errno 2] No such file or directory: '/content/processed_data/vcf_convert.sh'
Hmm this error seems different. Here something goes wrong. I will look into it. I think something goes wrong with the paths. Did you find the vcf_convert.sh somewhere?
I checked, and there is no such file anywhere.
Fixed in 2.0
Hi Arno!
I've got an error while trying to use -convert with -vcf flag:
python GenNet/GenNet.py convert -g /content/vcf -study_name test1 -vcf
There is the traceback:Traceback (most recent call last):
File "GenNet/GenNet.py", line 284, in <module>
main()
File "GenNet/GenNet.py", line 28, in main
convert(args)
File "/content/GenNet/GenNet_utils/Convert.py", line 454, in convert
merge_hdf5_hase(args)
File "/content/GenNet/GenNet_utils/Convert.py", line 63, in merge_hdf5_hase
g = h5py.File(filepath_hase.format(0), 'r')['genotype']
File "/usr/local/lib/python3.7/dist-packages/h5py/_hl/files.py", line 408, in __init__ swmr=swmr)
File "/usr/local/lib/python3.7/dist-packages/h5py/_hl/files.py", line 173, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 88, in h5py.h5f.open
OSError: Unable to open file (unable to open file: name = '/content/processed_data///genotype/0_test2.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
Сould the file path be written incorrectly somewhere?
Many thanks, Alina