Hello
I need some help regarding how to perform clustering on gene expression data using Pam algorithm in R.
I have some treated and some control/untreated samples(RNAseq data) and I want to do clustering so that the genes with similar expression pattern are in one cluster using the PAM algorithm and then plot their increasing or decreasing patterns in different treatments.
I looked up for its implementation and did it too but some of up regulated and down regulated genes are in one cluster which is making me confuse .
I would really appreciate any help regarding this .
Following is the code that am using
I am using the normalized expression data of RNAseq , which is in "df" , I am scaling the data and then sending it the PAM function
scale(df)
pam.res <- pam(df, 4)
fviz_cluster(pam.res)
and also from this result how can I get the expression pattern plot for the clusters. Is there anything that I could be improved or need to be changed ?