asarnow / pyem

Python programs for electron microscopy
GNU General Public License v3.0
112 stars 52 forks source link

`csparc2star.py` does not output micrograph name when input is cs file from curate exposures #114

Open olibclarke opened 5 months ago

olibclarke commented 5 months ago

Example command:

csparc2star.py 0_exposures_accepted.cs J198_passthrough_exposures_accepted.cs out.star

Example output:

image

Is this expected? For use in relion, it would be useful to have the Micrograph (and possibly movie) name in the output

Cheers Oli

asarnow commented 5 months ago

Ah, in that case the micrograph names are only in the primary .cs file and not the passthrough file. I'm testing a fix but just giving the files in the reverse order works as expected.

olibclarke commented 5 months ago

Ah I see! That works, thanks!

olibclarke commented 5 months ago

Hi Dan, when we try this with a single cs file, e.g. exported from Live, it still doesn't add the micrograph names:

sparc2star.py P82_S4_accepted_live_exposures.cs test.star

test.star snip:

data_optics

loop_
_rlnVoltage #1
_rlnSphericalAberration #2
_rlnAmplitudeContrast #3
_rlnOpticsGroup #4
_rlnImageDimensionality #5
_rlnOpticsGroupName #6
300.000000 2.700000 0.100000 2 2 opticsGroup2

data_micrographs

loop_
_rlnDefocusU #1
_rlnDefocusV #2
_rlnDefocusAngle #3
_rlnPhaseShift #4
_rlnCtfMaxResolution #5
_rlnCtfFigureOfMerit #6
_rlnOpticsGroup #7
_rlnImageSizeX #8
_rlnImageSizeY #9
_rlnImageSizeZ #10
25919.101562 21602.023438 -18.697710 0.000000 5.376877 0.000000 2 5760 4092 1
23830.189453 19791.166016 -16.743372 0.000000 5.532679 0.000000 2 5760 4092 1
10394.431641 6267.584961 -20.982275 0.000000 4.930308 0.000000 2 5760 4092 1
16169.261719 12000.760742 -19.549606 0.000000 5.146710 0.000000 2 5760 4092 1
20189.722656 15973.701172 -18.700008 0.000000 5.118085 0.000000 2 5760 4092 1
20330.773438 16094.024414 -19.241142 0.000000 5.104834 0.000000 2 5760 4092 1
3134.059082 -172.930267 -22.123167 0.000000 3.487044 0.000000 2 5760 4092 1
14013.808594 10013.374023 -19.474369 0.000000 5.041018 0.000000 2 5760 4092 1
18583.292969 14337.764648 -18.523611 0.000000 5.882219 0.000000 2 5760 4092 1
12606.517578 8528.151367 -22.129375 0.000000 4.839999 0.000000 2 5760 4092 1
12256.913086 8246.507812 -20.668848 0.000000 4.896522 0.000000 2 5760 4092 1
11610.184570 7570.981445 -20.048080 0.000000 4.225632 0.000000 2 5760 4092 1
14990.302734 10881.281250 -19.529881 0.000000 4.005564 0.000000 2 5760 4092 1
18651.076172 14446.859375 -18.416372 0.000000 4.145433 0.000000 2 5760 4092 1
15987.070312 11640.096680 -18.730507 0.000000 4.876981 0.000000 2 5760 4092 1
7926.644531 5934.816895 -76.000504 0.000000 4.937143 0.000000 2 5760 4092 1
10909.895508 6903.823242 -20.075306 0.000000 4.627056 0.000000 2 5760 4092 1
10915.735352 6862.845703 -20.279875 0.000000 4.160124 0.000000 2 5760 4092 1
11718.327148 7562.350098 -20.032749 0.000000 3.890274 0.000000 2 5760 4092 1
14250.511719 9970.423828 -19.167130 0.000000 4.250895 0.000000 2 5760 4092 1
17220.785156 13224.329102 -18.895741 0.000000 5.857627 0.000000 2 5760 4092 1
5904.299805 2095.994873 -21.648653 0.000000 5.356661 0.000000 2 5760 4092 1
9529.297852 4682.120117 -21.374220 0.000000 4.818568 0.000000 2 5760 4092 1
15667.803711 11952.827148 -19.749832 0.000000 5.252295 0.000000 2 5760 4092 1
12818.359375 8657.795898 -19.996634 0.000000 4.142378 0.000000 2 5760 4092 1

But the micrograph names are there in the input cs file:

strings P82_S4_accepted_live_exposures.cs | grep -i "n24apr.*DW\.mrc" > test.txt

test.txt snip:

S4/import_movies/n24apr08a_pink2_00013gr_00001sq940_v02_00002hl_v01_00002esn-a-DW.mrc
7S4/import_movies/n24apr08a_pink2_00013gr_00001sq940_v02_00002hl_v01_00003esn-a-DW.mrc
S4/import_movies/n24apr08a_pink2_00013gr_00001sq940_v02_00002hl_v01_00005esn-a-DW.mrc
S4/import_movies/n24apr08a_pink2_00013gr_00001sq940_v02_00002hl_v01_00007esn-a-DW.mrc
QS4/import_movies/n24apr08a_pink2_00013gr_00001sq940_v02_00002hl_v01_00008esn-a-DW.mrc
S4/import_movies/n24apr08a_pink2_00013gr_00001sq940_v02_00002hl_v01_00009esn-a-DW.mrc
S4/import_movies/n24apr08a_pink2_00013gr_00001sq940_v02_00002hl_v01_00011esn-a-DW.mrc
S4/import_movies/n24apr08a_pink2_00013gr_00001sq940_v02_00002hl_v01_00015esn-a-DW.mrc
TS4/import_movies/n24apr08a_pink2_00013gr_00001sq940_v02_00002hl_v01_00016esn-a-DW.mrc
S4/import_movies/n24apr08a_pink2_00013gr_00001sq940_v02_00002hl_v01_00020esn-a-DW.mrc
S4/import_movies/n24apr08a_pink2_00013gr_00001sq940_v02_00002hl_v01_00022esn-a-DW.mrc

Is this a bug, or is there another flag required that we are missing?

AlexB02 commented 2 months ago

Experiencing the same issue unfortunately - any updates on a fix?