Skip to content

Commit

Permalink
fix clustering selection based on configs
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichl committed Dec 15, 2023
1 parent 72464d6 commit af40fe7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ clustree:
numerical_aggregation_option: "mean" # aggregation function for numerical metadata, options: mean, median, max, min

##### cluster validation ####
# Cluster validation using inrternal cluster indices is computationally very expensive.
# Cluster validation using internal cluster indices is computationally very expensive.
# To reduce complexity and increase performance as proportion of samples can be used for the internal cluster evaluation.
sample_proportion: 1 # float 0-1, >500 samples should be included.

Expand All @@ -91,7 +91,6 @@ scatterplot2d:
size: 1
alpha: 1


# specify features of interest, which values from the data, will be highlgihted in the 2D/3D plots
# motivated by bioinformatics highlighting expression levels of marker genes (eg: ['PTPRC'])
# if not used leave empty []
Expand Down
5 changes: 2 additions & 3 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ clustree_metadata_content = []
indices_external = []
indices_internal = []

if len(config["leiden"]["metrics"])>0:
if len(config["leiden"]["metrics"])>0 and all([leiden_metric in config["umap"]["metrics"] for leiden_metric in config["leiden"]["metrics"]]):
cluster_methods.append("Leiden")

if len(config["clustification"]["method"])!="":
if len(config["clustification"]["method"])!="" and config["clustification"]["method"] in cluster_methods:
cluster_methods.append("clustification")

# Dimensionality Reduction: apply PCA, UMAP and densMAP sepcific visualization flags
Expand Down Expand Up @@ -67,7 +67,6 @@ if len(cluster_methods) > 0:
if len(config["metadata_of_interest"])>0:
clustree_content.append('custom')


ruleorder: clustification > aggregate_clustering_results

rule all:
Expand Down

0 comments on commit af40fe7

Please sign in to comment.