Skip to content
Snippets Groups Projects
Commit d1065e74 authored by fadwael.khaddar_ird.fr's avatar fadwael.khaddar_ird.fr
Browse files

Upload New File

parent 2768d367
No related branches found
No related tags found
No related merge requests found
import pandas as pd
import numpy as np
from scipy.stats import spearmanr
import seaborn as sns
import matplotlib.pyplot as plt
# Charger les fichiers de données dans des DataFrames pandas
df1 = pd.read_csv("C:\\Users\\SCD UM\\Desktop\\methylation_frequency\\Intersection\\Correlation_without_BS_seq\\MET1_DSP_commun_without_bs_seq.bed", sep='\t', names=["chromosome", "start", "frequency"])
df2 = pd.read_csv("C:\\Users\\SCD UM\\Desktop\\methylation_frequency\\Intersection\\Correlation_without_BS_seq\\MET1_Megalodon_commun_without_bs_seq.bed", sep='\t', names=["chromosome", "start", "frequency"])
df3 = pd.read_csv("C:\\Users\\SCD UM\\Desktop\\methylation_frequency\\Intersection\\Correlation_without_BS_seq\\MET1_Tombo_commun_without_bs_seq.bed", sep='\t', names=["chromosome", "start","frequency"])
data1 = df1["frequency"]
data2 = df2["frequency"]
data3 = df3["frequency"]
# Calculer la corrélation entre les fichiers
corr_matrix = pd.concat([data1, data2, data3], axis=1, keys=["DeepSignalPlant", "Megalodon", "Tombo"]).corr()
# Créer une figure
plt.figure(figsize=(8, 6))
# Générer la heatmap de la matrice de corrélation
sns.heatmap(corr_matrix, annot=True, cmap="coolwarm")
# Définir le titre du graphique
plt.title("Matrice de corrélation")
# Afficher le graphique
plt.show()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment