From be4db5a240b0536579e0490d4cf4553d5e9b5b61 Mon Sep 17 00:00:00 2001 From: glrs <5999366+glrs@users.noreply.github.com> Date: Fri, 11 Oct 2024 14:56:38 +0200 Subject: [PATCH 1/3] Change the Slurm CWD to generate files in the proper location --- lib/realms/tenx/run_sample.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/realms/tenx/run_sample.py b/lib/realms/tenx/run_sample.py index 97714ca..3c28001 100644 --- a/lib/realms/tenx/run_sample.py +++ b/lib/realms/tenx/run_sample.py @@ -199,7 +199,7 @@ async def process(self): slurm_metadata = { "sample_id": self.run_sample_id, "project_name": self.project_info.get("project_name", ""), - "output_dir": str(self.file_handler.sample_dir), + "output_dir": str(self.file_handler.base_dir), "cellranger_command": cellranger_command, } @@ -258,6 +258,9 @@ def assemble_cellranger_command(self) -> str: required_args = self.pipeline_info.get("required_arguments", []) additional_args = self.pipeline_info.get("fixed_arguments", []) + # Add output directory + # additional_args.append(f'{"--output-dir"}={str(self.file_handler.sample_dir)}') + # Mapping of argument names to their values arg_values: Dict[str, Any] = { "--id": self.run_sample_id, From b5852108e28cca1eb58066c1b5f9c33a09071a89 Mon Sep 17 00:00:00 2001 From: glrs <5999366+glrs@users.noreply.github.com> Date: Fri, 11 Oct 2024 16:31:08 +0200 Subject: [PATCH 2/3] Add a #NOTE for which naming to choose for original samples without features (default: lims id) --- lib/realms/tenx/tenx_project.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/realms/tenx/tenx_project.py b/lib/realms/tenx/tenx_project.py index 8b76784..f191456 100644 --- a/lib/realms/tenx/tenx_project.py +++ b/lib/realms/tenx/tenx_project.py @@ -289,6 +289,7 @@ def identify_feature_and_original_id_old( # Handle original samples without features library_prep_option = self.project_info.get("library_prep_option", "") feature = self.get_default_feature(library_prep_option) + # NOTE: If you want to name samples with the customer name, comment out the line below original_sample_id = sample_id return feature, original_sample_id @@ -390,6 +391,7 @@ def extract_samples(self) -> List[TenXRunSample]: sample_data = self.filter_aborted_samples(sample_data) # Step 2: Create lab samples lab_samples = self.create_lab_samples(sample_data) + logging.info(f"Lab samples: {lab_samples}") # Step 3: Group lab samples by original sample ID grouped_lab_samples = self.group_lab_samples(lab_samples) # Step 4: Create run samples From ba30e80e115a3a301f7426c1b63456e29ea23b51 Mon Sep 17 00:00:00 2001 From: glrs <5999366+glrs@users.noreply.github.com> Date: Fri, 11 Oct 2024 17:24:00 +0200 Subject: [PATCH 3/3] Add output directory as a fixed argument for cellranger --- lib/realms/tenx/run_sample.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/realms/tenx/run_sample.py b/lib/realms/tenx/run_sample.py index 3c28001..2ebdee5 100644 --- a/lib/realms/tenx/run_sample.py +++ b/lib/realms/tenx/run_sample.py @@ -258,8 +258,8 @@ def assemble_cellranger_command(self) -> str: required_args = self.pipeline_info.get("required_arguments", []) additional_args = self.pipeline_info.get("fixed_arguments", []) - # Add output directory - # additional_args.append(f'{"--output-dir"}={str(self.file_handler.sample_dir)}') + # Add output directory argument + additional_args.append(f"--output-dir={str(self.file_handler.sample_dir)}") # Mapping of argument names to their values arg_values: Dict[str, Any] = {