comparison proteomics.py @ 16:e6a02a387448 draft

planemo upload commit 4f23896d1a519a87f189c6238a95b8f5b5933e9a-dirty
author iracooke
date Sun, 17 May 2015 23:33:49 -0400
parents 74dae57933ae
children 29c43b953c1c
comparison
equal deleted inserted replaced
15:de34893b3834 16:e6a02a387448
282 >>> Msp().sniff(fname) 282 >>> Msp().sniff(fname)
283 False 283 False
284 """ 284 """
285 with open(filename, 'r') as contents: 285 with open(filename, 'r') as contents:
286 return Msp.next_line_starts_with(contents, "Name:") and Msp.next_line_starts_with(contents, "MW:") 286 return Msp.next_line_starts_with(contents, "Name:") and Msp.next_line_starts_with(contents, "MW:")
287
288
289 class SPLib( Msp ):
290 """SpectraST Spectral Library. Closely related to msp format"""
291 file_ext = "splib"
292
293 def set_peek( self, dataset, is_multi_byte=False ):
294 """Set the peek and blurb text"""
295 if not dataset.dataset.purged:
296 dataset.peek = data.get_file_peek( dataset.file_name, is_multi_byte=is_multi_byte )
297 dataset.blurb = 'splib Spectral Library Format'
298 else:
299 dataset.peek = 'file does not exist'
300 dataset.blurb = 'file purged from disk'
301
287 302
288 class Ms2(Text): 303 class Ms2(Text):
289 file_ext = "ms2" 304 file_ext = "ms2"
290 305
291 def sniff(self, filename): 306 def sniff(self, filename):