Previous changeset 16:e6a02a387448 (2015-05-17) Next changeset 18:d1ea609e57d4 (2015-05-20) |
Commit message:
Fix splib sniffer |
modified:
README.rst proteomics.py |
b |
diff -r e6a02a387448 -r 29c43b953c1c README.rst --- a/README.rst Sun May 17 23:33:49 2015 -0400 +++ b/README.rst Sun May 17 23:43:24 2015 -0400 |
b |
@@ -35,8 +35,8 @@ IdXML idxml False OpenMS_ TandemXML_ tandem False XTandem output RAW raw False Raw Mass Spec Data -Msp_ msp True Spectral Library -SPLib splib True Spectral Library +Msp_ msp True Spectral Library +SPLib_ splib True Spectral Library Ms2 ms2 False MS/MS Spectra XHunterAslFormat hlf False Spectral Library ================ ===================== ======= ==================================== |
b |
diff -r e6a02a387448 -r 29c43b953c1c proteomics.py --- a/proteomics.py Sun May 17 23:33:49 2015 -0400 +++ b/proteomics.py Sun May 17 23:43:24 2015 -0400 |
b |
@@ -300,6 +300,14 @@ dataset.blurb = 'file purged from disk' + def sniff(self, filename): + """ Determines whether the file is a SpectraST generated file. + """ + with open(filename, 'r') as contents: + return Msp.next_line_starts_with(contents, "Name:") and Msp.next_line_starts_with(contents, "LibID:") + + + class Ms2(Text): file_ext = "ms2" |