czbiohub-sf / dashit

Automatically create CRISPR guides for DASH :scissors:
http://dashit.czbiohub.org
Apache License 2.0
6 stars 2 forks source link

bug in dashit_reads_filter.py #18

Closed emilydc closed 4 years ago

emilydc commented 5 years ago

I got the following error message when I tried to run dashit_reads_filter.py:

ubuntu@RR022-plus:/mnt/data/volume2/ERCCs$ python3 ../guide_design_tools/dashit/dashit-reads/dashit_reads/dashit_reads_filter.py reads_crispr_sites.txt > filtered_reads_crispr_sites.txt Traceback (most recent call last): File "../guide_design_tools/dashit/dashit-reads/dashit_reads/dashit_reads_filter.py", line 24, in from ash import flash ModuleNotFoundError: No module named 'ash'

emilydc commented 5 years ago

This error was resolved when I went to the guide_design_tools/ folder and typed "make install" and then tried again.

However, today Gloria got the same exact error when she tried to run dashit_reads_filter.py on an instance where she had just installed dashit last week. She also fixed it with make install. But perhaps there's something that can be modified in the code to make sure that ash is installed when that program runs, so that other users don't get this error?

EmperorDali commented 5 years ago

Adding code to attempt to auto-install ash would be difficult and error-prone. We could add a more helpful error message if ash isn't found, but I'm not sure this is necessary - we should just make sure make install actually works.

I'm wondering if these errors might be because I've been updating ash and dashit over the past 2 weeks, so old instances with older installations might get stuck in a half-updated state.

EmperorDali commented 5 years ago

Also, you should be running the script dashit-reads-filter that is automatically installed, that could also be causing this error.

(dashit) [bcrew]$ dashit-reads-filter 
usage: dashit-reads-filter [-h] [--filtered_explanation FILTERED_EXPLANATION]
                           [--offtarget OFFTARGET]
                           [--offtarget_radius OFFTARGET_RADIUS]
                           [--ontarget ONTARGET]
                           [--ontarget_radius ONTARGET_RADIUS]
                           [--gc_freq_min GC_FREQ_MIN]
                           [--gc_freq_max GC_FREQ_MAX]
                           [--homopolymer HOMOPOLYMER]
                           [--dinucleotide_repeats DINUCLEOTIDE_REPEATS]
                           [--hairpin_min_inner HAIRPIN_MIN_INNER]
                           [--hairpin_min_outer HAIRPIN_MIN_OUTER]
                           input
dashit-reads-filter: error: the following arguments are required: input
emilydc commented 5 years ago

Oh, I see. I was doing python3 dashit_reads_filter.py because that's what's in Amy's wrapper script and I was just following that. So I guess she should changer her wrapper script and we should also make sure that it's used properly in the instructions.

emilydc commented 5 years ago

The "ash" error is occurring for me again today:

  File "/home/ubuntu/.virtualenvs/dashit/bin/dashit-reads-filter", line 11, in <module>
    load_entry_point('dashit-reads', 'console_scripts', 'dashit-reads-filter')()
  File "/home/ubuntu/.virtualenvs/dashit/lib/python3.6/site-packages/pkg_resources/__init__.py", line 480, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/ubuntu/.virtualenvs/dashit/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2693, in load_entry_point
    return ep.load()
  File "/home/ubuntu/.virtualenvs/dashit/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in load
    return self.resolve()
  File "/home/ubuntu/.virtualenvs/dashit/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2330, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/mnt/data/guide_design_tools/dashit/dashit-reads/dashit_reads/dashit_reads_filter.py", line 26, in <module>
    from ash import flash
ModuleNotFoundError: No module named 'ash'

This happened after I accidentally lost the mounted drive on my instance that I had been using to run DASHit for the past few months. When I re-installed, everything was fine until dashit-filter-reads and then I got the ash error. I tried installing DASHit on a different instance where it hadn't been installed before. Same result. So I made a brand new instance and installed DASHit there. Same result again. The series of commands I ran on the brand new instance were:

5  git clone https://github.com/czbiohub/guide_design_tools
    6  cd guide_design_tools/
    7  make install
    8  python3 -m venv ~/.virtualenvs/dashit
    9  source ~/.virtualenvs/dashit/bin/activate
   10  make install
EmperorDali commented 4 years ago

This should all be fixed now, thanks for the report!