swapxy seems necessary in my case. You can try to compare the max value of your coordinate between the star file generated by relion and converted cs file.
If you want reextract particles in Relion, then you may need to change the path in star file: sed -i 's+J12/motioncorrected+MotionCorr/job006/Micrographs+g' from_P22_J220.star
and change the file name sed -i 's+_patch_aligned_doseweighted.mrc+.mrc+g' from_P22_J220.star
those two steps trick relion to extract particles from file of its own MotionCorr mrc.
Then you may want to edit the metadata of star file like figure below (all the parameters should be in one row, rather than tow rows shown here):
And delete/edit some columns. In my case, I divided the coordinates by 2, and flip y coordinate using awk command by bash, and deleted defocus U/V column (I am not sure which columns are necessary, but seems like my star worked fine. Any suggestion)
Then using re-extract refined particles to extract
@Feng10 not sure what you mean. You mean the coordinates are completely wrong? If you have correct coordinates that you just want to re-center using refined offsets, you must tell Relion to do that.
But when i ran the conversion command, i got the following messages:
python3.7 csparc2star.py --copy-micrograph-coordinates particles.star particles_selected.cs --loglevel debug PC2_del.star
Traceback (most recent call last):
File “csparc2star.py”, line 28, in
from pyem import metadata
File “/home/greg/pyem/pyem/init.py”, line 3, in
from . import metadata
File “/home/greg/pyem/pyem/metadata.py”, line 23, in
from . import star
File “/home/greg/pyem/pyem/star.py”, line 27, in
from pyem.geom import e2r_vec
File “/home/greg/pyem/pyem/geom/init.py”, line 4, in
from .geom import *
File “/home/greg/pyem/pyem/geom/geom.py”, line 20, in
from .quat_numba import distq
File “/home/greg/pyem/pyem/geom/quat_numba.py”, line 98, in @numba.jit(cache=False, nopython=True, parallel=True)
File “/home/greg/miniconda3/envs/pyem/lib/python3.7/site-packages/numba/decorators.py”, line 141, in jit
raise RuntimeError(msg)
RuntimeError: The ‘parallel’ target is not currently supported on Windows operating systems when using Python 2.7, or on 32 bit hardware.
Could you tell me any clue about how to solve this problem ?
RuntimeError: The ‘parallel’ target is not currently supported on Windows operating systems when using Python 2.7, or on 32 bit hardware.
I’m afraid you will need to address one of those issues; Numba is a hard dependency. You can also edit pyem/pyem/geom/quat_numba.py and set parallel=False and see how it goes. It may take several minutes instead of < 1 min to convert angles this way.
after I changed the pyem/pyem/geom/quat_numba.py and set parallel=False,
I have another probelm.
(pyem) :~/pyem$ python csparc2star.py --copy-micrograph-coordinates particles.star particles_selected.cs PC2_del.star
Traceback (most recent call last):
File “csparc2star.py”, line 28, in
from pyem import metadata
File “/home/greg/pyem/pyem/init.py”, line 3, in
from . import metadata
File “/home/greg/pyem/pyem/metadata.py”, line 23, in
from . import star
File “/home/greg/pyem/pyem/star.py”, line 29, in
from pyem.util import natsort_values
File “/home/greg/pyem/pyem/util/init.py”, line 3, in
from .util import *
File “/home/greg/pyem/pyem/util/util.py”, line 28, in
from … import vop
File “/home/greg/pyem/pyem/vop/init.py”, line 3, in
from .vop import *
File “/home/greg/pyem/pyem/vop/vop.py”, line 22, in
from pyfftw.interfaces.numpy_fft import rfftn
File “/home/greg/miniconda3/envs/pyem/lib/python3.7/site-packages/pyfftw/init.py”, line 18, in
from .pyfftw import (
ModuleNotFoundError: No module named ‘pyfftw.pyfftw’
here is another probelm after i changed the pyem/pyem/geom/quat_numba.py and set parallel=False ,
$ python csparc2star.py --copy-micrograph-coordinates particles.star particles_selected.cs PC2_test.star
Traceback (most recent call last):
File “/home/greg/miniconda3/envs/pyem/lib/python3.7/site-packages/numba/core/typeconv/typeconv.py”, line 4, in
from numba.core.typeconv import _typeconv
ImportError: cannot import name ‘_typeconv’ from ‘numba.core.typeconv’ (/home/greg/miniconda3/envs/pyem/lib/python3.7/site-packages/numba/core/typeconv/init.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “csparc2star.py”, line 28, in
from pyem import metadata
File “/home/greg/pyem/pyem/init.py”, line 3, in
from . import metadata
File “/home/greg/pyem/pyem/metadata.py”, line 23, in
from . import star
File “/home/greg/pyem/pyem/star.py”, line 27, in
from pyem.geom import e2r_vec
File “/home/greg/pyem/pyem/geom/init.py”, line 3, in
from .convert_numba import *
File “/home/greg/pyem/pyem/geom/convert_numba.py”, line 18, in
import numba
File “/home/greg/miniconda3/envs/pyem/lib/python3.7/site-packages/numba/init.py”, line 19, in
from numba.misc.special import (
File “/home/greg/miniconda3/envs/pyem/lib/python3.7/site-packages/numba/misc/special.py”, line 3, in
from numba.core.typing.typeof import typeof
File “/home/greg/miniconda3/envs/pyem/lib/python3.7/site-packages/numba/core/typing/init.py”, line 1, in
from .context import BaseContext, Context
File “/home/greg/miniconda3/envs/pyem/lib/python3.7/site-packages/numba/core/typing/context.py”, line 11, in
from numba.core.typeconv import Conversion, rules
File “/home/greg/miniconda3/envs/pyem/lib/python3.7/site-packages/numba/core/typeconv/rules.py”, line 2, in
from .typeconv import TypeManager, TypeCastingRules
File “/home/greg/miniconda3/envs/pyem/lib/python3.7/site-packages/numba/core/typeconv/typeconv.py”, line 17, in
raise ImportError(msg % (url, reportme, str(e), sys.executable))
ImportError: Numba could not be imported.
If you are seeing this message and are undertaking Numba development work, you may need to re-run:
If more help is needed please feel free to speak to the Numba core developers
directly at: https://gitter.im/numba/numba
Thanks in advance for your help in improving Numba!
The original error was: ‘cannot import name ‘_typeconv’ from ‘numba.core.typeconv’ (/home/greg/miniconda3/envs/pyem/lib/python3.7/site-packages/numba/core/typeconv/init.py)’
If possible please include the following in your error report:
python version under pyem environment is 3.7.x, i install the dependencies as the ones listed on the wiki.
The computer is GPUBox with 4x nvidia geforce gtx 1080 for the cryo-EM data processing with ubuntu 16.04 version
Something is not right, then. The instructions from the wiki should have worked verbatim. And there is certainly an appropriate build of pyfftw in conda-forge.
I suspect you are having an environment issue. What python do you have from which python and which -a python? My programs use #!/usr/bin/env python to run using the default environment python, when they are called as executables (and the conda env is activated). Explicitly using the python from your conda env will also work.
conda install -c conda-forge pyfftw healpy pathos
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
healpy
pyfftw
pathos
multiprocess[version=’>=0.70.4’]
pathos
ppft[version=’>=1.6.4.5’]
Current channels:
https://conda.anaconda.org/conda-forge/linux-32
https://conda.anaconda.org/conda-forge/noarch
https://repo.anaconda.com/pkgs/main/linux-32
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/free/linux-32
https://repo.anaconda.com/pkgs/free/noarch
https://repo.anaconda.com/pkgs/r/linux-32
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/pro/linux-32
https://repo.anaconda.com/pkgs/pro/noarch
To search for alternate channels that may provide the conda package you’re
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
so I installed the local files which downloaded from the website.
Thanks a lot for your help. here is the information you asked.
(pyem) ~/pyem$ conda activate pyem
(pyem) :~/pyem$ which python
/home/greg/miniconda3/envs/pyem/bin/python
(pyem) :~/pyem$ which -a python
/home/greg/miniconda3/envs/pyem/bin/python
/home/greg/miniconda3/bin/python
/usr/bin/python
~/pyem$ uname -a
Linux pcbi00238 4.4.0-179-generic #209-Ubuntu SMP Fri Apr 24 17:48:44 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
(pyem) :~/pyem$ lsb_release -a
LSB Version: core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:printing-9.20160110ubuntu0.2-amd64:printing-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial