cdienem / StarTool

The Swiss Army Knife for Editing Relion .STAR Files
MIT License
19 stars 6 forks source link

--replace_star X Y float #5

Open domgutier opened 6 years ago

domgutier commented 6 years ago

Hello,

I want to replace the defocus values of a particles.star file. i've used your script on another dataset and it worked fine but on this particular dataset it does not. The only difference is that the coordinates are floated in the local.star files and not in the particles.star file so I used

python startool.py test_particles.star --replace_star _rlnDefocusU=localtest.star:_rlnMicrographName,_rlnCoordinateX[1],_rlnCoordinateY[1] --replace_star _rlnDefocusV=localtest.star:_rlnMicrographName,_rlnCoordinateX[1],_rlnCoordinateY[1] --replace_star _rlnDefocusAngle=localtest.star:_rlnMicrographName,_rlnCoordinateX[1],_rlnCoordinateY[1] --write test_particleswithlocal.star

but trying [1, 2, 10, 20, or 100] didn't replace any defocus values. So, I then floated all the XY coord values of the particles.star file and tried the command below but the defocus values did not get replaced. python startool.py float_test_particles.star --replace_star _rlnDefocusU=localtest.star:_rlnMicrographName,_rlnCoordinateX,_rlnCoordinateY --replace_star _rlnDefocusV=localtest.star:_rlnMicrographName,_rlnCoordinateX,_rlnCoordinateY --replace_star _rlnDefocusAngle=localtest.star:_rlnMicrographName,_rlnCoordinateX,_rlnCoordinateY --write float_test_particleswithlocal.star

I do not get any error messages. Have you ever gotten this? Any ideas as to how I can make this work or what the problem is?

cdienem commented 6 years ago

Hi, I have tried to reproduce the problem by trying float/int values in either the reference star file or the target start file. Even if they differ by a fraction (like 45.1 (float) vs 45 (int)) I get the replacement from the reference by using [1] behind the reference label. Can you give me a few sample lines from the two starfiles you tried? I would like to find out where the issue is.

Thanks.