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

issue with "ord <- hclust(dist(t(p$pan_matrix[, names(hload) ])))$order" #66

Open
sushanta26 opened this issue Sep 19, 2024 · 0 comments

Comments

@sushanta26
Copy link

Hi Thank you for this awesome R program

I am facing problem at Plotting heatmap associated with a tree, I am following example r script Cfetus_pangenome_example.R in my data set , input file was designed as given example dataset.

ord <- hclust(dist(t(p$pan_matrix[, names(hload) ])))$order

Error in hclust(dist(t(p$pan_matrix[, names(hload)]))) :
must have n >= 2 objects to cluster

I am not sure where I am making mistake , previous command were running perfect this step showing error

running this "print(p$pan_matrix[, names(hload)]) " to check data structure has given me following output
Staphylococcus_capitis_C87
2
Staphylococcus_capitis_CCM_2734
4
Staphylococcus_capitis_CR01
3
Staphylococcus_capitis_CR01_strain_DE0445
0
Staphylococcus_capitis_CR02
0
Staphylococcus_capitis_CR03
3
Staphylococcus_capitis_CR04
2
Staphylococcus_capitis_CR05
1
Staphylococcus_capitis_CR09
1
Staphylococcus_capitis_QN1
1
Staphylococcus_capitis_SC32
0
Staphylococcus_capitis_SC35
0
Staphylococcus_capitis_SK14
1
Staphylococcus_capitis_TW2795

Need your help to understand where I am making mistake.

Thank you
Sushanta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant