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

datasets

parent 520317da
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ import pyopenms as oms
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import scipy.signal
def compute_chromatograms(rt, mz, intensity, start_c, end_c):
......@@ -92,6 +92,13 @@ def integrate_ms_ms(df, mz_bin, output='temp.png', display = False):
plt.clf()
return mz_list,int_list
def integrated_mz_int(mz_list,int_list,mz_bin, mz_ref):
min_mz, max_mz = min(mz_ref), max(mz_ref)
res = np.zeros(int((max_mz-min_mz)//mz_bin)+1)
for i in range(len(mz_list)):
res[int((mz_list[i] - min_mz) // mz_bin)] += int_list[i]
return res
if __name__ == "__main__":
e = oms.MSExperiment()
oms.MzMLFile().load("data/echantillons données DIA/CITAMA-5-AER-d200.mzML", e)
......@@ -151,6 +158,11 @@ if __name__ == "__main__":
plt.savefig('fig/local_inte_res/spec_large_theo_1.png')
plt.clf()
int_theo_inte_peak = integrated_mz_int(masses_1, intensities_1, 0.25, mz1)
int_theo_inte_large = integrated_mz_int(masses_1, intensities_1, 0.25, mz1_large)
res_peak_1 = scipy.stats.pearsonr(int_theo_inte_peak, inty1)
res_large_1 = scipy.stats.pearsonr(int_theo_inte_large, inty1_large)
df_large_2 = df[df['MSlevel'] == 2]
df_large_2 = df_large_2[619 < df_large_2['MS1_mz_max']]
df_large_2 = df_large_2[623 > df_large_2['MS1_mz_min']]
......
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