Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtsemiY committed Oct 25, 2023
2 parents 3f2abcb + 4171433 commit 7e1b6d8
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 21 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

![TomoBEAR Social Media Logo Image](images/TomoBEAR_gitlogo.png)

Implementation details and benchmarks you can find in our preprint:
</br> Balyschew N, Yushkevich A, Mikirtumov V, Sanchez RM, Sprink T, Kudryashev M. Streamlined Structure Determination by Cryo-Electron Tomography and Subtomogram Averaging using TomoBEAR. **[Preprint]** 2023. bioRxiv doi: [10.1101/2023.01.10.523437](https://www.biorxiv.org/content/10.1101/2023.01.10.523437v1)
Implementation details and benchmarks you can find in our publication:
</br> Balyschew N, Yushkevich A, Mikirtumov V, Sanchez RM, Sprink T, Kudryashev M. Streamlined Structure Determination by Cryo-Electron Tomography and Subtomogram Averaging using TomoBEAR. *Nat Commun* **14**, 6543 (2023). doi: [10.1038/s41467-023-42085-w](https://www.nature.com/articles/s41467-023-42085-w)

> **Warning**
> <br/> This software is currently in pre-release state. New features may still appear and refactoring may still take place between all the current and future 0.x.y versions until 1.0.0 will be ready to be released.
> <br/> This software is currently in pre-release state. New features may still appear and refactoring may still take place between all the current and future 0.x.y versions until 1.0.0 will be ready to be released. Binaries are not currently shipped.
## Contents

Expand All @@ -36,7 +36,7 @@ We have prepared a range of short (8-12 min) video-tutorials explaining setup, u

In the following picture you can see a flow chart of the main `TomoBEAR` processing steps. As the basic input data you can use raw frame movies or already assembled tilt stacks. More on input formats you [can read here](https://github.com/KudryashevLab/TomoBEAR/wiki/Usage.md#input-data-file-formats).

![Schematic Pipeline Image](images/pipeline_simplified.png)
![Schematic Pipeline Image](images/pipeline_upd.png)

Blue boxes outline the steps that are performed fully automatically, green boxes may require human intervention. The steps encapsulated in the red frame represent the functionality of live data processing. More detailed diagram [is located on wiki](https://github.com/KudryashevLab/TomoBEAR/wiki).

Expand Down
Binary file added images/pipeline_upd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions modules/AreTomo.m
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
if obj.configuration.correct_pretilt_flag ~= -1
tilt_axis_offset_command_snippet = " -TiltCor " + num2str(obj.configuration.correct_pretilt_flag);
pretilt_angle_to_use = -obj.configuration.pretilt_tilt_axis;
if pretilt_angle_to_use == 0
if pretilt_angle_to_use ~= 0
tilt_axis_offset_command_snippet = tilt_axis_offset_command_snippet + " " + num2str(pretilt_angle_to_use);
end
else
Expand Down Expand Up @@ -125,7 +125,7 @@
+ ") is lower than required input_stack_binning (=" + num2str(obj.configuration.input_stack_binning) + ") !");
end

stack_source = string(tilt_stacks(obj.configuration.set_up.adjusted_j).folder) + string(filesep) + string(tilt_stacks(obj.configuration.set_up.adjusted_j).name);
stack_source = string(tilt_stacks(obj.configuration.set_up.j).folder) + string(filesep) + string(tilt_stacks(obj.configuration.set_up.j).name);

% Generate aligned stack of the requested binning level
stack_destination = obj.output_path + filesep + obj.name + ".ali";
Expand Down Expand Up @@ -194,7 +194,7 @@
% Generate aligned unbinned stack using alignment parameters
% previously detected at the requested binning level
tilt_stacks = getTiltStacksFromStandardFolder(obj.configuration, true);
stack_source = string(tilt_stacks(obj.configuration.set_up.adjusted_j).folder) + string(filesep) + string(tilt_stacks(obj.configuration.set_up.adjusted_j).name);
stack_source = string(tilt_stacks(obj.configuration.set_up.j).folder) + string(filesep) + string(tilt_stacks(obj.configuration.set_up.j).name);
stack_destination_unbinned = obj.output_path + filesep + obj.name + "_bin_" + num2str(1) + ".ali";

if obj.configuration.use_previous_alignment == false
Expand Down
20 changes: 14 additions & 6 deletions modules/BinStacks.m
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,15 @@
if obj.configuration.run_ctf_phaseflip == true
tlt_file = getFilePathsFromLastBatchruntomoRun(obj.configuration, "rawtlt");
defocus_file = getFilePathsFromLastBatchruntomoRun(obj.configuration, "defocus");
splitted_tilt_stack_path_name = strsplit(stack_output_path, ".");
ctf_corrected_stack_destination = splitted_tilt_stack_path_name(1)...

[stack_filepath, stack_filename, stack_ext] = fileparts(stack_output_path);
%splitted_tilt_stack_path_name = strsplit(stack_output_path, ".");
%ctf_corrected_stack_destination = splitted_tilt_stack_path_name(1)...
% + "_" + obj.configuration.ctf_corrected_stack_suffix...
% + "." + splitted_tilt_stack_path_name(2);
ctf_corrected_stack_destination = stack_filepath + filesep + stack_filename...
+ "_" + obj.configuration.ctf_corrected_stack_suffix...
+ "." + splitted_tilt_stack_path_name(2);
+ stack_ext;

command = "ctfphaseflip -input " + stack_output_path...
+ " -output " + ctf_corrected_stack_destination...
Expand All @@ -263,9 +268,12 @@
+ " -cs " + obj.configuration.spherical_aberation...
+ " -ampContrast " + obj.configuration.ampContrast;

if obj.configuration.use_aligned_stack == false
command = command + " -xform " + xf_file_destination;
end
% NOTE: if stack is aligned, no need to transform
% NOTE: if stack is non-aligned, no need to
% transform since it was not requested
%if obj.configuration.use_aligned_stack == false
% command = command + " -xform " + xf_file_destination;
%end

if obj.configuration.set_up.gpu > 0 && versionGreaterThan(obj.configuration.environment_properties.imod_version, "4.10.9")
command = command + " -gpu " + obj.configuration.set_up.gpu;
Expand Down
15 changes: 7 additions & 8 deletions modules/Reconstruct.m
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,14 @@
tlt_out = fopen(tlt_out_name, "w");

if obj.configuration.correct_angles == "center"
tlt_in = fopen(tlt_file{1}, "r");

tlt_out_name = obj.output_path + string(filesep) + name + ".tlt";
tlt_out = fopen(tlt_out_name, "w");

high_tilt = fgetl(tlt_in);
high_tilt = str2double(fgetl(tlt_in));
% TODO:DIRTY -> code clean
low_tilt = high_tilt;
while ~feof(tlt_in)
low_tilt = fgetl(tlt_in);
low_tilt_new = str2double(fgetl(tlt_in));
if ~isnan(low_tilt_new)
low_tilt = low_tilt_new;
end
end
fclose(tlt_in);

Expand All @@ -321,7 +320,7 @@
tlt_in = fopen(tlt_file{1}, "r");
while ~feof(tlt_in)
% TODO: needs to be tested
tilt_adjusted = num2str(fgetl(tlt_in)) + shift;
tilt_adjusted = str2double(fgetl(tlt_in)) + shift;
fprintf(tlt_out, "%.2f\n", tilt_adjusted);
end
elseif obj.configuration.correct_angles == "subtract"
Expand Down

0 comments on commit 7e1b6d8

Please sign in to comment.