millanp95 / DeLUCS

This repository contains all the source files required to run DeLUCS, a deep learning clustering algorithm for DNA sequences.
24 stars 11 forks source link

bug in EvaluateDeLUCS/TrainDeLUCS #3

Closed FSS-PHL closed 3 years ago

FSS-PHL commented 3 years ago

HI,

getting is error:

python TrainDeLUCS.py --data_dir=/home/binfie1/liam_dev/delucs/pairs --out_dir=/home/binfie1/liam_dev/delucs/train1
Traceback (most recent call last):
  File "TrainDeLUCS.py", line 193, in <module>
    main()
  File "TrainDeLUCS.py", line 127, in main
    x_train, x_test, y_test = pickle.load(open(filename, 'rb'))
NotADirectoryError: [Errno 20] Not a directory: '/home/binfie1/liam_dev/delucs/pairs/testing_data.p'

Seems to come from trying to open the output from get_pairs.py, which ran as.

python get_pairs.py --data_path=/home/binfie1/liam_dev/delucs/train --k=6 --modify='mutation' --output=/home/binfie1/liam_dev/delucs/pairs
............computing learning pairs................
......saving mutated pairs.....
millanp95 commented 3 years ago

Hi Liam,

Thank you for your interest in our method. The argument --output in get_pairs.py should be the full path to your mimic sequences. Try adding /testing_data.p after pairs in your output path in get_pairs.py

Pablo

FSS-PHL commented 3 years ago

Thanks Pablo,

I made it one step further!

Now get this:

python TrainDeLUCS.py --data_dir=/home/binfie1/liam_dev/delucs/pairs --out_dir=/home/binfie1/liam_dev/delucs/train1
The size of the training array is: (1611, 2, 4096)
Traceback (most recent call last):
  File "TrainDeLUCS.py", line 193, in <module>
    main()
  File "TrainDeLUCS.py", line 179, in main
    data = pickle.load(open(original_files, "rb"))
FileNotFoundError: [Errno 2] No such file or directory: '/home/binfie1/liam_dev/delucs/pairs/train.p'

Your docs say 'Input: Pickle file with the mimics (Always ending with /testing_data.p)'

but that thows:


python TrainDeLUCS.py --data_dir=/home/binfie1/liam_dev/delucs/pairs/testing_data.p --out_dir=/home/binfie1/liam_dev/delucs/train1
Traceback (most recent call last):
  File "TrainDeLUCS.py", line 193, in <module>
    main()
  File "TrainDeLUCS.py", line 127, in main
    x_train, x_test, y_test = pickle.load(open(filename, 'rb'))
NotADirectoryError: [Errno 20] Not a directory: '/home/binfie1/liam_dev/delucs/pairs/testing_data.p/testing_data.p'
millanp95 commented 3 years ago

I see. Try running your first command:

python TrainDeLUCS.py --data_dir=/home/binfie1/liam_dev/delucs/pairs --out_dir=/home/binfie1/liam_dev/delucs/train1

But place the file 'train.p' that is the output of build_dp.py in your folder /home/binfie1/liam_dev/delucs/pairs first.

I think that should work. I assumed that everyone would place the pairs in the same folder as the original files, let me know if this fixes your problem and I will change the code ASAP

Thanks

FSS-PHL commented 3 years ago

ok, just put everything in the same folder. No prob. works now, thanks