How to generate one Heatmap under the loop
0
0
Entering edit mode
2.1 years ago

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)
Pearson Scipy Python Correlation Heatmap • 338 views
ADD COMMENT

Login before adding your answer.

Traffic: 1103 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6