Skip to content

Commit

Permalink
Merge pull request #2 from glrs/main
Browse files Browse the repository at this point in the history
Hotfix: Direct CellRanger output to the intended directory (TenX module)
  • Loading branch information
glrs authored Oct 14, 2024
2 parents 10a162f + ba30e80 commit 68aa774
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/realms/tenx/run_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down Expand Up @@ -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 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] = {
"--id": self.run_sample_id,
Expand Down
2 changes: 2 additions & 0 deletions lib/realms/tenx/tenx_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 68aa774

Please sign in to comment.