Ejemplo n.º 1
0
def run_thermo(file_location):

    MSParameters.mass_spectrum.threshold_method = 'relative_abundance'
    MSParameters.mass_spectrum.relative_abundance_threshold = 1

    MSParameters.mass_spectrum.threshold_method = 'auto'
    MSParameters.mass_spectrum.s2n_threshold = 6

    parser = rawFileReader.ImportMassSpectraThermoMSFileReader(file_location)

    transient_time_list = parser.get_icr_transient_times()

    print(transient_time_list)

    # sums all the mass spectra
    mass_spectrum = parser.get_average_mass_spectrum_in_scan_range()

    # sums scans in selected range
    mass_spectrum = parser.get_average_mass_spectrum_in_scan_range(
        first_scan=1, last_scan=5)

    scans_list = [1, 4, 6, 9]
    # sums scans in selected range
    mass_spectrum = parser.get_average_mass_spectrum_by_scanlist(scans_list)

    return mass_spectrum
Ejemplo n.º 2
0
def run_thermo_reduce_profile(file_location, corems_params_path, first_scan,
                              last_scan):

    from corems.mass_spectra.input import rawFileReader
    parser = rawFileReader.ImportMassSpectraThermoMSFileReader(file_location)

    mass_spectrum = parser.get_average_mass_spectrum_in_scan_range(
        first_scan=1, last_scan=5)
    return mass_spectrum
Ejemplo n.º 3
0
def run_thermo(file_location):

    MSParameters.mass_spectrum.threshold_method = 'auto'
    MSParameters.mass_spectrum.s2n_threshold = 6

    parser = rawFileReader.ImportMassSpectraThermoMSFileReader(file_location)

    # mass_spectrum = transient.get_mass_spectrum(plot_result=False, auto_process=True)

    mass_spectrum = parser.get_average_mass_spectrum_in_scan_range()

    return mass_spectrum, 3
Ejemplo n.º 4
0
def run_thermo(file_location):

    MSParameters.mass_spectrum.threshold_method = 'relative_abundance'
    MSParameters.mass_spectrum.relative_abundance_threshold = 0.1

    #MSParameters.mass_spectrum.threshold_method = 'auto'
    #MSParameters.mass_spectrum.s2n_threshold = 6

    parser = rawFileReader.ImportMassSpectraThermoMSFileReader(file_location)

    parser.chromatogram_settings.start_scan = -1
    parser.chromatogram_settings.end_scan = -1

    tic_data, ax = parser.get_tic(ms_type='MS', plot=True)

    plt.show()

    print(parser.get_all_filters())

    transient_time_list = parser.get_icr_transient_times()

    print(transient_time_list)

    # sums all the mass spectra
    mass_spectrum = parser.get_average_mass_spectrum_in_scan_range()

    # sums scans in selected range
    parser.chromatogram_settings.start_scan = 1
    parser.chromatogram_settings.end_scan = 10

    mass_spectrum = parser.get_average_mass_spectrum_in_scan_range()

    scans_list = [1]
    # sums scans in selected range
    mass_spectrum = parser.get_average_mass_spectrum_by_scanlist(scans_list)

    return mass_spectrum
Ejemplo n.º 5
0
from corems.molecular_id.search.priorityAssignment import OxygenPriorityAssignment
from corems.molecular_id.search.molecularFormulaSearch import SearchMolecularFormulas
from corems.encapsulation.factory.parameters import MSParameters

#set file here
file_location = "tests/tests_data/icpms/rmb_161221_kansas_h2o_2"

#Set peak detection threshold method
MSParameters.mass_spectrum.threshold_method = 'relative_abundance'
MSParameters.mass_spectrum.relative_abundance_threshold = 1

MSParameters.mass_spectrum.threshold_method = 'auto'
MSParameters.mass_spectrum.s2n_threshold = 10

#Parser for thermo RAW files.
parser = rawFileReader.ImportMassSpectraThermoMSFileReader(file_location)

t_ion_chromatogram = parser.get_tic()

t_ion_subset = t_ion_chromatogram[(t_ion_chromatogram["Time"] > 8)
                                  & (t_ion_chromatogram["Time"] < 9)]

#print(t_ion_chromatogram['Time'])
#print(parser.start_scan)
#print(parser.end_scan)


#Function for obtaining extracted ion chromatogram
def get_EIC(parser, mass, dmz, scanrange):

    EIC = np.zeros((len(scanrange), 3))  ## scan, time, eic