Skip to content
Snippets Groups Projects
Commit 8a08a9f8 authored by Huabin Zhou's avatar Huabin Zhou
Browse files

roll back to skip the rotamer and maskmer generation prior the template...

roll back to skip the rotamer and maskmer generation prior the template matching, which accelaratate the program since MPI wasn't involved in these two separated processes .
parent 3bbd8a8b
No related merge requests found
Showing
with 2156 additions and 0 deletions
# config.py
import os
"""
The input and configureation:
1.The tomogram, should be black on white background
2.The templates, needs to be white on black background, to be consistent with normal convention
3.The coordinates of picked particles
4.The missing wedge information, default to [30,42], corresponding to [-60,+48] tilt range
5.The shrinkage factor, default to 0.3, this controls the contours of the template
6. There are more high level parameters, like the search depth, etc.
"""
############################ input && output control ##################################
current_dir = os.getcwd()
split_path = current_dir.split("/")
tomoID = split_path[-2]
prefix = tomoID + ".test1.catm"
input_folder = 'inputs/'
tomogram = input_folder +tomoID+".test1.lps25.mrc"
templates = [input_folder+"mono-8Apx-lps30-box30-rot12-core.mrc"]
contour_level = [0.2]
# Masks are required to be the same shape as the templates
# One can create the mask in Relion with soft edges, extend 2 and soft 3 is recommended
masks = [
input_folder + 'mask-mono-8Apx-lps30-box30-rot12-ex2-s2.mrc',
]
# Coordinates of picked particles,you might also include the angles for local search
df = input_folder+'s68.pick1.csv'#'../cluster/s'+str(tomoID)+'.unetn_4.5.csv'
# We need the missing wedge information or a CTF model
# You might create a CTF model via Relion or Warp, which should be generic for data collected with the microscope
# If a CTF model present, it will be use by default
ctf_model_file = input_folder+ tomoID + "_0000000_ctf_8.00A.mrc" # path to the CTF model
# output path
output_path = "results/"
write_models = True # Generate a volume with assigned models
mpi_nn = -1 # -1 will use all the availbe cpu
############################ Template Matching Control ##################################
# Missing wedge information, if CTF model is not found
missing_wedge = [30, 42] # [30,42] Corresponding to [-60, +48] tilt range
# Shrinkage factor, which the counter level of the volume, can be determined in Chimera
# It's designed to control how close two objects are allowed to be
# only template 1 will be used for the cleaning of clashes
shrinkage_factor = 1
# Number of angles for global template matching
number_of_angles = 2000
# The minimum CCCs kept after template matching
min_CCC = 0.1
# Range of local search angles, only for local search, default to False for global search
# For local searchthe rough angles need to be provied in the coords.csv,
# with columns phi, theta, psi in intrinsic ZXZ convention
local_search_angles = False # False or True
# searching space
matching_space = 3 # in pixels, how far from the original position to search
############################ Clash Resolver Control ##################################
# Search depth, control how many rotataions
search_depth = 200
# for development
bypass_TM = False
bypass_CR = False
sort_score = True # this is useful if you don't want to mix up the index
############################ For Development ##################################
pre_assigned_volume = None #'s'+tomoID+'-pre-assigned-vol.mrc' # path to the pre-assigned volume
bypass_optimizer = False # this will bypass the optimizer clash resolver
distance_tolerance = 2
adjust_ccc = None
# max distance between two partles to be considered as the same particle
# option's for running only the general template matching
testTM = False
chunk_size = None #[304,776,776]#[152,194,194]
File added
File added
x,y,z
23,19,14
19,22,26
20,8,26
12,33,34
30,16,5
File added
File added
File added
This source diff could not be displayed because it is too large. You can view the blob instead.
23 18 14 101.0 91.99999999999999 121.0
12 32 32 126.99999999999999 119.99999999999999 47.000000000000014
17 7 25 -27.000000000000007 54.99999999999999 64.00000000000001
29 15 3 90.99999999999999 93.0 -46.99999999999999
18 21 25 -27.000000000000007 54.99999999999999 64.00000000000001
x,y,z,phi,theta,psi,ccc,model
23.0,18.0,14.0,-169.0,92.0,31.0,0.565712,0.0
12.0,32.0,32.0,-143.0,120.0,-43.0,0.513825,0.0
17.0,7.0,25.0,63.0,55.0,-26.0,0.444633,0.0
29.0,15.0,3.0,-179.0,93.0,-137.0,0.46157,0.0
18.0,21.0,25.0,63.0,55.0,-26.0,0.420571,0.0
File added
# Created by the starfile Python package (version 0.5.1) at 14:03:30 on 04/10/2024
data_
loop_
_rlnCoordinateX #1
_rlnCoordinateY #2
_rlnCoordinateZ #3
_rlnAngleRot #4
_rlnAngleTilt #5
_rlnAnglePsi #6
_ccc #7
23 18 14 101.000000 92.000000 121.000000 0.565712
12 32 32 127.000000 120.000000 47.000000 0.513825
17 7 25 -27.000000 55.000000 64.000000 0.444633
29 15 3 91.000000 93.000000 -47.000000 0.461570
18 21 25 -27.000000 55.000000 64.000000 0.420571
<objlist>
<subtomo>
<object subtomo_idx="0" x="23" y="18" z="14" phi="-169" theta="92" psi="31" CCC="0.565712" model="0.000000"/>
</subtomo>
<subtomo>
<object subtomo_idx="1" x="12" y="32" z="32" phi="-143" theta="120" psi="-43" CCC="0.513825" model="0.000000"/>
</subtomo>
<subtomo>
<object subtomo_idx="2" x="17" y="7" z="25" phi="63" theta="55" psi="-26" CCC="0.444633" model="0.000000"/>
</subtomo>
<subtomo>
<object subtomo_idx="3" x="29" y="15" z="3" phi="-179" theta="93" psi="-137" CCC="0.461570" model="0.000000"/>
</subtomo>
<subtomo>
<object subtomo_idx="4" x="18" y="21" z="25" phi="63" theta="55" psi="-26" CCC="0.420571" model="0.000000"/>
</subtomo>
</objlist>
File added
File added
File added
x,y,z
23,19,14
19,22,26
20,8,26
12,33,34
30,16,5
File added
File added
File added
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment