def parameters_json(self): from corems.mass_spectrum.output.export import HighResMassSpecExport exportMS = HighResMassSpecExport(self.filename, self) return exportMS.parameters_to_json()
def test_export_mass_spectrum(): mass_spectrum = import_corems_mass_list() exportMS = HighResMassSpecExport('NEG_ESI_SRFA_CoreMS', mass_spectrum) # exportMS.to_pandas() # exportMS.to_excel() # exportMS.to_csv() # exportMS.to_hdf() exportMS._output_type = 'excel' exportMS.save() exportMS._output_type = 'csv' exportMS.save() exportMS._output_type = 'pandas' exportMS.save() exportMS._output_type = 'hdf5' exportMS.save() exportMS.get_pandas_df() exportMS.to_json() mass_spectrum.to_excel('NEG_ESI_SRFA_CoreMS') mass_spectrum.to_dataframe() mass_spectrum.molecular_search_settings.output_score_method = "prob_score" mass_spectrum.to_csv('NEG_ESI_SRFA_CoreMS_prob_score') mass_spectrum.to_json() mass_spectrum.to_pandas('NEG_ESI_SRFA_CoreMS')
def to_json(self): # returns pandas dataframe from corems.mass_spectrum.output.export import HighResMassSpecExport exportMS = HighResMassSpecExport(self.filename, self) return exportMS.to_json()
def to_pandas(self, out_file_path): # pickle dataframe (pkl extension) from corems.mass_spectrum.output.export import HighResMassSpecExport exportMS = HighResMassSpecExport(out_file_path, self) exportMS.to_pandas()
def to_csv(self, out_file_path): from corems.mass_spectrum.output.export import HighResMassSpecExport exportMS = HighResMassSpecExport(out_file_path, self) exportMS.to_csv()
def test_export_mass_spectrum(): mass_spectrum = import_corems_mass_list() exportMS = HighResMassSpecExport('NEG_ESI_SRFA_CoreMS', mass_spectrum) #exportMS.to_pandas() #exportMS.to_excel() #exportMS.to_csv() #exportMS.to_hdf() exportMS._output_type = 'excel' exportMS.save() exportMS._output_type = 'csv' exportMS.save() exportMS._output_type = 'pandas' exportMS.save() exportMS._output_type = 'hdf5' exportMS.save() exportMS.get_pandas_df() exportMS.to_json() mass_spectrum.to_excel('NEG_ESI_SRFA_CoreMS') mass_spectrum.to_dataframe() mass_spectrum.to_csv('NEG_ESI_SRFA_CoreMS') mass_spectrum.to_json() mass_spectrum.to_pandas('NEG_ESI_SRFA_CoreMS') print()
def to_csv(self, out_file_path, write_metadata=True): from corems.mass_spectrum.output.export import HighResMassSpecExport exportMS = HighResMassSpecExport(out_file_path, self) exportMS.to_csv(write_metadata=write_metadata)