Ejemplo n.º 1
0
    def parameters_json(self):

        from corems.mass_spectrum.output.export import HighResMassSpecExport
        exportMS = HighResMassSpecExport(self.filename, self)
        return exportMS.parameters_to_json()
Ejemplo n.º 2
0
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')
Ejemplo n.º 3
0
    def to_json(self):
        # returns pandas dataframe

        from corems.mass_spectrum.output.export import HighResMassSpecExport
        exportMS = HighResMassSpecExport(self.filename, self)
        return exportMS.to_json()
Ejemplo n.º 4
0
 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()
Ejemplo n.º 5
0
 def to_csv(self, out_file_path):
     from corems.mass_spectrum.output.export import HighResMassSpecExport
     exportMS = HighResMassSpecExport(out_file_path, self)
     exportMS.to_csv()
Ejemplo n.º 6
0
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()
Ejemplo n.º 7
0
 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)