# HG changeset patch # User iracooke # Date 1432100379 14400 # Node ID d1ea609e57d45cfd75ba20c6580688200970edbe # Parent 29c43b953c1c5d360bce8efabed05538f3e20fe3 Make splib a composite datatype diff -r 29c43b953c1c -r d1ea609e57d4 README.rst --- a/README.rst Sun May 17 23:43:24 2015 -0400 +++ b/README.rst Wed May 20 01:39:39 2015 -0400 @@ -36,7 +36,7 @@ TandemXML_ tandem False XTandem output RAW raw False Raw Mass Spec Data Msp_ msp True Spectral Library -SPLib_ splib True Spectral Library +SPLib_ splib True Spectral Library Ms2 ms2 False MS/MS Spectra XHunterAslFormat hlf False Spectral Library ================ ===================== ======= ==================================== diff -r 29c43b953c1c -r d1ea609e57d4 proteomics.py --- a/proteomics.py Sun May 17 23:43:24 2015 -0400 +++ b/proteomics.py Wed May 20 01:39:39 2015 -0400 @@ -289,6 +289,35 @@ class SPLib( Msp ): """SpectraST Spectral Library. Closely related to msp format""" file_ext = "splib" + composite_type = 'auto_primary_file' + + def __init__(self, **kwd): + Msp.__init__(self, **kwd) + self.add_composite_file( 'library.splib', + description = 'Spectral Library. Contains actual library spectra', + is_binary = False ) + self.add_composite_file( 'library.spidx', + description = 'Spectrum index', is_binary = False ) + self.add_composite_file( 'library.pepidx', + description = 'Peptide index', is_binary = False) + + + def generate_primary_file( self, dataset = None ): + rval = ['