Closed jfjlaros closed 9 years ago
Looks like kpal.ProfileFileType.__call__
somehow raises a ValueError
.
Unfortunately, argparse catches this exception, prints its own error message (the one you show), and calls sys.exit(1)
, leaving us no clue as to where the original exception was raised.
Not sure how best to debug this, but perhaps you could try running the following command from a terminal:
python -c 'import kpal; kpal.ProfileFileType("w")("reads_1.k8")'
And paste the output here. Any additional info about your system (operating system, Python version) would also be helpful.
Here is the output from running the command you suggested:
Traceback (most recent call last):
File "
The system I am using is a Linux-based HPC cluster, and the version of Python is 2.7. Please let me know if there's any other information you need.
Thanks!
Thanks for the report @stephyk
It looks like the output file you define, reads_1.k8
, already exists (it should not). You can try again by specifying a non-existing output file.
kPAL should give a more descriptive error message for this situation though. But I can't reproduce this, so I'm still not sure what's going on exactly.
Hi Martijn,
Yes, I ran the command in the same folder as I had tried running kpal, so it had already tried to create a reads_1.k8 file.
I deleted the reads_1.k8 file and ran the command again. When I did this, it created a reads_1.k8 file but no output was printed on the command line. I've attached this file to this email.
I also tried running the command as python -c 'import kpal; kpal.ProfileFileType("w")("")'
which produced the following output:
Traceback (most recent call last):
File "
Hopefully one of these will help you find out what's wrong.
Thanks again for your help! Stephanie
From: Martijn Vermaat notifications@github.com Sent: Friday, 30 January 2015 10:22 PM To: LUMC/kPAL Cc: Miss Stephanie Kerr Subject: Re: [kPAL] invalid ProfileFileType (#2)
Thanks for the report @stephykhttps://github.com/stephyk
It looks like the output file you define, reads_1.k8, already exists (it should not). You can try again by specifying a non-existing output file.
kPAL should give a more descriptive error message for this situation though. But I can't reproduce this, so I'm still not sure what's going on exactly.
Reply to this email directly or view it on GitHubhttps://github.com/LUMC/kPAL/issues/2#issuecomment-72193380.
Hi Stephanie,
It is expected behaviour that no output is printed on the command line. You can inspect the resulting file for example using kpal info
:
kpal info reads_1.k8
Other kPAL functions accepting k-mer profile files can now also work with this file. Currently the implemented functionality for extracting information from these files is limited, but the file format is documented.
Your latest error is also expected since the command you ran tries to create a file with a zero-length filename.
I'm closing this issue now, but feel free to let us know if you have any further problems.
Hi Martijn, Unfortunately we are still unable to run the kpal functions with this file. I have included some commands below that our IT has run that shows some error code that wasn't included above.
uqepowe3@barrine3:/sw/kpal/20141209/PBS/kpal_example_input> ls
a_1.fa a_2.fa b_1.fa b_2.fa c_1.fa c_2.fa d_1.fa d_2.fa reads_1.k8
uqepowe3@barrine3:/sw/kpal/20141209/PBS/kpal_example_input> rm reads_1.k8
uqepowe3@barrine3:/sw/kpal/20141209/PBS/kpal_example_input> kpal count -k 8 *_1.fa reads_1.k8
usage: kpal count [-h] [-p NAME [NAME ...]] [-k SIZE]
[INPUT [INPUT ...]] OUTPUT
kpal count: error: argument OUTPUT: invalid ProfileFileType(w) value: 'reads_1.k8'
uqepowe3@barrine3:/sw/kpal/20141209/PBS/kpal_example_input> rm reads_1.k8
uqepowe3@barrine3:/sw/kpal/20141209/PBS/kpal_example_input> ls
a_1.fa a_2.fa b_1.fa b_2.fa c_1.fa c_2.fa d_1.fa d_2.fa
uqepowe3@barrine3:/sw/kpal/20141209/PBS/kpal_example_input> python -c 'import kpal; kpal.ProfileFileType("w")("reads_1.k8")'
Traceback (most recent call last):
File "
I hopefully managed to figure out what's going wrong here. The likely cause of your problem is the version of the h5py
package you are using. It should be at least version 2.1.0 (but preferably just the latest release).
I could reproduce the errors using h5py
version 2.0.0, but not using 2.1.0. The kPAL installation script has been updated to take this into account for future users.
To fix your existing installation, please upgrade the h5py
package, or ask you system administrator to do so, using for example:
pip install -U h5py
Thank you for your report and again, please let me know if this doesn't work for you.
I am trying to use kPal to assess the quality of my sequence libraries, but have encountered some issues. When IT installed kPal on our server and tried to run the tutorial, there was an issue with the first step (i.e. running kpal count -k 8 *_1.fa reads_1.k8), which was:
kpal count: error: argument OUTPUT: invalid ProfileFileType(w) value: 'reads1.k8'