Mercurial > repos > iracooke > proteomics_datatypes
comparison proteomics.py @ 9:349af9298ff1 draft default tip
planemo upload for repository https://github.com/iracooke/proteomics-datatypes commit a71820c91d9d7629415a27526bbf700800d12f3f
| author | iracooke |
|---|---|
| date | Wed, 03 Jun 2015 18:24:37 -0400 |
| parents | 6ab4a0bf67df |
| children |
comparison
equal
deleted
inserted
replaced
| 8:6ab4a0bf67df | 9:349af9298ff1 |
|---|---|
| 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 class SPLibNoIndex( Text ): | |
| 289 """SPlib without index file """ | |
| 290 file_ext = "splib" | |
| 291 | |
| 292 def set_peek( self, dataset, is_multi_byte=False ): | |
| 293 """Set the peek and blurb text""" | |
| 294 if not dataset.dataset.purged: | |
| 295 dataset.peek = data.get_file_peek( dataset.file_name, is_multi_byte=is_multi_byte ) | |
| 296 dataset.blurb = 'Spectral Library without index files' | |
| 297 else: | |
| 298 dataset.peek = 'file does not exist' | |
| 299 dataset.blurb = 'file purged from disk' | |
| 287 | 300 |
| 288 | 301 |
| 289 class SPLib( Msp ): | 302 class SPLib( Msp ): |
| 290 """SpectraST Spectral Library. Closely related to msp format""" | 303 """SpectraST Spectral Library. Closely related to msp format""" |
| 291 file_ext = "splib" | 304 file_ext = "splib" |
| 376 """ Annotated Spectra in the HLF format http://www.thegpm.org/HUNTER/format_2006_09_15.html """ | 389 """ Annotated Spectra in the HLF format http://www.thegpm.org/HUNTER/format_2006_09_15.html """ |
| 377 file_ext = "hlf" | 390 file_ext = "hlf" |
| 378 | 391 |
| 379 if hasattr(Binary, 'register_unsniffable_binary_ext'): | 392 if hasattr(Binary, 'register_unsniffable_binary_ext'): |
| 380 Binary.register_unsniffable_binary_ext('hlf') | 393 Binary.register_unsniffable_binary_ext('hlf') |
| 394 | |
| 395 | |
| 396 class Sf3(Binary): | |
| 397 """Class describing a Scaffold SF3 files""" | |
| 398 file_ext = "sf3" | |
| 399 | |
| 400 if hasattr(Binary, 'register_unsniffable_binary_ext'): | |
| 401 Binary.register_unsniffable_binary_ext('sf3') | |
| 402 | |
| 403 |
