ychenbioinfo / mlstez

MLSTEZ
3 stars 1 forks source link

Linux version issues #1

Open alejorojas2 opened 5 years ago

alejorojas2 commented 5 years ago

Hi Yuan,

Thank you for helping us to use mlstez on linux. However, I ran into some issues:

QObject::setParent: Cannot set parent, new parent is in a different thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python: ../../src/xcb_io.c:179: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
Aborted (core dumped)

However, tried a patch, putting some code to fix the multithread issue in MainWindow.py

import ctypes
import sys
if sys.platform.startswith('linux'):
        try:
                x11 = ctypes.cdll.LoadLibrary('libX11.so')
                x11.XInitThreads()
        except:
                print "Warning: failed to XInitThreads()"

And I get it to run, it odes the first step lookig for barcodes and primers. However, when it gets to the consensus part, it throws another error:

image

I have not been able to get past that. Do you have any suggestions?

Thanks!

ychenbioinfo commented 5 years ago

Sorry, please ignore the last mail. Could you please share some raw sequencing data you are using, so I can do some test. I am also wondering what kind of memory issues you had when you run the compiled version before? Why the other person did not have it before?

On Wed, Feb 6, 2019, 10:28 PM Yuan Chen <ychenbioinfo@gmail.com wrote:

Can you try to use capitalized nucleotide?

On Wed, Feb 6, 2019, 6:27 PM Alejandro Rojas <notifications@github.com wrote:

Hi Yuan,

Thank you for helping us to use mlstez on linux. However, I ran into some issues:

  • I installed QT library and pyQT version 5.0, but it did not work when executing the MainWindow.py. So, I had to downgrade to pyQT 4 and its respective libraries and I was able to make it work.
  • Once I was able to run it using python MainWindow.py, I noticed that BioPython was required, so I got that covered.
  • I am working on a machine where I have to ssh to work on and I did using ssh -X xxx@xxx so I can get the GUI going, because I guess that is the way that you suggested to use it. However, I got an error because of the multithreading or at least htat is my guess:

QObject::setParent: Cannot set parent, new parent is in a different thread QPixmap: It is not safe to use pixmaps outside the GUI thread QPixmap: It is not safe to use pixmaps outside the GUI thread QPixmap: It is not safe to use pixmaps outside the GUI thread QPixmap: It is not safe to use pixmaps outside the GUI thread QPixmap: It is not safe to use pixmaps outside the GUI thread QPixmap: It is not safe to use pixmaps outside the GUI thread QPixmap: It is not safe to use pixmaps outside the GUI thread QPixmap: It is not safe to use pixmaps outside the GUI thread QPixmap: It is not safe to use pixmaps outside the GUI thread [xcb] Unknown request in queue while dequeuing [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called [xcb] Aborting, sorry about that. python: ../../src/xcb_io.c:179: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed. Aborted (core dumped)

However, tried a patch, putting some code to fix the multithread issue in MainWindow.py

import ctypes import sys if sys.platform.startswith('linux'): try: x11 = ctypes.cdll.LoadLibrary('libX11.so') x11.XInitThreads() except: print "Warning: failed to XInitThreads()"

And I get it to run, it odes the first step lookig for barcodes and primers. However, when it gets to the consensus part, it throws another error:

[image: image] https://user-images.githubusercontent.com/5539247/52380672-525cf300-2a34-11e9-8ded-d855e0a48a1a.png

I have not been able to get past that. Do you have any suggestions?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ychenbioinfo/mlstez/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/ADwmc5xmGmHy-oLCcafSsL0UgXlEMFMPks5vK2TPgaJpZM4amUa0 .

alejorojas2 commented 5 years ago

Yuan,

This is a subset of the data, the barcode file, primer file and the config.ini

I think one of the memory problems at the consensus step is a mixed pool of sequence length (this is only for the mac version). I think that causes a problem and it crashes. I am not sure if this is the case, but I have noticed on previous runs that removing problematic primer sets helps to improve. However, sometimes you still run into memory issues and you just keep trying until it works.

With the linux version is there any way to compile it? or even better to run it as command line process?

subset.zip

ychenbioinfo commented 5 years ago

It will take a while for me to figure out what happened. I will try to put this into a container to see how it works. I planed to have command line process, but I only finished the menu part (MLST-Easy.py), lol...

alejorojas2 commented 5 years ago

Alvin,

I tried the new version, and here are the packages that I have in my conda environment as per your suggestion in requirements.txt:

# packages in environment at /home/jarojas/miniconda2/envs/pyqt-env:
#
# Name                    Version                   Build  Channel
biopython                 1.73                     pypi_0    pypi
blas                      1.0                         mkl  
ca-certificates           2019.1.23                     0  
certifi                   2018.8.24                py35_1  
cycler                    0.10.0           py35hc4d5149_0  
cython                    0.29.5                   pypi_0    pypi
dbus                      1.13.6               h746ee38_0  
expat                     2.2.6                he6710b0_0  
fontconfig                2.13.0               h9420a91_0  
freetype                  2.9.1                h8a8886c_1  
glib                      2.56.2               hd408876_0  
gst-plugins-base          1.14.0               hbbd80ab_1  
gstreamer                 1.14.0               hb453b48_1  
icu                       58.2                 h9c2bf20_1  
intel-openmp              2019.1                      144  
jpeg                      9b                   h024ee3a_2  
kiwisolver                1.0.1            py35hf484d3e_0  
libedit                   3.1.20181209         hc058e9b_0  
libffi                    3.2.1                hd88cf55_4  
libgcc-ng                 8.2.0                hdf63c60_1  
libgfortran-ng            7.3.0                hdf63c60_0  
libpng                    1.6.36               hbc83047_0  
libstdcxx-ng              8.2.0                hdf63c60_1  
libuuid                   1.0.3                h1bed415_2  
libxcb                    1.13                 h1bed415_1  
libxml2                   2.9.9                he19cac6_0  
matplotlib                3.0.2                    pypi_0    pypi
mkl                       2018.0.3                      1  
mkl_fft                   1.0.6            py35h7dd41cf_0  
mkl_random                1.0.1            py35h4414c95_1  
ncurses                   6.1                  he6710b0_1  
numpy                     1.16.1                   pypi_0    pypi
openssl                   1.0.2p               h14c3975_0  
pcre                      8.42                 h439df22_0  
pip                       19.0.2                   pypi_0    pypi
pyparsing                 2.3.1                    pypi_0    pypi
pyqt                      5.9.2            py35h05f1152_2  
pyqt5                     5.11.3                   pypi_0    pypi
pyqt5-sip                 4.19.13                  pypi_0    pypi
python                    3.5.6                hc3d631a_0  
python-dateutil           2.8.0                    pypi_0    pypi
pytz                      2018.5                   py35_0  
qt                        5.9.6                h8703b6f_2  
readline                  7.0                  h7b6447c_5  
scipy                     1.2.1                    pypi_0    pypi
setuptools                40.2.0                   py35_0  
sip                       4.19.8           py35hf484d3e_0  
six                       1.12.0                   pypi_0    pypi
sqlite                    3.26.0               h7b6447c_0  
tk                        8.6.8                hbc83047_0  
tornado                   5.1.1            py35h7b6447c_0  
wheel                     0.31.1                   py35_0  
xz                        5.2.4                h14c3975_4  
zlib                      1.2.11               h7b6447c_3  

However, I still get the same error of A/C/G/T not recognized. But on the terminal I see this as the process happens. This is during consensus generation:

QObject::setParent: Cannot set parent, new parent is in a different thread
QObject::startTimer: Timers cannot be started from another thread
QBackingStore::endPaint() called with active painter on backingstore paint device
QObject::startTimer: Timers cannot be started from another thread
QObject::startTimer: Timers cannot be started from another thread
QObject::startTimer: Timers cannot be started from another thread
QObject::startTimer: Timers cannot be started from another thread
QObject::startTimer: Timers cannot be started from another thread

I also see the GUI crashing on me when I try to click to open a project or start a new project, but this is not often, but still happens

Traceback (most recent call last):
  File "MainWindow.py", line 309, in projNew
    paraDlg = ParameterDlg.ParameterDlg(self.parameters)
  File "/home/jarojas/mlstez/ParameterDlg.py", line 17, in __init__
    self.initUi()
  File "/home/jarojas/mlstez/ParameterDlg.py", line 58, in initUi
    self.barcodelenSpinBox.setValue(self.parameters.BarcodeLen)
TypeError: setValue(self, int): argument 1 has unexpected type 'str'
Aborted (core dumped)

Should I try to use something else than python MainWindow.py or what am I missing?

Thanks, Alejo