genomedisco icon indicating copy to clipboard operation
genomedisco copied to clipboard

Running error

Open hzlzldr opened this issue 5 years ago • 4 comments

hi,

I ran it according to your sample code in quick start, and the following error occurred. Have you run it by yourself?

Looking forward to your reply and code fixes!

genomedisco run_all --metadata_samples examples/metadata.samples --metadata_pairs examples/metadata.pairs --bins examples/Bins.w50000.bed.gz --outdir examples/output Traceback (most recent call last): File "/data5/huanglu/miniconda3/bin/genomedisco", line 11, in load_entry_point('genomedisco', 'console_scripts', 'genomedisco')() File "/data4/lzl/genomedisco/genomedisco/main.py", line 17, in main command_methodscommand File "/data4/lzl/genomedisco/genomedisco/concordance_utils.py", line 847, in run_all preprocess(metadata_samples,bins,re_fragments,methods,outdir,running_mode,subset_chromosomes,parameters_file,timing) File "/data4/lzl/genomedisco/genomedisco/concordance_utils.py", line 150, in preprocess write_resolution(nodes,resolution_file) File "/data4/lzl/genomedisco/genomedisco/concordance_utils.py", line 115, in write_resolution items=line.strip().split('\t') TypeError: a bytes-like object is required, not 'str'

hzlzldr avatar Feb 06 '20 08:02 hzlzldr

Hi! One suggestion I have is to make sure you are using python2, as recommended in the Readme. If that does not solve the issue, please let me know here and I am happy to continue helping to troubleshoot.

oursu avatar Feb 06 '20 09:02 oursu

it does not work with py2


(base) huanglu 22:46:00 /data4/lzl/genomedisco python --version Python 2.7.15+

(base) huanglu 22:46:00 /data4/lzl/genomedisco $ genomedisco run_all --metadata_samples examples/metadata.samples --metadata_pairs examples/metadata.pairs --bins examples/Bins.w50000.bed.gz --outdir examples/output Traceback (most recent call last): File "/data5/huanglu/miniconda3/bin/genomedisco", line 11, in load_entry_point('genomedisco', 'console_scripts', 'genomedisco')() File "/data4/lzl/genomedisco/genomedisco/main.py", line 17, in main command_methodscommand File "/data4/lzl/genomedisco/genomedisco/concordance_utils.py", line 847, in run_all preprocess(metadata_samples,bins,re_fragments,methods,outdir,running_mode,subset_chromosomes,parameters_file,timing) File "/data4/lzl/genomedisco/genomedisco/concordance_utils.py", line 150, in preprocess write_resolution(nodes,resolution_file) File "/data4/lzl/genomedisco/genomedisco/concordance_utils.py", line 115, in write_resolution items=line.strip().split('\t') TypeError: a bytes-like object is required, not 'str'

hzlzldr avatar Feb 07 '20 14:02 hzlzldr

I'm still worried it calls the python3 version because of /data5/huanglu/miniconda3/bin/genomedisco

oursu-broad avatar Feb 12 '20 05:02 oursu-broad

Hi! One suggestion I have is to make sure you are using python2, as recommended in the Readme. If that does not solve the issue, please let me know here and I am happy to continue helping to troubleshoot.

May I ask how to run the command using python2 rather than python3 since it calls python3 by default?

QichenFU avatar Jun 26 '22 07:06 QichenFU