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

datasets

parent 8bf3898b
No related branches found
No related tags found
No related merge requests found
......@@ -104,6 +104,15 @@ def intensity_coverage(int_expe,int_theo):
coverage = np.sum(np.where(int_theo>0,int_expe,0))/np.sum(int_expe)
return coverage
def window_and_filter(df, RT_min, RT_max, MS1_mz_min, MS2_mz_max, threshold):
df_filtered = df[df['MSlevel'] == 2]
df_filtered = df_filtered[MS1_mz_min < df['MS1_mz_max']]
df_filtered = df_filtered[MS2_mz_max > df['MS1_mz_min']]
df_filtered = df_filtered[RT_min < df['RT']]
df_filtered = df_filtered[RT_max > df['RT']]
df_filtered = df_filtered[df_filtered['inty']>threshold]
return df_filtered
if __name__ == "__main__":
e = oms.MSExperiment()
oms.MzMLFile().load("data/echantillons données DIA/CITAMA-5-AER-d200.mzML", e)
......
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