|
Bsoft
2.1.0
Bernard's software package
|
Select particles. More...
Go to the source code of this file.
Functions | |
| int_float * | project_fom_order (Bproject *project, long &npart, int fom_index, int defocus_fit) |
| int_float * | part_fom_order (Bparticle *partlist, long &npart, int fom_index) |
| long | part_reset_selection (Bproject *project, int flag=0) |
| Resets selection to all particles. More... | |
| long | part_unset_selection (Bproject *project) |
| Unsets selection to no particles. More... | |
| long | part_invert_selection (Bproject *project) |
| Inverts the selection. More... | |
| long | part_select_micrograph (Bproject *project, Bstring &mgselect) |
| Sets selection to the micrographs indicated. More... | |
| long | part_consolidate_selection (Bproject *project, int number) |
| Consolidates selected particles under one selection number. More... | |
| long | part_set_selection (Bproject *project, int number) |
| Selects one selection number and sets all others to zero. More... | |
| long | part_set_sequential (Bproject *project) |
| Selects one selection number and sets all others to zero. More... | |
| long | part_set_FOM (Bproject *project, int fom_index, double fom) |
| Sets the FOM for all particles. More... | |
| long | part_deselect_from_list (Bproject *project, Bstring list) |
| Deselects particles with selection numbers from a list. More... | |
| long | part_deselect (Bproject *project, int fom_index, double fommin, double fommax=1e30) |
| Deselects particles below a given FOM cutoff. More... | |
| long | part_deselect_redundant (Bparticle *partlist, double excl_dist, int part_select, int fom_index) |
| Deselects particles overlapping with better ones. More... | |
| long | part_deselect_redundant (Bproject *project, double excl_dist, int part_select, int fom_index) |
| Deselects particles overlapping with better ones. More... | |
| long | part_set_multi_maps (Bproject *project, int part_select, int nmaps) |
| Sets selection for generating multiple maps. More... | |
| long | part_set_filament_maps (Bproject *project) |
| Generates a selection number from the group number for each filament. More... | |
| long | part_reselect (Bproject *project, Bstring &tag, double reselect_min, double reselect_max) |
| Reselects particles identified by an input STAR tag and between a minimum and maximum. More... | |
| double | part_series_comparison (Bproject *project, Bsymmetry *sym, double angle_cutoff) |
| A function to select particles based on comparison of the orientations within a series. More... | |
| long | part_select_FOM_groups (Bproject *project, int ngroups, int fom_index, int defocus_fit) |
| Selects groups of particles based on the FOM. More... | |
| long | part_select_percentage (Bproject *project, double percentage, int fom_index, int defocus_fit) |
| Selects a percentage of particles based on the FOM. More... | |
| long | part_select_best (Bproject *project, long number, int fom_index, int defocus_fit) |
| Selects the best particles based on the FOM. More... | |
| long | part_select_FOM_avg_std (Bproject *project, double factor, int fom_index) |
| Selects particles based on FOM average and standard deviation. More... | |
| long | part_select_random (Bproject *project, long number) |
| Selects a specific number of particles randomly. More... | |
| long | part_select_random_fraction (Bproject *project, double fraction) |
| Selects particles randomly based on a fraction of the total. More... | |
| long | part_select_random_group (Bproject *project, long number) |
| Selects groups randomly to give at least a number of particles. More... | |
| long | part_select_bootstrap (Bproject *project, int number) |
| Selects a given number of particles randomly with replacement. More... | |
| long | part_select_random_within_view (Bproject *project, Bsymmetry *sym, double theta_step, double phi_step, int number) |
| Selects a given number of particles within each view. More... | |
| long | part_select_maxsmooth (Bproject *project, Bsymmetry *sym, double theta_step, double phi_step, double threshfrac, double sigma, int fom_index) |
| Selects particles based on a smoothed maximum surface. More... | |
| long | part_select_best_within_view (Bproject *project, Bsymmetry *sym, double theta_step, double phi_step, int number, int fom_index) |
| Selects the best number of particles within each view. More... | |
| long | part_select_to_group (Bproject *project) |
| Transfer selection numbers to the group identifiers. More... | |
| long | part_select_group (Bproject *project, int group) |
| Selects particles with a given group identifier. More... | |
| long | part_select_sets (Bproject *project, int size, int flag) |
| Selects sets of particles, each set with the same size. More... | |
| long | part_select_frames (Bproject *project, int frame_start, int frame_end) |
| Select particles from frames in a series. More... | |
| long | part_filament_direction (Bproject *project, double minpct) |
| Checks the direction of particles associated with filaments. More... | |
| long | part_view_select (Bproject *project, View view, double angle) |
| Selects particles based on a distance from a reference view. More... | |
| long | part_side_view_select (Bproject *project, double angle) |
| Selects particles based on a distance from a side view. More... | |
| long | part_euler_angle_select (Bproject *project, double *euler6) |
| Selects particles based on Euler angle limits. More... | |
| long | part_origin_select (Bproject *project, Vector3< double > origin, double distance) |
| Selects particles based on the distance from the nominal origin. More... | |
| long | part_set_first_view_in_series (Bproject *project) |
| Sets all orientation parameters for a particle to the first in the set. More... | |
| long | part_set_best_view_in_series (Bproject *project, int fom_index) |
| Sets all orientation parameters for a particle to the best in the set. More... | |
| long | part_select_series (Bproject *project, int size, int flag) |
| Select series where all are already selected. More... | |
| long | part_series_from_seed (Bproject *project, int flags) |
| Calculates the locations of particles in a series from a seed. More... | |
| double | part_fom_defocus_fit (Bproject *project, int fom_index, double &intercept, double &slope) |
| Fits the particle FOMs as a function of the defocus. More... | |
| double | part_fom_defocus_fit_deselect (Bproject *project, int fom_index, double cutoff) |
| Deselects particles below a given FOM cutoff, adjusted for the defocus. More... | |
| long | part_select_closest_to_focus (Bproject *project) |
| Deselects all particles except those from micrographs closest to focus. More... | |
| long | part_select_furthest_from_focus (Bproject *project) |
| Deselects all particles except those from micrographs furthest from focus. More... | |
| long | part_delete_deselected (Bproject *project) |
| Deletes deselected particles and renumber the remaining. More... | |
| long | part_delete_deselected (Bparticle **partlist) |
| Deletes deselected particles and renumber the remaining. More... | |
| long | part_fix_defocus (Bproject *project, double max_dev) |
| Resets defocus values for particles thata are too far off. More... | |
| vector< pair< Bparticle *, double > > | project_part_sort (Bproject *project, Bstring tag) |
| Sorts the Particles by a selected parameter. More... | |
| long part_consolidate_selection | ( | Bproject * | project, |
| int | number | ||
| ) |
Consolidates selected particles under one selection number.
| *project | project parameter structure with all parameters. |
| number | new selection number (1 if < 1). |
Definition at line 283 of file mg_particle_select.cpp.
| long part_delete_deselected | ( | Bparticle ** | partlist | ) |
Deletes deselected particles and renumber the remaining.
| **partlist | particle parameter structure. |
The old list is deallocated.
Definition at line 2779 of file mg_particle_select.cpp.
| long part_delete_deselected | ( | Bproject * | project | ) |
Deletes deselected particles and renumber the remaining.
| *project | parameter structure with all parameters. |
Definition at line 2729 of file mg_particle_select.cpp.
| long part_deselect | ( | Bproject * | project, |
| int | fom_index, | ||
| double | fommin, | ||
| double | fommax | ||
| ) |
Deselects particles below a given FOM cutoff.
| *project | parameter structure with all parameters. |
| fom_index | index of FOM value to test for. |
| fommin | minimum threshold for deselection. |
| fommax | maximum threshold for deselection. |
Definition at line 468 of file mg_particle_select.cpp.
Deselects particles with selection numbers from a list.
| *project | parameter structure with all parameters. |
| list | comma-separated list of selection numbers. |
Definition at line 412 of file mg_particle_select.cpp.
| long part_deselect_redundant | ( | Bparticle * | partlist, |
| double | excl_dist, | ||
| int | part_select, | ||
| int | fom_index | ||
| ) |
Deselects particles overlapping with better ones.
| *partlist | particle linked list. |
| excl_dist | minimum distance between particles. |
| part_select | initial selection number (-1 means all >0). |
| fom_index | index of FOM value to test for. |
Definition at line 520 of file mg_particle_select.cpp.
| long part_deselect_redundant | ( | Bproject * | project, |
| double | excl_dist, | ||
| int | part_select, | ||
| int | fom_index | ||
| ) |
Deselects particles overlapping with better ones.
| *project | parameter structure with all parameters. |
| excl_dist | minimum distance between particles. |
| part_select | initial selection number (-1 means all >0). |
| fom_index | index of FOM value to test for. |
Definition at line 552 of file mg_particle_select.cpp.
| long part_euler_angle_select | ( | Bproject * | project, |
| double * | euler6 | ||
| ) |
Selects particles based on Euler angle limits.
| *project | project structure with all parameters. |
| *euler6 | 6-value vector of Euler angle limits. |
Only particles already selected are subject to the test.
Definition at line 2229 of file mg_particle_select.cpp.
| long part_filament_direction | ( | Bproject * | project, |
| double | minpct | ||
| ) |
Checks the direction of particles associated with filaments.
| *project | project structure with all parameters. |
| minpct | minimum percentage. |
The selected particles associated with a filament is checked for their in-plane direction. If the percentage of particles exceed the minimum desired, the particles with the corresponding direction are selected, and the rest deselected.
Definition at line 2081 of file mg_particle_select.cpp.
| long part_fix_defocus | ( | Bproject * | project, |
| double | max_dev | ||
| ) |
Resets defocus values for particles thata are too far off.
| *project | parameter structure with all parameters. |
| max_dev | maximum defocus difference allowed. |
Definition at line 2804 of file mg_particle_select.cpp.
| double part_fom_defocus_fit | ( | Bproject * | project, |
| int | fom_index, | ||
| double & | intercept, | ||
| double & | slope | ||
| ) |
Fits the particle FOMs as a function of the defocus.
| *project | parameter structure with all parameters. |
| fom_index | index of FOM value to test for. |
| &intercept | fit intercept. |
| &slope | fit slope. |
The FOM is fit as a linear function of the defocus average.
Definition at line 2584 of file mg_particle_select.cpp.
| double part_fom_defocus_fit_deselect | ( | Bproject * | project, |
| int | fom_index, | ||
| double | cutoff | ||
| ) |
Deselects particles below a given FOM cutoff, adjusted for the defocus.
| *project | parameter structure with all parameters. |
| fom_index | index of FOM value to test for. |
| cutoff | threshold for deselection. |
The FOM is fit as a linear function of the defocus average.
Particles are deselected based on the adjusted FOM cutoff:
adj_cut = slope * defocus + cut
Definition at line 2644 of file mg_particle_select.cpp.
Definition at line 90 of file mg_particle_select.cpp.
| long part_invert_selection | ( | Bproject * | project | ) |
Inverts the selection.
| *project | project parameter structure with all parameters. |
Definition at line 204 of file mg_particle_select.cpp.
Selects particles based on the distance from the nominal origin.
| *project | project structure with all parameters. |
| origin | nominal origin. |
| distance | maximum distance to accept. |
Only particles already selected are subject to the test.
Definition at line 2291 of file mg_particle_select.cpp.
Reselects particles identified by an input STAR tag and between a minimum and maximum.
| *project | parameter structure with all parameters. |
| &tag | tag indicating which data to select on. |
| reselect_min | minimum value. |
| reselect_max | maximum value. |
Only particles already selected are subject to reselection.
Definition at line 749 of file mg_particle_select.cpp.
| long part_reset_selection | ( | Bproject * | project, |
| int | flag | ||
| ) |
Resets selection to all particles.
| *project | project parameter structure with all parameters. |
| flag | flag to limit resetting: 1=all, 2=part. |
Definition at line 133 of file mg_particle_select.cpp.
| long part_select_best | ( | Bproject * | project, |
| long | number, | ||
| int | fom_index, | ||
| int | defocus_fit | ||
| ) |
Selects the best particles based on the FOM.
| *project | parameter structure with all parameters. |
| number | number of particles. |
| fom_index | which FOM value to select on. |
| defocus_fit | flag to compensate for defocus. |
Particles are ranked according to the figure-of-merit and the desired percentage selected.
Definition at line 1052 of file mg_particle_select.cpp.
| long part_select_best_within_view | ( | Bproject * | project, |
| Bsymmetry * | sym, | ||
| double | theta_step, | ||
| double | phi_step, | ||
| int | number, | ||
| int | fom_index | ||
| ) |
Selects the best number of particles within each view.
| *project | parameter structure with all parameters. |
| *sym | symmetry structure. |
| theta_step | angular step size from primary symmetry axis (radians). |
| phi_step | angular step size around primary symmetry axis (radians). |
| number | number within view to select. |
| fom_index | which FOM value to select on. |
The best particles within each view is selected.
Definition at line 1659 of file mg_particle_select.cpp.
| long part_select_bootstrap | ( | Bproject * | project, |
| int | number | ||
| ) |
Selects a given number of particles randomly with replacement.
| *project | parameter structure with all parameters. |
| number | number to select. |
A random number between 1 and the number of selected particles is generated the given number of times. The selection value for the selected particle is incremented each time. A particle may therefore be selected more than once.
Definition at line 1383 of file mg_particle_select.cpp.
| long part_select_closest_to_focus | ( | Bproject * | project | ) |
Deselects all particles except those from micrographs closest to focus.
| *project | parameter structure with all parameters. |
Definition at line 2669 of file mg_particle_select.cpp.
| long part_select_FOM_avg_std | ( | Bproject * | project, |
| double | factor, | ||
| int | fom_index | ||
| ) |
Selects particles based on FOM average and standard deviation.
| *project | parameter structure with all parameters. |
| factor | factor to multiply standard deviation with. |
| fom_index | which FOM value to select on. |
Particles are selected using the average and standard deviation,
with the level set as a function of difference from the average:
selected > average + factor*std_dev
Note the multiplying factor can be negative.
Only particles already selected are subject to the test.
Definition at line 1108 of file mg_particle_select.cpp.
| long part_select_FOM_groups | ( | Bproject * | project, |
| int | ngroups, | ||
| int | fom_index, | ||
| int | defocus_fit | ||
| ) |
Selects groups of particles based on the FOM.
| *project | parameter structure with all parameters. |
| ngroups | number of groups of particles. |
| fom_index | index of FOM value to select on. |
| defocus_fit | flag to compensate for defocus. |
Particles are ranked according to the figure-of-merit and equal numbers are distributed to the requested number of particle groups. The particle group selections are then written into a selection array in the STAR data base, with the group with the best FOM's first. Only particles already selected are subject to the test.
Definition at line 945 of file mg_particle_select.cpp.
| long part_select_frames | ( | Bproject * | project, |
| int | frame_start, | ||
| int | frame_end | ||
| ) |
Select particles from frames in a series.
| *project | parameter structure with all parameters. |
| frame_start | first frame (starts at 1). |
| frame_end | last frame. |
Particles in frames from a series in the same field-of-view are selected. Only particles that are already selected are considered.
Definition at line 1924 of file mg_particle_select.cpp.
| long part_select_furthest_from_focus | ( | Bproject * | project | ) |
Deselects all particles except those from micrographs furthest from focus.
| *project | parameter structure with all parameters. |
Definition at line 2699 of file mg_particle_select.cpp.
| long part_select_group | ( | Bproject * | project, |
| int | group | ||
| ) |
Selects particles with a given group identifier.
| *project | parameter structure with all parameters. |
| group | group identifier. |
Definition at line 1792 of file mg_particle_select.cpp.
| long part_select_maxsmooth | ( | Bproject * | project, |
| Bsymmetry * | sym, | ||
| double | theta_step, | ||
| double | phi_step, | ||
| double | threshfrac, | ||
| double | sigma, | ||
| int | fom_index | ||
| ) |
Selects particles based on a smoothed maximum surface.
| *project | parameter structure with all parameters. |
| *sym | symmetry structure. |
| theta_step | angular step size from primary symmetry axis (radians). |
| phi_step | angular step size around primary symmetry axis (radians). |
| threshfrac | fraction of maximum threshold. |
| sigma | smoothing parameter: gaussian sigma. |
| fom_index | which FOM value to select on. |
The best particles within each view is selected.
Definition at line 1546 of file mg_particle_select.cpp.
Sets selection to the micrographs indicated.
| *project | project parameter structure with all parameters. |
| &mgselect | string with selection. |
Only the micrograph selection fields are modified.
Definition at line 247 of file mg_particle_select.cpp.
| long part_select_percentage | ( | Bproject * | project, |
| double | percentage, | ||
| int | fom_index, | ||
| int | defocus_fit | ||
| ) |
Selects a percentage of particles based on the FOM.
| *project | parameter structure with all parameters. |
| percentage | percentage of particles (0 - 100). |
| fom_index | which FOM value to select on. |
| defocus_fit | flag to compensate for defocus. |
Particles are ranked according to the figure-of-merit and the desired percentage selected.
Definition at line 995 of file mg_particle_select.cpp.
| long part_select_random | ( | Bproject * | project, |
| long | number | ||
| ) |
Selects a specific number of particles randomly.
| *project | parameter structure with all parameters. |
| number | number to select. |
An array is set up for all selected particles. The given number of random elements is selected in the array and transfered as particle selections.
Definition at line 1163 of file mg_particle_select.cpp.
| long part_select_random_fraction | ( | Bproject * | project, |
| double | fraction | ||
| ) |
Selects particles randomly based on a fraction of the total.
| *project | parameter structure with all parameters. |
| fraction | fraction of total to select. |
A random number between 0 and 1 is generated for each particle and if it is smaller than the given fraction, the particle is selected.
Definition at line 1243 of file mg_particle_select.cpp.
| long part_select_random_group | ( | Bproject * | project, |
| long | number | ||
| ) |
Selects groups randomly to give at least a number of particles.
| *project | parameter structure with all parameters. |
| number | number to select. |
A random number between 0 and 1 is generated for each particle and if it is smaller than the given fraction, the particle is selected.
Definition at line 1292 of file mg_particle_select.cpp.
| long part_select_random_within_view | ( | Bproject * | project, |
| Bsymmetry * | sym, | ||
| double | theta_step, | ||
| double | phi_step, | ||
| int | number | ||
| ) |
Selects a given number of particles within each view.
| *project | parameter structure with all parameters. |
| *sym | symmetry structure. |
| theta_step | angular step size from primary symmetry axis (radians). |
| phi_step | angular step size around primary symmetry axis (radians). |
| number | number within view to select. |
A random number between 1 and the number of selected particles is generated the given number of times. The selection value for the selected particle is incremented each time. A particle may therefore be selected more than once. This selection is meant to be used with the bootstrap reconstruction.
Definition at line 1442 of file mg_particle_select.cpp.
| long part_select_series | ( | Bproject * | project, |
| int | size, | ||
| int | flag | ||
| ) |
Select series where all are already selected.
| *project | parameter structure with all parameters. |
| size | number of particles in each set. |
| flag | flag to not count across mg or rec boundaries. |
This function selects those series where all the particles are already selected, and deselects the rest. Sets are selected with each series part of the same set.
Definition at line 2421 of file mg_particle_select.cpp.
| long part_select_sets | ( | Bproject * | project, |
| int | size, | ||
| int | flag | ||
| ) |
Selects sets of particles, each set with the same size.
| *project | parameter structure with all parameters. |
| size | number of particles in each set. |
| flag | flag to not count across mg or rec boundaries. |
Sets up sets of particles, each set identified as a number in the selection array.
Definition at line 1841 of file mg_particle_select.cpp.
| long part_select_to_group | ( | Bproject * | project | ) |
Transfer selection numbers to the group identifiers.
| *project | parameter structure with all parameters. |
Definition at line 1748 of file mg_particle_select.cpp.
A function to select particles based on comparison of the orientations within a series.
| *project | parameter structure with all parameters. |
| *sym | symmetry. |
| angle_cutoff | angle cutoff value (radians). |
Only particles already selected are subject to the test.
Definition at line 828 of file mg_particle_select.cpp.
| long part_series_from_seed | ( | Bproject * | project, |
| int | flags | ||
| ) |
Calculates the locations of particles in a series from a seed.
| *project | micrograph project. |
| flags | bit 1=invert z, bit 2=use original particle view. |
The seed particle locations is either in the zero-degree tilt 2D micrograph, or a 3D reconstruction. The latter also gives the z-coordinate, resulting in a better definition of the particle location. The project selection flag indicates micrograph or reconstruction.
Definition at line 2480 of file mg_particle_select.cpp.
| long part_set_best_view_in_series | ( | Bproject * | project, |
| int | fom_index | ||
| ) |
Sets all orientation parameters for a particle to the best in the set.
| *project | parameter structure with all parameters. |
| fom_index | index of FOM value to select on. |
This function uses the FOM to select the best orientation parameters for a particle in a set (typically a focal series) and sets all orientation parameters to the same values.
Definition at line 2377 of file mg_particle_select.cpp.
| long part_set_filament_maps | ( | Bproject * | project | ) |
Generates a selection number from the group number for each filament.
| *project | parameter structure with all parameters. |
Definition at line 645 of file mg_particle_select.cpp.
| long part_set_first_view_in_series | ( | Bproject * | project | ) |
Sets all orientation parameters for a particle to the first in the set.
| *project | parameter structure with all parameters. |
This function sets the views of all the particles in the field-of-view to the views for the first micrograph.
Definition at line 2343 of file mg_particle_select.cpp.
| long part_set_FOM | ( | Bproject * | project, |
| int | fom_index, | ||
| double | fom | ||
| ) |
Sets the FOM for all particles.
| *project | project parameter structure with all parameters. |
| fom_index | index of FOM value to set. |
| fom | new FOM. |
Definition at line 382 of file mg_particle_select.cpp.
| long part_set_multi_maps | ( | Bproject * | project, |
| int | part_select, | ||
| int | nmaps | ||
| ) |
Sets selection for generating multiple maps.
| *project | parameter structure with all parameters. |
| part_select | initial selection number (-1 means all >0). |
| nmaps | desired number of maps. |
Selected particles are sequentially assigned increasing integers up to desired number of maps (nmaps).
Definition at line 590 of file mg_particle_select.cpp.
| long part_set_selection | ( | Bproject * | project, |
| int | number | ||
| ) |
Selects one selection number and sets all others to zero.
| *project | project parameter structure with all parameters. |
| number | selection number to keep. |
Definition at line 317 of file mg_particle_select.cpp.
| long part_set_sequential | ( | Bproject * | project | ) |
Selects one selection number and sets all others to zero.
| *project | project parameter structure with all parameters. |
Definition at line 352 of file mg_particle_select.cpp.
| long part_side_view_select | ( | Bproject * | project, |
| double | angle | ||
| ) |
Selects particles based on a distance from a side view.
| *project | project structure with all parameters. |
| angle | angular distance from the side view. |
Only particles already selected are subject to the test.
Definition at line 2181 of file mg_particle_select.cpp.
| long part_unset_selection | ( | Bproject * | project | ) |
Unsets selection to no particles.
| *project | project parameter structure with all parameters. |
Definition at line 168 of file mg_particle_select.cpp.
Selects particles based on a distance from a reference view.
| *project | project structure with all parameters. |
| view | central view to search for. |
| angle | angular distance from the view. |
Only particles already selected are subject to the test.
Definition at line 2130 of file mg_particle_select.cpp.
Definition at line 24 of file mg_particle_select.cpp.
Sorts the Particles by a selected parameter.
| *project | project parameter structure. |
| tag | parameter tag. |
Definition at line 2842 of file mg_particle_select.cpp.