Exemple #1
0
 def __getSubmodule(cls, name, subname):
     try:
         return importlib.import_module('%s.%s' % (name, subname))
     except Exception as e:
         msg = str(e)
         # FIXME: The following is a quick and dirty way to filter
         # when the submodule is not present
         if msg != 'No module named %s' % subname:
             pwutils.pluginNotFound("%s.%s" % (name, subname), msg)
         return None
# *  e-mail address '*****@*****.**'
# *
# **************************************************************************

import unittest, sys
from pyworkflow.em import *
from pyworkflow.tests import *
from test_workflow import TestWorkflow
from pyworkflow.utils import pluginNotFound

try:
    from xmipp3 import *
    from xmipp3.constants import SAME_AS_PICKING
    from xmipp3.protocols import *
except:
    pluginNotFound('xmipp3', doRaise=True)

try:
    from grigoriefflab.protocols import *
except:
    pluginNotFound('grigoriefflab', doRaise=True)

try:
    from eman2.protocols import *
except:
    pluginNotFound('eman2', doRaise=True)

try:
    from relion.protocols import *
except:
    pluginNotFound('relion', doRaise=True)
Exemple #3
0
# *  e-mail address '*****@*****.**'
# *
# **************************************************************************

import unittest, sys
from pyworkflow.em import *
from pyworkflow.tests import *
import pyworkflow.utils as pwutils
from test_workflow import TestWorkflow
from pyworkflow.em.protocol import ProtImportCoordinates

try:
    from xmipp3 import *
    from xmipp3.protocols import *
except:
    pwutils.pluginNotFound('xmipp', doRaise=True)

OTHER = pwutils.importFromPlugin('xmipp3.constants', 'OTHER', doRaise=True)


class TestXmippWorkflow(TestWorkflow):
    @classmethod
    def setUpClass(cls):
        setupTestProject(cls)
        cls.dataset = DataSet.getDataSet('xmipp_tutorial')
        cls.allCrdsDir = cls.dataset.getFile('posAllDir')
        cls.micsFn = cls.dataset.getFile('allMics')
        cls.vol1 = cls.dataset.getFile('vol1')

    def testXmippWorkflow(self):
        #First, import a set of micrographs
Exemple #4
0
from pyworkflow.em.protocol import ProtImportMicrographs, ProtCreateStreamData
from pyworkflow.em.protocol.protocol_create_stream_data import \
    SET_OF_MICROGRAPHS
from pyworkflow.protocol import getProtocolFromDb

from xmipp3.protocols import XmippProtPreprocessMicrographs
from xmipp3.protocols.protocol_extract_particles import *
from xmipp3.protocols.protocol_classification_gpuCorr_full import *

ProtCTFFind = importFromPlugin('grigoriefflab.protocols',
                               'ProtCTFFind',
                               doRaise=True)
try:
    from eman2.protocols.protocol_autopick_sparx import *
except:
    pluginNotFound('Eman2', "Eman2 is needed to run this test.", doRaise=True)

# Number of mics to be processed
NUM_MICS = 5


class TestGpuCorrFullStreaming(BaseTest):
    @classmethod
    def setUpClass(cls):
        setupTestProject(cls)
        cls.dsRelion = DataSet.getDataSet('relion_tutorial')

    def importMicrographs(self):
        prot = self.newProtocol(ProtImportMicrographs,
                                filesPath=self.dsRelion.getFile('micrographs'),
                                filesPattern='*.mrc',
Exemple #5
0
# **************************************************************************

from os.path import exists
import subprocess

from pyworkflow.tests import *
from pyworkflow.em.protocol import *
from pyworkflow.protocol.launch import schedule
import pyworkflow.utils as pwutils
from pyworkflow.utils.path import *

try:
    from relion.protocols import *
    from relion.convert import *
except:
    pwutils.pluginNotFound('relion')

try:
    from xmipp3.protocols import *
    from xmipp3.convert import *
except:
    pwutils.pluginNotFound('xmipp')

# --- Set this to match with your queue system ---
#  json params to fill the queue form, see SCIPION_HOME/config/host.conf
QUEUE_PARAMS = (
    u'myslurmqueue',
    {
        u'JOB_TIME': u'1',  # in hours
        u'JOB_MEMORY': u'2048',  # in Mb
        u'QUEUE_FOR_JOBS': u'N',
Exemple #6
0
from pyworkflow.tests import BaseTest, setupTestProject, DataSet
from pyworkflow.utils import importFromPlugin, pluginNotFound
from pyworkflow.em.protocol import (ProtImportAverages, ProtImportMicrographs,
                                    ProtCreateStreamData)
from pyworkflow.em.protocol.protocol_create_stream_data import SET_OF_MICROGRAPHS
from pyworkflow.protocol import getProtocolFromDb

from xmipp3.protocols import XmippProtPreprocessMicrographs
from xmipp3.protocols.protocol_extract_particles import *
from xmipp3.protocols.protocol_classification_gpuCorr_semi import *

ProtCTFFind = importFromPlugin('grigoriefflab.protocols', 'ProtCTFFind', doRaise=True)
try:
    from eman2.protocols.protocol_autopick_sparx import *
except:
    pluginNotFound('Eman', "Eman is needed to do this test", doRaise=True)


# Number of mics to be processed
NUM_MICS = 5

class TestGpuCorrSemiStreaming(BaseTest):
    @classmethod
    def setUpClass(cls):
        setupTestProject(cls)
        cls.dsRelion = DataSet.getDataSet('relion_tutorial')

    def importAverages(self):
        prot = self.newProtocol(ProtImportAverages,
                                filesPath=self.dsRelion.getFile(
                                    'import/averages.mrcs'),