caleblareau / mgatk

mgatk: mitochondrial genome analysis toolkit
http://caleblareau.github.io/mgatk
MIT License
98 stars 25 forks source link

mgatk-del-find won't run #64

Closed mrland99 closed 1 year ago

mrland99 commented 1 year ago

Describe the bug Trying to run mgatk-del-find but running into import problem for example:

mgatk-del-find --help
  File "/home/landm/anaconda3/envs/scri/bin/mgatk-del-find", line 5
    from mgatk.del.clifind import main

or

mgatk-del-find -i /data/peer/sohailn/collaborators/sfeira/RC-1652_T4i5_D6_multiome/cr-arc-results-with-atac-mito/atac_possorted_bam.bam 
  File "/home/landm/anaconda3/envs/scri/bin/mgatk-del-find", line 5
    from mgatk.del.clifind import main

Seems like Python version 3.9.12 is very unhappy with using del as a folder name. I noticed when I manually change the folder name after cloning the repo and reinstalling the import works (e.g. from mgatk.newname.clifind import main). Not sure why it is, kind of weird. I will say this one fix still causes other downstream errors since it is looking for the mgatk.del module so would need to propgate changes everywhere.

To Reproduce pip installed mgatk on conda environment using Python version 3.9.12

caleblareau commented 1 year ago

I guess del has a special meaning in python...

https://www.toppr.com/guides/python-guide/questions/what-is-del-in-python/#:~:text=What%20is%20del%20in%20Python,the%20item%20have%20been%20destroyed.

okay it seems like an easy fix as you suggested to update the folder name and then the code that imports various functions; I should be able to do that in the next few days and then put a new version on pip. Thanks for the note

caleblareau commented 1 year ago

I bumped the pypi version (0.6.7) that hopefully fixes this. @mrland99 can you confirm?

mrland99 commented 1 year ago

Looks like this fixed the bug. Ran without problems. Thanks for the quick fix Caleb!