This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to generate one Heatmap under the loop

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

0 answers

No answers yet.

Log in to answer this question.