pipeline:utilities:sxpipe_moon_eliminator

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
pipeline:utilities:sxpipe_moon_eliminator [2018/08/06 15:38]
moriya
pipeline:utilities:sxpipe_moon_eliminator [2018/08/22 11:15]
fmerino
Line 21: Line 21:
 __1. Single Volume Mode:__ __1. Single Volume Mode:__
  
-Create reference 3D volume ​and 3D mask from R-VIPER 3D model with the resample ratio used in ISAC2 using an expected molecular mass [kDa].+Create reference 3D structure ​and 3D mask from R-VIPER 3D model with the resample ratio used in ISAC2 using an expected molecular mass [kDa].
  
   sxpipe.py moon_eliminator '​outdir_rviper/​main001/​average_volume.hdf'​ '​outdir_pipe_moon_eliminator'​ --mol_mass=1400 --pixel_size=1.12 --resample_ratio='​outdir_isac2'​ --box_size=352 --generate_mask ​   sxpipe.py moon_eliminator '​outdir_rviper/​main001/​average_volume.hdf'​ '​outdir_pipe_moon_eliminator'​ --mol_mass=1400 --pixel_size=1.12 --resample_ratio='​outdir_isac2'​ --box_size=352 --generate_mask ​
  
-Create reference 3D volume ​and 3D mask from R-VIPER 3D model with the resample ratio used in ISAC2 using ad-hoc density threshold instead of the expected molecular mass [kDa].+Create reference 3D structure ​and 3D mask from R-VIPER 3D model with the resample ratio used in ISAC2 using ad-hoc density threshold instead of the expected molecular mass [kDa].
  
   sxpipe.py moon_eliminator '​outdir_rviper/​main001/​average_volume.hdf'​ '​outdir_pipe_moon_eliminator'​ --mol_mass=1400 --pixel_size=1.12 --use_density_threshold=13.2 --resample_ratio='​outdir_isac2'​ --box_size=352 --generate_mask ​   sxpipe.py moon_eliminator '​outdir_rviper/​main001/​average_volume.hdf'​ '​outdir_pipe_moon_eliminator'​ --mol_mass=1400 --pixel_size=1.12 --use_density_threshold=13.2 --resample_ratio='​outdir_isac2'​ --box_size=352 --generate_mask ​
  
-Create reference 3D volume ​and 3D mask from post-refined MERIDIEN 3D model using the expected molecular mass [kDa].+Create reference 3D structure ​and 3D mask from post-refined MERIDIEN 3D model using the expected molecular mass [kDa].
  
   sxpipe.py moon_eliminator '​outdir_postrefiner/​postrefine3d.hdf'​ '​outdir_pipe_moon_eliminator'​ --mol_mass=1400 --pixel_size=1.12 --generate_mask ​   sxpipe.py moon_eliminator '​outdir_postrefiner/​postrefine3d.hdf'​ '​outdir_pipe_moon_eliminator'​ --mol_mass=1400 --pixel_size=1.12 --generate_mask ​
Line 36: Line 36:
 __2. Halfset Volumes Mode:__ __2. Halfset Volumes Mode:__
  
-Create reference 3D volume ​and 3D mask from halfset unfiltered ​volumes ​produced by MERIDIEN, using the expected molecular mass [kDa].+Create reference 3D structure ​and 3D mask from halfset unfiltered ​maps produced by MERIDIEN, using the expected molecular mass [kDa].
  
   sxpipe.py moon_eliminator '​outdir_meridien/​vol_0_unfil_025.hdf'​ '​outdir_meridien/​vol_0_unfil_025.hdf'​ '​outdir_pipe_moon_eliminator'​ --mol_mass=1400 --pixel_size=1.12 --generate_mask ​   sxpipe.py moon_eliminator '​outdir_meridien/​vol_0_unfil_025.hdf'​ '​outdir_meridien/​vol_0_unfil_025.hdf'​ '​outdir_pipe_moon_eliminator'​ --mol_mass=1400 --pixel_size=1.12 --generate_mask ​
Line 45: Line 45:
 === Main Parameters === === Main Parameters ===
   ; input_volume_path : Input volume path: Path to input volume file containing the 3D density map. (default required string)   ; input_volume_path : Input volume path: Path to input volume file containing the 3D density map. (default required string)
-  ; input_volume_path_2nd : Second input volume path: Path to second input volume file containing the 3D density map. Use this option to create a mask from the volume combined ​two MERIDIEN ​halfset volumes. (default none) +  ; input_volume_path_2nd : Second input volume path: Path to second input volume file containing the 3D density map. Use this option to create a mask from the sum of two MERIDIEN ​half-set maps. (default none) 
-  ; output_directory : Output directory: The results will be written here. This directory will be created automatically and it must not exist previously. (default required string)+  ; output_directory : Output directory: The results will be written here. It cannot ​be an existing one. (default required string)
  
-  ; %%--%%pixel_size : Output pixel size [A]: The original pixel size of dataset. This must be the pixel size after resampling when resample_ratio != 1.0. That is, it will be the pixel size of the output ​volume. (default required float)+  ; %%--%%pixel_size : Output pixel size [A]: The original pixel size of dataset. This must be the pixel size after resampling when resample_ratio != 1.0. That is, it will be the pixel size of the output ​map. (default required float)
   ; %%--%%mol_mass : Molecular mass [kDa]: The estimated molecular mass of the target particle in kilodalton. (default required float)   ; %%--%%mol_mass : Molecular mass [kDa]: The estimated molecular mass of the target particle in kilodalton. (default required float)
   ; %%--%%use_density_threshold : Use ad-hoc density threshold: Use user-provided ad-hoc density threshold, instead of computing the value from the molecular mass. Below this density value, the data is assumed not to belong to the main body of the particle density. (default none)   ; %%--%%use_density_threshold : Use ad-hoc density threshold: Use user-provided ad-hoc density threshold, instead of computing the value from the molecular mass. Below this density value, the data is assumed not to belong to the main body of the particle density. (default none)
   ; %%--%%moon_distance : Distance to the nearest moon [Pixels]: The moons further than this distance from the density surface will be elminated. The value smaller than the default is not recommended because it is difficult to avoid the stair-like gray level change at the edge of the density surface. (default 3.0)   ; %%--%%moon_distance : Distance to the nearest moon [Pixels]: The moons further than this distance from the density surface will be elminated. The value smaller than the default is not recommended because it is difficult to avoid the stair-like gray level change at the edge of the density surface. (default 3.0)
-  ; %%--%%dilation : Dilation width [Pixels]: The pixel width to dilate the 3D binary ​volume ​corresponding to the specified molecular mass or density threshold prior to softening the edge. By default, it is set to half of %%--%%moon_distance so that the voxels with 1.0 values in the mask are same as the hard-edged molecular-mass binary ​volume. (default -1.0)+  ; %%--%%dilation : Dilation width [Pixels]: The pixel width to dilate the 3D binary ​map corresponding to the specified molecular mass or density threshold prior to softening the edge. By default, it is set to half of %%--%%moon_distance so that the voxels with 1.0 values in the mask are same as the hard-edged molecular-mass binary ​map. (default -1.0)
   ; %%--%%edge_sigma : Edge sigma [Pixels]: The Gaussian sigma of transition area for soft-edge of the moon eliminator 3D mask. This value controls the falloff speed of soft-edge; The samller the sigma, the faster the falloff. Effective only with %%--%%edge_type='​gauss'​. (default 1.0)   ; %%--%%edge_sigma : Edge sigma [Pixels]: The Gaussian sigma of transition area for soft-edge of the moon eliminator 3D mask. This value controls the falloff speed of soft-edge; The samller the sigma, the faster the falloff. Effective only with %%--%%edge_type='​gauss'​. (default 1.0)
-  ; %%--%%resample_ratio : Resample ratio: Specify a value larger than 0.0. By default, the program does not resmaple ​the input volume ​(i.e. resample ratio is 1.0). Use this option maily to restore the original dimensions or pixel size of VIPER or R-VIPER model. Alternatively,​ specify the path to the output directory of an ISAC2 run. The program automatically extracts the resampling ratio used by the ISAC2 run. (default '​1.0'​)+  ; %%--%%resample_ratio : Resample ratio: Specify a value larger than 0.0. By default, the program does not resample ​the input map (i.e. resample ratio is 1.0). Use this option maily to restore the original dimensions or pixel size of VIPER or R-VIPER model. Alternatively,​ specify the path to the output directory of an ISAC2 run. The program automatically extracts the resampling ratio used by the ISAC2 run. (default '​1.0'​)
   ; %%--%%box_size : Output box size [Pixels]: The x, y, and z dimensions of cubic area to be windowed from input 3D volume for output 3D volumes. This must be the box size after resampling when resample_ratio != 1.0. (default none)   ; %%--%%box_size : Output box size [Pixels]: The x, y, and z dimensions of cubic area to be windowed from input 3D volume for output 3D volumes. This must be the box size after resampling when resample_ratio != 1.0. (default none)
   ; %%--%%resampled_shift3d : Providing resampled 3D shifts: Use this option when you are providing the resampled 3D shifts (using pixel size of outputs) when %%--%%resample_ratio!=1.0. By default, the program assums the provided shifts are not resampled. (default False)   ; %%--%%resampled_shift3d : Providing resampled 3D shifts: Use this option when you are providing the resampled 3D shifts (using pixel size of outputs) when %%--%%resample_ratio!=1.0. By default, the program assums the provided shifts are not resampled. (default False)
-  ; %%--%%shift3d_x : 3D x-shift [Pixels]: ​Provide ​3D x-shift ​corresponding to shifting the 3D volume along x-axis. (default 0) +  ; %%--%%shift3d_x : 3D x-shift [Pixels]: 3D x-shift ​value. (default 0) 
-  ; %%--%%shift3d_y : 3D y-shift [Pixels]: ​Provide ​3D y-shift ​corresponding to shifting the 3D volume along y-axis. (default 0) +  ; %%--%%shift3d_y : 3D y-shift [Pixels]: 3D y-shift ​value. (default 0) 
-  ; %%--%%shift3d_z : 3D z-shift [Pixels]: ​Provide ​3D z-shift ​corresponding to shifting the 3D volume along z-axis. (default 0) +  ; %%--%%shift3d_z : 3D z-shift [Pixels]: 3D z-shift ​value. (default 0) 
-  ; %%--%%invert_handedness : Invert handedness: Invert the handedness of the 3D volume. (default False)+  ; %%--%%invert_handedness : Invert handedness: Invert the handedness of the 3D map. (default False)
   ; %%--%%fl : Low-pass filter resolution [A]: >0.0: low-pass filter to the value in Angstrom; =-1.0: no low-pass filter. The program applies this low-pass filter before the moon elimination. (default -1.0)   ; %%--%%fl : Low-pass filter resolution [A]: >0.0: low-pass filter to the value in Angstrom; =-1.0: no low-pass filter. The program applies this low-pass filter before the moon elimination. (default -1.0)
   ; %%--%%aa : Low-pass filter fall-off [1/Pixels]: Low-pass filter fall-off in absolute frequency. The program applies this low-pass filter before the moon elimination. Effective only when %%--%%fl > 0.0. (default 0.1)   ; %%--%%aa : Low-pass filter fall-off [1/Pixels]: Low-pass filter fall-off in absolute frequency. The program applies this low-pass filter before the moon elimination. Effective only when %%--%%fl > 0.0. (default 0.1)
-  ; %%--%%generate_mask : Generate soft-edged mask: Generate soft-edged mask with specified method from the 3D binary ​volume ​corresponding to the specified molecular mass or density threshold, using the values provided through %%--%%gm_* options. Available methods are (1) '​gauss'​ for gaussian soft-edge and (2) '​cosine'​ for cosine soft-edged (used in PostRefiner). (default False)+  ; %%--%%generate_mask : Generate soft-edged mask: Generate soft-edged mask with specified method from the 3D binary ​map corresponding to the specified molecular mass or density threshold, using the values provided through %%--%%gm_* options. Available methods are (1) '​gauss'​ for gaussian soft-edge and (2) '​cosine'​ for cosine soft-edged (used in PostRefiner). (default False)
  
 \\ \\
 === Advanced Parameters === === Advanced Parameters ===
-  ; %%--%%gm_dilation : Soft-edge dilation [Pixels]: The pixel width to dilate the 3D binary ​volume ​corresponding to the specified molecular mass or density threshold prior to softening the edge. By default, it is set to half of %%--%%gm_edge_width so that the voxels with 1.0 values in the mask are same as the hard-edged binary ​volume ​with the threadhold. Effective only with %%--%%enerate_mask option. (default -1.0)+  ; %%--%%gm_dilation : Soft-edge dilation [Pixels]: The pixel width to dilate the 3D binary ​map corresponding to the specified molecular mass or density threshold prior to softening the edge. By default, it is set to half of %%--%%gm_edge_width so that the voxels with 1.0 values in the mask are same as the hard-edged binary ​map with the threadhold. Effective only with %%--%%enerate_mask option. (default -1.0)
   ; %%--%%gm_edge_width : Soft-edge width [Pixels]: The pixel width of transition area for soft-edged masking. Effective only with %%--%%generate_mask option. (default 6.0)   ; %%--%%gm_edge_width : Soft-edge width [Pixels]: The pixel width of transition area for soft-edged masking. Effective only with %%--%%generate_mask option. (default 6.0)
   ; %%--%%gm_edge_sigma : Soft-edge sigma [Pixels]: The Gaussian sigma of transition area for soft-edged masking. This value controls the fall-speed of soft-edge; The samller the sigma, the faster the falloff. Effective only with %%--%%generate_mask and %%--%%generate_mask='​gauss'​. (default 2.0)   ; %%--%%gm_edge_sigma : Soft-edge sigma [Pixels]: The Gaussian sigma of transition area for soft-edged masking. This value controls the fall-speed of soft-edge; The samller the sigma, the faster the falloff. Effective only with %%--%%generate_mask and %%--%%generate_mask='​gauss'​. (default 2.0)
Line 79: Line 79:
 === List of output Files === === List of output Files ===
 || **File Name** || **Discription** || || **File Name** || **Discription** ||
-|| *_ref_before_moon_elimination.hdf || File containing the 3D reference before moon elimination (i.e., the 3D volume ​just before applying moon elimination.). ||+|| *_ref_before_moon_elimination.hdf || File containing the 3D reference ​map before moon elimination (i.e., the 3D map just before applying moon elimination.). ||
 || *_ref_moon_eliminated.hdf || File containing the moon eliminated 3D reference. || || *_ref_moon_eliminated.hdf || File containing the moon eliminated 3D reference. ||
 || *_mask_moon_elminator.hdf || File containing the moon elminator 3D mask. || || *_mask_moon_elminator.hdf || File containing the moon elminator 3D mask. ||
Line 89: Line 89:
 This command executes the following processes: This command executes the following processes:
   - Extract resample ratio from ISAC run directory if necessary (mainly for R-VIPER models).   - Extract resample ratio from ISAC run directory if necessary (mainly for R-VIPER models).
-  - Resample and window the volume ​if necessary (mainly for R-VIPER models) +  - Resample and window the map if necessary (mainly for R-VIPER models) 
-  - Shift 3D volume ​if necessary.+  - Shift 3D map if necessary.
   - Invert the handedness if necessary.   - Invert the handedness if necessary.
-  - Apply low-pass filter to the input volume ​before the moon elimination if necessary. +  - Apply low-pass filter to the input map before the moon elimination if necessary. 
-  - Save reference 3D volume ​before eliminating the moons. +  - Save reference 3D map before eliminating the moons. 
-  - Create reference 3D volume ​by eliminating the moons from the input volume ​and save the results. +  - Create reference 3D map by eliminating the moons from the input map and save the results. 
-  - Create 3D mask from the 3D bainary ​corresponding to the molecular mass and save the result if necessary ​+  - Create 3D mask from the 3D binary ​corresponding to the molecular mass and save the result if necessary ​
  
 \\ \\
Line 108: Line 108:
  
 Wish Wish
-  * Add options for 3D rotation of the volume.+  * Add options for 3D rotation of the map.
  
 === 2018/06/18 Toshio Moriya === === 2018/06/18 Toshio Moriya ===
Line 118: Line 118:
     * On the other hand, if it is too short, soft-edge will have the stair-like gray level change because of quantization or digitization.     * On the other hand, if it is too short, soft-edge will have the stair-like gray level change because of quantization or digitization.
   * dilation   * dilation
-    * Setting dilation to half of moon_distance generates mask where the voxels with 1.0 values are same as the hard-edged molecular-mass binary ​volume ​(default behaviour). +    * Setting dilation to half of moon_distance generates mask where the voxels with 1.0 values are same as the hard-edged molecular-mass binary ​map (default behaviour). 
-    * Setting dilation to smaller than half of moon_distance generates mask where the voxels with 1.0 values are smaller than the hard-edged molecular-mass binary ​volume.+    * Setting dilation to smaller than half of moon_distance generates mask where the voxels with 1.0 values are smaller than the hard-edged molecular-mass binary ​map.
   * edge_sigma   * edge_sigma
     * In principle, smaller edge_sigma is better.     * In principle, smaller edge_sigma is better.
     * However, edge_sigma must be at least larger than 1[pixel]. ​     * However, edge_sigma must be at least larger than 1[pixel]. ​
     * If not, the density distribution of moon eliminator 3D mask won't be smooth (spiky) because of quantization or digitization.     * If not, the density distribution of moon eliminator 3D mask won't be smooth (spiky) because of quantization or digitization.
-    * In addition, moon-eliminated reference 3D volume ​will have a strange dent near zero.+    * In addition, moon-eliminated reference 3D map will have a strange dent near zero.
  
 Tips about balancing settings of gm_dilation,​ gm_edge_width,​ and gm_edge_sigma options for Gaussian soft-edge. Tips about balancing settings of gm_dilation,​ gm_edge_width,​ and gm_edge_sigma options for Gaussian soft-edge.
   * gm_dilation   * gm_dilation
-    * Setting dilation to half of gm_edge_width generates mask where the voxels with 1.0 values are same as the hard-edged molecular-mass binary ​volume ​(default behaviour). +    * Setting dilation to half of gm_edge_width generates mask where the voxels with 1.0 values are same as the hard-edged molecular-mass binary ​map (default behaviour). 
-    * Setting dilation to smaller than half of gm_edge_width generates mask where the voxels with 1.0 values are smaller than the hard-edged molecular-mass binary ​volume.+    * Setting dilation to smaller than half of gm_edge_width generates mask where the voxels with 1.0 values are smaller than the hard-edged molecular-mass binary ​map.
   * gm_edge_width ​   * gm_edge_width ​
     * A wider gm_edge_width is better. If it is too narrow, soft-edge will have the stair-like gray level change because of quantization or digitization.     * A wider gm_edge_width is better. If it is too narrow, soft-edge will have the stair-like gray level change because of quantization or digitization.
Line 137: Line 137:
     * However, gm_edge_sigma must be at least larger than 1[pixel]. ​     * However, gm_edge_sigma must be at least larger than 1[pixel]. ​
     * If not, the density distribution of moon eliminator 3D mask won't be smooth (spiky) because of quantization or digitization.     * If not, the density distribution of moon eliminator 3D mask won't be smooth (spiky) because of quantization or digitization.
-    * In addition, moon-eliminated reference 3D volume ​will have a strange dent near zero.+    * In addition, moon-eliminated reference 3D map will have a strange dent near zero.
  
 \\ \\
Line 164: Line 164:
  
 \\ \\
- 
  • pipeline/utilities/sxpipe_moon_eliminator.txt
  • Last modified: 2019/04/02 10:42
  • by lusnig