comparison rankfilter_GCMS/rankfilter.py @ 16:fe4682eb938c

small improvement
author pieter.lukasse@wur.nl
date Mon, 23 Mar 2015 08:40:42 +0100
parents 346ff9ad8c7a
children
comparison
equal deleted inserted replaced
15:05ff1c55db84 16:fe4682eb938c
140 hit_match_ripred = [] 140 hit_match_ripred = []
141 hit_match_syn = [] 141 hit_match_syn = []
142 # Convert 'Name' data to list in order to be indexed 142 # Convert 'Name' data to list in order to be indexed
143 # library_data['Name']=list(library_data['Name']) 143 # library_data['Name']=list(library_data['Name'])
144 144
145 # tries to match on CAS first. If this is not possible (cas is 'undef'
146 # or not found) then tries to match on name:
145 for hit_cas, hit_name in zip(hit_list['CAS'], hit_list['Name']): 147 for hit_cas, hit_name in zip(hit_list['CAS'], hit_list['Name']):
146 index = 0 148 index = 0
147 if hit_cas != 'undef': 149 if hit_cas != 'undef':
148 try: 150 try:
149 index = library_data['CAS'].index(hit_cas.replace(' ', '').replace('-', '')) 151 index = library_data['CAS'].index(hit_cas.replace(' ', '').replace('-', ''))