Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.4.0 Previewer #92

Open
wants to merge 58 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
35d0837
Parsing tilt-series indices as str in Metadata.
MasterVexillen Mar 8, 2023
3dae85c
Moved import operations from main to mgui. Separated import MGUI from…
MasterVexillen Mar 8, 2023
6ead747
Separated acquisition metadata from image metadata.
MasterVexillen Mar 8, 2023
e384aa7
Moved motioncorr metadata operations to mgui. Separated motioncorr MG…
MasterVexillen Mar 8, 2023
51ae4f1
Removed forced 4-digit tilt-series index output from motioncorr.
MasterVexillen Mar 8, 2023
267d4e4
Modified motioncorr to run MC2 on a per-image (not per-TS) basis.
MasterVexillen Mar 8, 2023
ecd81be
Removed 'jobs per gpu' option for MC2 - job chunking now obsolete.
MasterVexillen Mar 8, 2023
303f2d0
Moved ctffind metadata operations to mgui. Separated ctffind MGUI fro…
MasterVexillen Mar 8, 2023
88a1a0b
Modified mgui_mc2 to allow for default MC2 call from set /home/wed139…
MasterVexillen Mar 9, 2023
3794d54
Revert "Modified mgui_mc2 to allow for default MC2 call from set /hom…
MasterVexillen Mar 9, 2023
03c2d63
Modified mgui_mc2 to allow for default MC2 call from set PATH.
MasterVexillen Mar 9, 2023
aa621b2
Fixed wrong exec_path input check in mgui_mc2.
MasterVexillen Mar 9, 2023
194dd83
Fixed wrong logger message tag in ctffind.
MasterVexillen Mar 9, 2023
e06b017
Modified mgui_ctffind to allow for default CTFFind call from set PATH.
MasterVexillen Mar 9, 2023
ea12e75
Moved IMOD align metadata operations to mgui. Separated IMOD align MG…
MasterVexillen Mar 9, 2023
ac32754
Removed debugging print statements from mgui_imod_align.
MasterVexillen Mar 10, 2023
278c84e
Fixed wrong argument passing in motioncorr.
MasterVexillen Mar 10, 2023
ffa9088
Moved IMOD recon metadata operations to mgui. Separated IMOD recon MG…
MasterVexillen Mar 10, 2023
a0b2396
Fixed bug in IMOD align considering ratio between raw stack and align…
MasterVexillen Mar 14, 2023
48aaf63
Fixed mismatch in IMOD recon tomogram thickness. Changed reconstructe…
MasterVexillen Mar 14, 2023
bee13a2
Moved AreTomo metadata operations to mgui. Separated AreTomo MGUI fro…
MasterVexillen Mar 29, 2023
7c8d3fb
Corrected datatype of TS number in aretomo: int->str.
MasterVexillen Mar 29, 2023
71fefc8
Fixed wrong thickness->VolZ conversion in aretomo.
MasterVexillen Mar 29, 2023
f48a1e1
Modified codebase to facilitate automatic full preprocessing through …
MasterVexillen Mar 29, 2023
c533aa1
Added o2r.previewer entry point in setup. Version number NOT changed …
MasterVexillen Mar 29, 2023
a9cedaa
Added back changes for O2R-Previewer in main API. Should have been in…
MasterVexillen Mar 29, 2023
eb9e22e
Merge branch 'dev' into 0.4.0-beam-shift
MasterVexillen Mar 29, 2023
8c3b031
Debug: comparison of literals with 'is' in savurecon.
MasterVexillen Mar 29, 2023
041ea70
Merge branch '0.4.0-beam-shift' of github.com:rosalindfranklininstitu…
MasterVexillen Mar 29, 2023
166b98b
Added back mgui_auto_aretomo module file.
MasterVexillen Mar 29, 2023
1f66f27
Changed MGUI module load in aretomo from old magicgui to mgui_aretomo.
MasterVexillen Mar 29, 2023
fe2f2be
Changed mgui_imod_align module load alias from alignMGUI to imod_news…
MasterVexillen Mar 29, 2023
f312bec
Migrated previewer from main API to its own module. Updated setup scr…
MasterVexillen Mar 29, 2023
a55e233
Fixed typo in previewer.
MasterVexillen Mar 29, 2023
9dffad9
Rename: mgui_auto_aretomo.py -> mgui_previewer.py
MasterVexillen Mar 29, 2023
4b07825
Added back aretomo_path as aretomo MGUI option.
MasterVexillen Mar 29, 2023
fa42293
Removed redundant mgui_previewer import in main (previewer modularised).
MasterVexillen Mar 29, 2023
f9d8607
Fixed typo in previewer. Added default aretomo_path in previewer.
MasterVexillen Mar 29, 2023
f51a6b4
Added previewer into default package list in __init__.
MasterVexillen Mar 29, 2023
0cbca9f
Fixed datatype for tilt-series index in aretomo.
MasterVexillen Mar 29, 2023
03657d1
black formatting
elainehoml Mar 30, 2023
f2b5791
add ot2rec-report dependency
elainehoml Mar 30, 2023
8118996
suppoer mdf 0.0.7 camel case mdoc fields
elainehoml Mar 30, 2023
d18ec1d
add ot2rec report
elainehoml Mar 30, 2023
e3e0b89
pin mdocfile version
elainehoml Mar 30, 2023
25a13a8
aln filenames correction
elainehoml Mar 30, 2023
97d6499
enable aretomo path specification
elainehoml Mar 30, 2023
edce9d3
Added xmltodict as dependency in setup script.
MasterVexillen Apr 5, 2023
2790e2d
Changed EER metadata scraping method from calling IMOD header to dire…
MasterVexillen Apr 5, 2023
16af159
DEBUG: removed breakpoint in metadata.
MasterVexillen Apr 5, 2023
be8a7a3
Added progress bar for metadata scraping in metadata.
MasterVexillen Apr 5, 2023
b132fc9
Added log messages for program initiation and metadata scraping.
MasterVexillen Apr 5, 2023
cac4323
Added plain HTML output for report in previewer.
MasterVexillen Apr 6, 2023
4db1880
Redesigned logger object definitions in logger.
MasterVexillen Apr 6, 2023
240f642
Updated logger for O2R-Previewer components up to motioncor.
MasterVexillen Apr 6, 2023
cded059
Updated logger for O2R-Previewer components up to report generation.
MasterVexillen Apr 6, 2023
563f0dc
Changed label (Lamella thickness -> Tomogram thickness) in mgui_previ…
MasterVexillen Apr 6, 2023
a0febfe
Merge pull request #93 from rosalindfranklininstitute/eer-metadata
MasterVexillen Apr 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"o2r.cleanup=Ot2Rec.main:cleanup",

"o2r.runall.imod=Ot2Rec.main:run_all_imod",
"o2r.previewer=Ot2Rec.main:run_all_aretomo",
MasterVexillen marked this conversation as resolved.
Show resolved Hide resolved
]
}
)
74 changes: 35 additions & 39 deletions src/Ot2Rec/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from beautifultable import BeautifulTable as bt

from . import user_args as uaMod
from . import magicgui as mgMod
from . import mgui_imod_align as mgMod
from . import metadata as mdMod
from . import params as prmMod
from . import logger as logMod
Expand Down Expand Up @@ -84,13 +84,14 @@ def _get_internal_metadata(self):
while self.rootname.endswith('_'):
self.rootname = self.rootname[:-1]
self.suffix = self.params['System']['output_suffix']
self.output_ext = self.params['System']['output_ext']

self._align_images = pd.DataFrame(columns=['ts', 'stack_output', 'align_output'])
for curr_ts in self.params['System']['process_list']:
subfolder_name = f'{self.rootname}_{curr_ts:04}{self.suffix}'
subfolder_name = f'{self.rootname}_{curr_ts}{self.suffix}'
_to_append = pd.DataFrame(
{'ts': [curr_ts],
'stack_output': [f'{self.basis_folder}/{subfolder_name}/{subfolder_name}.st'],
'stack_output': [f'{self.basis_folder}/{subfolder_name}/{subfolder_name}.{self.output_ext}'],
'align_output': [f'{self.basis_folder}/{subfolder_name}/{subfolder_name}_ali.mrc']
},
)
Expand Down Expand Up @@ -148,7 +149,7 @@ def _check_aligned_images(self):
STACK CREATION
"""

def create_stack_folders(self):
def create_stack_folders(self, single_folder=False):
"""
Method to create folders for storing stacked images.
These folders will be used for alignment and reconstruction as well.
Expand All @@ -166,10 +167,17 @@ def create_stack_folders(self):

# Create the folders and dictionary for future reference
self._path_dict = {}
for curr_ts in self._process_list:
subfolder_path = f'{self.basis_folder}/{self.rootname}_{curr_ts:04}{self.suffix}'
if single_folder:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that if you are processing images which are in a single folder (without the tilt series named subfolders), the processed data will live in a single folder as well rather than be organised into individual tilt series? We would have to account for this in the downstream plugins as well (maybe you have and I haven't gotten to that part yet...)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but only if so wished by the user. I've never had problems with this one as by default they are still organised into subfolders.

subfolder_path = f'{self.basis_folder}'
os.makedirs(subfolder_path, exist_ok=True)
self._path_dict[curr_ts] = subfolder_path
for curr_ts in self._process_list:
self._path_dict[curr_ts] = subfolder_path
else:
for curr_ts in self._process_list:
subfolder_path = f'{self.basis_folder}/{self.rootname}_{curr_ts}{self.suffix}'
os.makedirs(subfolder_path, exist_ok=True)
self._path_dict[curr_ts] = subfolder_path


def _sort_tilt_angles(self,
curr_ts: int
Expand Down Expand Up @@ -201,11 +209,10 @@ def create_rawtlt(self):
(Note: Rather than grabbing info from file names as done in OTTERec,
we use information directly from input metadata
"""

for curr_ts in self._process_list:
# Define path where the new rawtlt file should go
rawtlt_file = (f"{self._path_dict[curr_ts]}/{self.params['System']['output_rootname']}_"
f"{curr_ts:04}{self.params['System']['output_suffix']}.rawtlt")
f"{curr_ts}{self.params['System']['output_suffix']}.rawtlt")

# Sort the filtered metadata
# Metadata is fetched in the _sort_tilt_angles method
Expand Down Expand Up @@ -239,7 +246,7 @@ def create_stack(self):
# Create template for newstack
self._filename_fileinlist = \
(f"{self._path_dict[curr_ts]}/{self.params['System']['output_rootname']}"
f"_{curr_ts:04}{self.params['System']['output_suffix']}_sources.txt")
f"_{curr_ts}{self.params['System']['output_suffix']}_sources.txt")
self._stack_template = f"{len(meta_ts)}\n" + '\n0\n'.join(meta_ts['output']) + '\n0\n'
with open(self._filename_fileinlist, 'w') as f:
f.write(self._stack_template)
Expand Down Expand Up @@ -287,8 +294,8 @@ def _get_adoc(self):

# Template for directive file
adoc_temp = """
setupset.currentStackExt = st
setupset.copyarg.stackext = st
setupset.currentStackExt = <ext>
setupset.copyarg.stackext = <ext>
setupset.copyarg.dual = 0
setupset.copyarg.userawtlt = <use_rawtlt>
setupset.copyarg.pixel = <pixel_size>
Expand All @@ -300,9 +307,9 @@ def _get_adoc(self):
runtime.Excludeviews.any.deleteOldFiles = <delete_old_files>
runtime.Preprocessing.any.removeXrays = <remove_xrays>

comparam.prenewst.newstack.BinByFactor = 1
comparam.prenewst.newstack.BinByFactor = <aligned_bin_factor>

runtime.AlignedStack.any.binByFactor = 1
runtime.AlignedStack.any.binByFactor = <aligned_bin_factor>
"""

fiducial_temp = """
Expand Down Expand Up @@ -362,19 +369,20 @@ def _get_adoc(self):
adoc_temp = adoc_temp + patchtrack_temp

convert_dict = {
'ext': self.params['System']['output_ext'],
'use_rawtlt': 1 if self.params['BatchRunTomo']['setup']['use_rawtlt'] else 0,
'pixel_size': self.params['BatchRunTomo']['setup']['pixel_size'],
'pixel_size': self.params['BatchRunTomo']['setup']['pixel_size'] * self.params['BatchRunTomo']['setup']['stack_bin_factor'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this accidentally apply binning twice, since binning is already passed to batchruntomo with <aligned_bin_factor>

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. What it corrects is the wrong pixels size being passed into IMOD. This is because I've modified the code such that you can pre-bin the unaligned stacks first then do alignment. In that case, the old module would have the unbinned pixel size for alignment which is wrong.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The aligned_bin_factor is for the post-alignment stack (i.e. _.ali.mrc), whereas the stack_bin_factor is for the pre-aligned one (i.e. .st).

'rot_angle': self.params['BatchRunTomo']['setup']['rot_angle'],
'excl_views': "" if self.params["BatchRunTomo"]["setup"]["excluded_views"] == [0] \
else f'{",".join(map(str, self.params["BatchRunTomo"]["setup"]["excluded_views"]))}',
'gold_size': self.params['BatchRunTomo']['setup']['gold_size'] if fiducial else 0,
'adoc_template': self.params['BatchRunTomo']['setup']['adoc_template'],
'stack_bin_factor': self.params['BatchRunTomo']['setup']['stack_bin_factor'],
'aligned_bin_factor': self.params['BatchRunTomo']['setup']['aligned_bin_factor'],

'delete_old_files': 1 if self.params['BatchRunTomo']['preprocessing']['delete_old_files'] else 0,
'remove_xrays': 1 if self.params['BatchRunTomo']['preprocessing']['remove_xrays'] else 0,

'ca_bin_factor': self.params['BatchRunTomo']['coarse_align']['bin_factor'],
'num_beads': self.params['BatchRunTomo']['setup']['num_beads'],

'size_of_patches': f'{",".join(map(str, self.params["BatchRunTomo"]["patch_track"]["size_of_patches"]))}',
Expand Down Expand Up @@ -419,8 +427,8 @@ def _get_brt_align_command(self,
'-CPUMachineList', f"{temp_cpu}",
'-GPUMachineList', '1',
'-DirectiveFile', './align.adoc',
'-RootName', self.params['System']['output_rootname'] + f'_{curr_ts:04}',
'-CurrentLocation', f'{self.basis_folder}/{self.rootname}_{curr_ts:04}{self.suffix}',
'-RootName', self.params['System']['output_rootname'] + f'_{curr_ts}',
'-CurrentLocation', f'{self.basis_folder}/{self.rootname}_{curr_ts}{self.suffix}',
'-StartingStep', '0',
'-EndingStep', '8',
]
Expand Down Expand Up @@ -508,19 +516,7 @@ def create_yaml(args_in=None):
"""
Subroutine to create new yaml file for IMOD newstack / alignment
"""
# Parse user inputs
if args_in is None: # default case, o2r.imod.new
logger = logMod.Logger(log_path="o2r_imod_align.log")
args = mgMod.get_args_align.show(run=True)
else: # to create stacks for aretomo
args = args_in
logger = logMod.Logger(log_path="o2r_imod_stack_creation.log")

# Create the yaml file, then automatically update it
prmMod.new_align_yaml(args)
update_yaml(args, logger)

# logger(message="IMOD alignment metadata file created.")
mgMod.get_args_align.show(run=True)


def update_yaml(args, logger):
Expand All @@ -531,8 +527,8 @@ def update_yaml(args, logger):
args (Namespace): Namespace generated with user inputs
"""
# Check if align and motioncorr yaml files exist
align_yaml_name = args.project_name.value + '_align.yaml'
mc2_yaml_name = args.project_name.value + '_mc2.yaml'
align_yaml_name = args.project_name + '_align.yaml'
mc2_yaml_name = args.project_name + '_mc2.yaml'
if not os.path.isfile(align_yaml_name):
logger(level="error",
message="IMOD alignment config file not found.")
Expand All @@ -544,13 +540,13 @@ def update_yaml(args, logger):

# Read in MC2 metadata (as Pandas dataframe)
# We only need the TS number and the tilt angle for comparisons at this stage
mc2_md_name = args.project_name.value + '_mc2_mdout.yaml'
mc2_md_name = args.project_name + '_mc2_mdout.yaml'
with open(mc2_md_name, 'r') as f:
mc2_md = pd.DataFrame(yaml.load(f, Loader=yaml.FullLoader))[['ts']]
# logger(message="MotionCor2 metadata read successfully.")

# Read in previous alignment output metadata (as Pandas dataframe) for old projects
align_md_name = args.project_name.value + '_align_mdout.yaml'
align_md_name = args.project_name + '_align_mdout.yaml'
if os.path.isfile(align_md_name):
is_old_project = True
with open(align_md_name, 'r') as f:
Expand All @@ -573,9 +569,9 @@ def update_yaml(args, logger):

# Read in ctffind yaml file, modify, and update
# read in MC2 yaml as well (some parameters depend on MC2 settings)
align_params = prmMod.read_yaml(project_name=args.project_name.value,
align_params = prmMod.read_yaml(project_name=args.project_name,
filename=align_yaml_name)
mc2_params = prmMod.read_yaml(project_name=args.project_name.value,
mc2_params = prmMod.read_yaml(project_name=args.project_name,
filename=mc2_yaml_name)

align_params.params['System']['process_list'] = unique_ts_numbers
Expand Down Expand Up @@ -669,7 +665,7 @@ def run(newstack=False, do_align=True, ext=False, args_pass=None, exclusive=True
args = parser.parse_args()
project_name = args.project_name
else:
project_name = args_in.project_name.value
project_name = args_in.project_name

# Check if prerequisite files exist
align_yaml = project_name + '_align.yaml'
Expand Down Expand Up @@ -782,7 +778,7 @@ def get_align_stats(exclusive=True, args_in=None):

# Loop through folders, find data and append to dataframe
for curr_ts in aligned_ts:
target_file_path = f"{folder_path}/{rootname}_{curr_ts:04d}{suffix}/taLocals.log"
target_file_path = f"{folder_path}/{rootname}_{curr_ts}{suffix}/taLocals.log"
if not os.path.isfile(target_file_path):
raise IOError("Error in Ot2Rec.main.get_align_stats: alignment log file (taLocals) not found.")

Expand Down
32 changes: 19 additions & 13 deletions src/Ot2Rec/aretomo.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
from . import magicgui as mgMod
MasterVexillen marked this conversation as resolved.
Show resolved Hide resolved
from . import params as prmMod
from . import user_args as uaMod
from . import mgui_imod_align as alignMGUI
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be clearer to import this as align_args or something similar



class asObject(object):
def __init__(self, dict_obj):
self.__dict__ = dict_obj


class AreTomo:
Expand Down Expand Up @@ -86,7 +92,7 @@ def _get_internal_metadata(self):
self.params['System']['process_list']))
for curr_ts in self.params['System']['process_list']:
subfolder = (f"{self.basis_folder}/"
f"{self.rootname}_{curr_ts:04d}{self.suffix}")
f"{self.rootname}_{curr_ts}{self.suffix}")
os.makedirs(subfolder, exist_ok=True)
# self._path_dict[curr_ts] = subfolder
if "aretomo_output_dir" not in list(self.md_out.keys()):
Expand All @@ -95,7 +101,7 @@ def _get_internal_metadata(self):
self.md_out["aretomo_output_dir"][curr_ts] = subfolder
self.md_out["aretomo_align_stats"][curr_ts] = (
f"{subfolder}/"
f"{self.rootname}_{curr_ts:04d}{self.suffix}.st.aln"
f"{self.rootname}_{curr_ts}{self.suffix}.st.aln"
)

if self.params["AreTomo_setup"]["out_imod"] != "N/A":
Expand Down Expand Up @@ -154,7 +160,7 @@ def _get_aretomo_recon_command(self, i):
if self.params['AreTomo_setup']['aretomo_mode'] == 1:
cmd.append('-Align')
cmd.append('0')

if self.params['AreTomo_recon']['recon_algo'] == "WBP":
# WBP
cmd.append('-Wbp')
Expand Down Expand Up @@ -220,7 +226,7 @@ def _run_aretomo(self, i):
output_mrc = self.params["AreTomo_setup"]["output_mrc"][i]
self.sta[curr_ts] = (
f'{self.basis_folder}/'
f'{self.rootname}_{curr_ts:04d}{self.suffix}/'
f'{self.rootname}_{curr_ts}{self.suffix}/'
f'{os.path.splitext(os.path.basename(output_mrc))[0]}_Imod/'
)

Expand All @@ -243,7 +249,7 @@ def export_metadata(self):
Method to export metadata as yaml
"""
# If STA files created, move to common folder
if self.params["AreTomo_setup"]["out_imod"] != "N/A":
if self.params["AreTomo_setup"]["out_imod"] != "N/A":
for ts in list(self.sta.keys()):
sta_ts_folder = (
f"{self.sta_folder}/{self.sta[ts].split(os.sep)[-2]}"
Expand Down Expand Up @@ -277,7 +283,7 @@ def _update_volz(args, aretomo_params):
in nm to automatically calculate VolZ. Currently sample_thickness \
= {args['sample_thickness']} and pixel_size = {args['pixel_size']}")
aretomo_params.params["AreTomo_recon"]["volz"] = int(
(args["sample_thickness"] * args["pixel_size"] * 0.1) + 200 # factor of 0.1 because pixel_size in A
(10 * args["sample_thickness"] // args["pixel_size"]) + 200 # factor of 0.1 because pixel_size in A
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does args["pixel_size"] account for bin factors here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because by definition VolZ is unbinned thickness in pixels

)

# Reject volz and sample thickness values which are not -1 or >0
Expand All @@ -290,7 +296,7 @@ def _update_volz(args, aretomo_params):
def _create_stacks_with_imod(args):
# Uses align to create the InMrc and AngFile in correct form
try:
args_in_align = mgMod.get_args_align
args_in_align = alignMGUI.get_args_align
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would this bring up the magicgui? in main.py you've used return_only=True into get_args

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would. However I'm not using this subroutine, but my old one directly from IMOD newstack (in align.py) instead so the GUI wouldn't come up like when you do command-line o2r.aretomo.run project 2.

args_in_align.project_name.value = args["project_name"]
args_in_align.rot_angle.value = args["rot_angle"]
args_in_align.output_folder.value = args["output_path"]
Expand Down Expand Up @@ -332,11 +338,11 @@ def _get_process_list(file_list, rootname, suffix, ext):
st_bn = os.path.basename(st)
if suffix != "":
ts_list.append(
int(st_bn.split(f"{rootname}_")[1].split(f"_{suffix}{ext}")[0])
st_bn.split(f"{rootname}_")[1].split(f"_{suffix}{ext}")[0][:-1]
)
else:
ts_list.append(
int(st_bn.split(f"{rootname}_")[1].split(ext)[0])
st_bn.split(f"{rootname}_")[1].split(ext)[0][:-1]
)
return ts_list

Expand Down Expand Up @@ -507,13 +513,13 @@ def create_yaml(input_mgNS=None):

# Parse user inputs
if input_mgNS is None:
args = mgMod.get_args_aretomo.show(run=True).asdict()
_ = mgMod.get_args_aretomo.show(run=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was args changed to _?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function has to return something but we don't care about it so rather than storing it wasting memory I've set it to _

else:
args = input_mgNS

# Create the yaml file, then automatically update it
prmMod.new_aretomo_yaml(args)
update_yaml(args)
# Create the yaml file, then automatically update it
prmMod.new_aretomo_yaml(args)
update_yaml(args)


def run():
Expand Down
Loading