def test_andi_netcdf_gcms(): file_path = Path.cwd() / "tests/tests_data/gcms/" / "GCMS_FAMES_01_GCMS-01_20191023.cdf" reader_gcms = ReadAndiNetCDF(file_path) reader_gcms.run()
def get_gcms(file_path): reader_gcms = ReadAndiNetCDF(file_path) reader_gcms.run() gcms = reader_gcms.get_gcms_obj() #gcms.process_chromatogram() return gcms
def stand_alone(): file_path = get_filename() reader_gcms = ReadAndiNetCDF(file_path) reader_gcms.run() gcms = reader_gcms.get_gcms_obj() gcms.process_chromatogram()
def get_gcms(file_path, corems_params): reader_gcms = ReadAndiNetCDF(file_path) reader_gcms.run() gcms = reader_gcms.get_gcms_obj() parameter_from_json.load_and_set_parameters_gcms( gcms, parameters_path=corems_params) gcms.process_chromatogram() return gcms
def run_targetedLF(file_path, ref_file): Loss_finder = LossFinderTargeted() reader_gcms = ReadAndiNetCDF(file_path) reader_gcms.run() gcms = reader_gcms.get_gcms_obj() gc_ms = gcms._ms Loss_finder.noise_cutoff = float(0.85) Loss_finder.tolerance = float(1) Loss_finder.ref_file = ref_file mz_dict, abund = Loss_finder.ms_info_get(gc_ms) range_ref = Loss_finder.loss_ref_get(ref_file, Loss_finder.tolerance) mz_filtered, abund_filtered = Loss_finder.threshold_filter( mz_dict, abund, Loss_finder.noise_cutoff) offset_hits = Loss_finder.findpeakoffset(range_ref, mz_filtered, abund_filtered) #Loss_finder.LF_out(offset_hits, Loss_finder.mz_count) out = Loss_finder.plot_offset() print(out) #ax = gcms.plot_gc_peaks() #ax.savefig('lf_fig.png') #ax = MassSpecBase.plot_mz_domain_profile(MassSpecBase) #plt.show() #MassSpecBase.plot_mz_domain_profile(gcms) #MassSpecBase.plot_profile_and_noise_threshold(gcms) #plt.show() return offset_hits, Loss_finder.mz_count
def run_targetedLF(file_path, ref_file): Loss_finder = LossFinderTargeted() reader_gcms = ReadAndiNetCDF(file_path) reader_gcms.run() gcms = reader_gcms.get_gcms_obj() gc_ms = gcms._ms Loss_finder.noise_cutoff = float(0.85) Loss_finder.tolerance = float(2) Loss_finder.ref_file = ref_file mz_dict, abund = Loss_finder.ms_info_get(gc_ms) range_ref = Loss_finder.loss_ref_get(ref_file, Loss_finder.tolerance) mz_filtered, abund_filtered = Loss_finder.threshold_filter(mz_dict, abund, Loss_finder.noise_cutoff) offset_hits = Loss_finder.findpeakoffset(range_ref, mz_filtered, abund_filtered) return offset_hits, Loss_finder.mz_count