Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
CSP_Rank/DockQvsCSPRank.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
34 lines (29 sloc)
1.5 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import matplotlib.pyplot as plt | |
# Load data from CSPRANK.csv | |
data = pd.read_csv('/home/tiburon/Desktop/ROT4/CSP_Rank/CSPRANK.csv') | |
# Display the first few rows of the dataframe | |
print(data.head()) | |
data['consensus_AF2-consensus'] = data['consensus_AF2'] - data['consensus_NMR'] | |
# Create a figure with two subplots | |
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 6)) | |
# Plot a scatterplot of AF2_DockQ vs consensus_AF2-consensus on the first subplot | |
ax1.scatter(data['AF2_DockQ'], data['consensus_AF2-consensus']) | |
ax1.set_xlabel('DockQ') | |
ax1.set_ylabel('Δconsensus') | |
ax1.set_title('Scatterplot of DockQ vs Δconsensus') | |
ax1.axhline(y=0, color='red', linestyle='--') | |
ax1.text(0.5, 0.9, 'AF2 > PDB', color='red', fontsize=12, fontweight='bold', transform=ax1.transAxes, ha='center') | |
ax1.text(0.5, 0.1, 'PDB > AF2', color='red', fontsize=12, fontweight='bold', transform=ax1.transAxes, ha='center') | |
# Plot a scatterplot of AF2_TM vs consensus_AF2-consensus on the second subplot | |
ax2.scatter(data['AF2_TM'], data['consensus_AF2-consensus']) | |
ax2.set_xlabel('TM') | |
ax2.set_ylabel('Δconsensus') | |
ax2.set_title('Scatterplot of TM vs Δconsensus') | |
ax2.axhline(y=0, color='red', linestyle='--') | |
ax2.text(0.5, 0.9, 'AF2 > PDB', color='red', fontsize=12, fontweight='bold', transform=ax2.transAxes, ha='center') | |
ax2.text(0.5, 0.1, 'PDB > AF2', color='red', fontsize=12, fontweight='bold', transform=ax2.transAxes, ha='center') | |
# Save the figure | |
plt.tight_layout() | |
plt.savefig('./Figures/DockQ_vs_CSPRank.png') | |
plt.show() |