Skip to content
Snippets Groups Projects
Commit 5f801394 authored by Schneider Leo's avatar Schneider Leo
Browse files

fix

parent c819fbdb
No related branches found
No related tags found
No related merge requests found
......@@ -95,7 +95,7 @@ def predict(data_pred, model, output_path):
if __name__ =='__main__':
df = load_lib('spectral_lib/first_lib.parquet')
# df = load_lib('spectral_lib/first_lib.parquet')
# plt.hist(df['RT'])
# plt.savefig('test.png')
......
......@@ -3,7 +3,7 @@ import pandas as pd
from matplotlib_venn import venn2
import matplotlib.pyplot as plt
def compare_id(path_1,path_2):
def compare_id(path_1,path_2,sample_name):
df_1 = pd.read_csv(path_1, sep='\t', encoding='latin-1')
df_2 = pd.read_csv(path_2, sep='\t', encoding='latin-1')
peptides_1 = set(df_1['Stripped.Sequence'].tolist())
......@@ -11,7 +11,13 @@ def compare_id(path_1,path_2):
peptides_2 = set(df_2['Stripped.Sequence'].tolist())
protein_2 = set(df_2['Protein.Ids'].tolist())
venn2((peptides_1, peptides_2), ('custom lib', 'base lib')) # venn2 works for two sets
plt.savefig('venn_diag.png')
venn2((peptides_1, peptides_2), ('custom lib', 'base lib'), set_colors=('g','r')) # venn2 works for two sets
plt.title('Peptide identifications on {} sample'.format(sample_name))
plt.savefig('venn_diag_pep_{}.png'.format(sample_name))
compare_id('CITFRE_ANA_69/report_custom.tsv','CITFRE_ANA_69/report_first_lib.tsv')
plt.clf()
venn2((protein_1, protein_2), ('custom lib', 'base lib'), set_colors=('g','r')) # venn2 works for two sets
plt.title('Protein identifications on {} sample'.format(sample_name))
plt.savefig('venn_diag_prot_{}.png'.format(sample_name))
compare_id('CITFRE_ANA_69/report_custom.tsv','CITFRE_ANA_69/report_first_lib.tsv',sample_name='CITFRE_ANA_69')
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