Exemplo n.º 1
0
def test_priorityAssignment():
    
    MSParameters.molecular_search.error_method = 'None'
    MSParameters.molecular_search.min_ppm_error  = -3
    MSParameters.molecular_search.max_ppm_error = 5
    MSParameters.molecular_search.mz_error_range = 1
    MSParameters.molecular_search.isProtonated = True 
    MSParameters.molecular_search.isRadical= True 
    MSParameters.molecular_search.isAdduct= False 
    usedatoms = {'C': (1,100) , 'H': (4,200), 'O': (1,10)}
    MSParameters.molecular_search.usedAtoms = usedatoms
    
    mass_spec_obj = create_mass_spectrum()
    mass_spec_obj.process_mass_spec()

    assignOx = OxygenPriorityAssignment(mass_spec_obj) 

    assignOx.run() 

    #test classification 
    mass_spec_obj.percentile_assigned()

    mass_spectrum_by_classes = HeteroatomsClassification(mass_spec_obj)

    mass_spectrum_by_classes.plot_ms_assigned_unassigned()
    
    mass_spectrum_by_classes.atoms_ratio_all("H", "C")

    mass_spectrum_by_classes.atoms_ratio_all("H", "C")
Exemplo n.º 2
0
def assign_mf_ox(mass_spectrum_obj):

    MSParameters.molecular_search.usedAtoms['O'] = (1, 10)
    MSParameters.molecular_search.usedAtoms['N'] = (0, 0)
    MSParameters.molecular_search.usedAtoms['S'] = (0, 0)
    MSParameters.molecular_search.usedAtoms['Cl'] = (0, 0)
    MSParameters.molecular_search.usedAtoms['P'] = (0, 0)

    MSParameters.molecular_search.isProtonated = True
    MSParameters.molecular_search.isRadical = True
    MSParameters.molecular_search.isAdduct = True

    assignOx = OxygenPriorityAssignment(mass_spectrum_obj)
    assignOx.create_data_base()

    filter_by_kendrick()

    filter_by_resolving_power()

    assignOx.run()