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

Hotfix: Direct CellRanger output to the intended directory (TenX module) #2

Merged
merged 3 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading