Entering edit mode
2.6 years ago
pragatigga97
•
0
I have two datasets of Metagenome with different number of rows and columns (dataset1=rows148, col35), (dataset2=rows90, col22). I want to find correlation between their rows. so I have applied these codes and got correlation value and p value, but I am not able to generate Heatmap or any correlation plot by this code. kindly help me out.
for feature in dataset_1.index.tolist():
#print(feature)
if feature in dataset_2.index.tolist():
random.seed(23)
reg,P_val=pearsonr(random.sample(dataset_1.T[feature].tolist(),22), random.sample(dataset_2.T[feature].tolist(),22))
#print(feature,reg,P_val)
if reg >= 0.4 or reg <=-0.4:
print(reg)