Skip to content

Commit

Permalink
Fix doublet removal problem that occurs when only one method is active
Browse files Browse the repository at this point in the history
  • Loading branch information
nictru committed Jun 15, 2024
1 parent 6b6c524 commit c192cbf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion modules/local/doublet_detection/doublet_removal/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ process DOUBLET_REMOVAL {

output:
tuple val(meta), path("*.h5ad"), emit: h5ad
path("*_mqc.json") , emit: multiqc_files
path("*_mqc.json") , emit: multiqc_files, optional: true
path "versions.yml" , emit: versions

when:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,24 @@ def load(path: str) -> pd.DataFrame:
adata = adata[mask, :]
adata.write_h5ad(f"{prefix}.h5ad")

# Versions

versions = {
"${task.process}": {
"python": platform.python_version(),
"anndata": ad.__version__,
"pandas": pd.__version__,
"matplotlib": matplotlib.__version__,
"upsetplot": upsetplot.__version__,
}
}

with open("versions.yml", "w") as f:
f.write(format_yaml_like(versions))

if not len(predictions.columns) > 1:
exit(0)

# Plot

contents = {column: predictions[column][predictions[column]].index.tolist()
Expand Down Expand Up @@ -77,19 +95,3 @@ def load(path: str) -> pd.DataFrame:
}

json.dump(custom_json, f_json)


# Versions

versions = {
"${task.process}": {
"python": platform.python_version(),
"anndata": ad.__version__,
"pandas": pd.__version__,
"matplotlib": matplotlib.__version__,
"upsetplot": upsetplot.__version__,
}
}

with open("versions.yml", "w") as f:
f.write(format_yaml_like(versions))

0 comments on commit c192cbf

Please sign in to comment.