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

Avoid heatmap config default causing error #63

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ umap:
heatmap:
metrics: ['correlation','cosine']
hclust_methods: ['complete']
n_observations: 1000 # random sampled proportion float (0-1] or absolute number as integer
n_observations: 1 # random sampled proportion float (0-1] or absolute number as integer
n_features: 0.5 # highly variable features proportion float (0-1] or absolute number as integer

##### LEIDEN #####
Expand Down
3 changes: 2 additions & 1 deletion workflow/scripts/distance_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
if data_or_feature == "observations":
if isinstance(n_observations, float) or n_observations==1:
n_observations = int(math.floor(n_observations * data.shape[0]))
data = data.sample(n=n_observations, random_state=42)
if n_observations < data.shape[0]:
data = data.sample(n=n_observations, random_state=42)

# Convert DataFrame to NumPy array
# data_np = data.to_numpy()
Expand Down