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

Python 3 #16

Open
dominik-handler opened this issue Nov 26, 2019 · 5 comments
Open

Python 3 #16

dominik-handler opened this issue Nov 26, 2019 · 5 comments

Comments

@dominik-handler
Copy link

Hi,
I saw that you have the branch 2to3 to migrate HiCAssembler to python 3. As it is getting quite difficult to install all dependencies for python 2.7 I wanted to try this branch.
First of all I ran into an issue while installing this version:
error in HiS Assembler setup command: "values of 'package_data' dict" must be a list of strings (got '*.txt')

Also, before I invest time in testing HiCAssembler in python 3, is it fully functional yet?

All the best and thank you,
Dominik

@xuzhougeng
Copy link

I solve this problem by the following step

git clone https://github.com/maxplanck-ie/HiCAssembler.git
cd HiCAssembler/
git branch 2to3

and I edit the setup.py, and commment the the following line

#package_data={'': '*.txt'},

then I install this package locally

cd ..
pip install ./HiCAssembler/

@EarlyEvol
Copy link

xuzhougeng's fix resolves the first issue (same as dominik) but a new python 2>3 version issue remains:

Traceback (most recent call last):
 File "/home/u14/earlm1/miniconda3/envs/hic/bin/assemble", line 11, in <module>
   import hicassembler.HiCAssembler as HiCAssembler
 File "/home/u14/earlm1/miniconda3/envs/hic/lib/python3.6/site-packages/hicassembler/HiCAssembler.py", line 226
   print self.N50
            ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(self.N50)?

xuzhougeng,
Did you encounter the same error, or do I have a problem pulling the correct version of HiCAssembler.py?
I started from a clean miniconda3 env, installed HiCExplorer, then did your 2to3 HicAssembler install instructions.

Earl

@EarlyEvol
Copy link

Ahh needed a different command to pull the correct branch:
git checkout -b 2to3 --track origin/2to3
Don't understand git at all, but it worked.
(still needed the setup.py edit)

@yuzhenpeng
Copy link

I also get the same errors. could you please give me more help.

@yuzhenpeng
Copy link

It seems that import hicexplorer.HiCMatrix as HiCMatrix should be changed to import hicmatrix.HiCMatrix as HiCMatrix. #21

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

4 participants