Giter Club home page Giter Club logo

occupy's Introduction

OccuPy

DOI

A fast and simple python module and program to estimate local scaling of cryo-EM maps, to approximate relative occupancy and/or resolution, and optionally also equalise the map according to occupancy while suppressing solvent amplification.

Further documentation, instructions, and tutorials are available here.

Quick install instructions via pip

Follow the link above for more instrucions. The instructions below are minimal just intended to provide obvious and minimal instructions for posterity and development use.

install from PyPi (pip install)

pip install occupy

Install from source (pip install)

If you are a developer or prefer to download the source code for some other reason, you can also install from the cloned repo

$ git clone https://github.com/bforsbe/OccuPy.git
$ cd occupy 
$ pip install -e . 

You should also be able to simply run the occupy_lib/occupy_gui.py to run the GUI or occupy_lib/occupy.py for the command-line interface.

occupy's People

Contributors

alisterburt avatar bforsbe avatar dangonite57 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

occupy's Issues

ChimeraX not found on MacOS

Hey! A few people in the lab are using OccuPy now but the gui is consistently having trouble finding ChimeraX

The ChimeraX executable is in both cases found at /Applications/ChimeraX-1.2.5.app

PyQt5 issue on windows pip install

Reported by Alexandre Littiere:

I'm trying to start OccuPy (0.1.12) in powershell, but the code is returning an
error message :

➜ occupy_gui
Traceback (most recent call last):
   File "c:\users\alex\anaconda3\lib\runpy.py", line 194, in 
_run_module_as_main
     return _run_code(code, main_globals, None,
   File "c:\users\alex\anaconda3\lib\runpy.py", line 87, in _run_code
     exec(code, run_globals)
   File "C:\Users\Alex\anaconda3\Scripts\occupy_gui.exe\__main__.py", 
line 7, in <module>
   File 
"c:\users\alex\anaconda3\lib\site-packages\occupy_lib\occupy.py", line 
27, in app_gui
     ui.setupUi(MainWindow)
   File 
"c:\users\alex\anaconda3\lib\site-packages\occupy_lib\occupy_gui.py", 
line 624, in setupUi
     
self.spinBox_viewSlice.setStepType(QtWidgets.QAbstractSpinBox.DefaultStepType)
AttributeError: 'QSpinBox' object has no attribute 'setStepType'

EMDB fetch not working

getting SSL certificate verification errors

Fetching emdb 3061...
Fetching emd_3061.map.gz
EMDB entry 3061 could not be fetched through url:
https://ftp.ebi.ac.uk/pub/databases/emdb/structures/EMD-3061/map/emd_3061.map.gz
Reason: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:997)>

ChimeraX isn't found on MacOS

The path used to search /Applications for is not the standard install path. OccuPy looks for /Applications/*app/chimerax, but the binary is in /Applications/ChimeraX-version/Contents/bin/ChimeraX.

I made a minimal fix here, if you're OK with it I can make a PR.

I would also propose to check only ChimeraX*app rather than all application directories as a (roughly) conventional path has to be used unless we would search more carefully.

Cannot load maps/open dialog fails

I've installed the deb file without any issues, however when I run the app, it loads, yet I cannot use any "browse" as the dialog windows do not open and cause the app to crash with the following error:

(occupy_gui:801381): Gtk-WARNING **: 11:03:42.763: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Pop/16x16/status/image-missing.svg: Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: /lib/x86_64-linux-gnu/librsvg-2.so.2: undefined symbol: pango_attr_overline_new (gdk-pixbuf-error-quark, 5)
Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Pop/16x16/status/image-missing.svg: Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: /lib/x86_64-linux-gnu/librsvg-2.so.2: undefined symbol: pango_attr_overline_new (gdk-pixbuf-error-quark, 5)
Aborted (core dumped)

Not sure if it is related to the app or my distro :)

Distro Info

NAME="Pop!_OS"
VERSION="22.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 22.04 LTS"
VERSION_ID="22.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=jammy
UBUNTU_CODENAME=jammy
LOGO=distributor-logo-pop-os

Thanks

Make GUI window resizable

Hello,

OccuPy is very useful and easy to use, thank you!

The GUI window doesn't seem to be resizable (the mouse cursor changes shape, which indicates I should be able to resize, but when trying to pull on the corner nothing happens). This is a bit frustrating because some elements inside of it are squished in a small space, and that makes them difficult to read or interact with (some buttons and dropdown menus appear very small, for example).

I am running it on Rocky Linux 9, and it is the latest version (0.1.13) installed using pip in a fresh conda environment that was created to only contain python=3.11 (and its few dependencies pulled automatically by conda) before I installed OccuPy.

Thank you.

GUI scaling issue

example

On my Macbook Pro 16 running a local version of OccuPy I have some scaling issues as shown in the attached image.
I think this can be solved by allowing the user to resize the GUI, since currently its only a fixed size.

I am running OccuPY in a conda environment with pyqt 5.15.7.

Deprecation of `np.float` in numpy>=1.24 breaks occupy

numpy aliases basic types have been deprecated in numpy for a while and were removed in 1.24

This currently breaks map loading in occupy

Traceback (most recent call last):
  File "/Users/ahowes/soft/OccuPy/occupy_lib/occupy_gui.py", line 1440, in read_input_file
    self.set_lowpass()
  File "/Users/ahowes/soft/OccuPy/occupy_lib/occupy_gui.py", line 1973, in set_lowpass
    self.inputMap.voxel_size_ori = self.inputMap.voxel_size_proc * n/np.float(n_proc)
                                                                     ^^^^^^^^
  File "/Users/ahowes/mambaforge/envs/occupy/lib/python3.11/site-packages/numpy/__init__.py", line 284, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'float'. Did you mean: 'cfloat'?

Installing via pip (following the instructions) doesn't allow for the software to run

Reported through the pip install JotForm by @stav-ros:

Specifically not all the required packages are installed with the pip command, and it is unclear which dependencies are required. For example if I install PyQt6 I get the following PyQt5 error:Traceback (most recent call last): 

File "/.../software/anaconda/bin/occupy_gui", line 5, in <module>
   from occupy_lib.occupy import app_gui File "/.../software/anaconda/lib/python3.10/site-packages/occupy_lib/occupy.py", line 6, in <module>
   from occupy_lib import estimate, args, occupy_gui   # for terminal use File "/.../software/anaconda/lib/python3.10/site-packages/occupy_lib/occupy_gui.py", line 14, in <module>
   from PyQt5 import QtCore, QtGui, QtWidgetsImportError: cannot import name 'QtCore' from 'PyQt5' (unknown location)

And if I install PyQt5 I cannot install PyQt6 as it gives similar issues.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.