Changeset 29


Ignore:
Timestamp:
Aug 11, 2010, 4:05:43 PM (10 years ago)
Author:
j@…
bzr:base-revision:
j@dannynavarro.net-20100806130525-yx7xmtqcmpfmxqrh
bzr:committer:
Danny Navarro <j@dannynavarro.net>
bzr:file-ids:

mzcms/parsers.py parsers.py-20100806092910-g1sxvv1o5b9umkof-1
bzr:mapping-version:
v4
bzr:repository-uuid:
724254b2-fbe6-419d-9466-c04ef4c9d29d
bzr:revision-id:
j@dannynavarro.net-20100806131029-8dov1nqec1ao917u
bzr:revno:
29
bzr:revprop:branch-nick:
trunk
bzr:root:
trunk
bzr:timestamp:
2010-08-06 15:10:29.417999983 +0200
bzr:user-agent:
bzr2.1.2+bzr-svn1.0.3
svn:original-date:
2010-08-06T13:10:29.418000Z
Message:

handle ETD and CID fragmode from instrument type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mzcms/parsers.py

    r27 r29  
    5151        for line in datfile:
    5252            if line.startswith("FILE="):
    53                 #XXX: There must be something in the standard library
    54                 # to normalize this properly
    5553                full_path = line.strip().split('=')[1]
    56                 norm_path = full_path.replace("\\", "/")
     54                norm_path = full_path.replace('\\', '/')
    5755                return norm_path.split("/")[-1]
    5856
     
    6361        for line in datfile:
    6462            if line.startswith("INSTRUMENT="):
    65                 if line.strip().split('=')[1] == "ETD-TRAP":
     63                frag_line = line.strip().split('=')[1]
     64                if frag_line == "ETD-TRAP":
    6665                    return 'ETD'
     66                elif frag_line == "ESI-TRAP":
     67                    return 'CID'
    6768                else:
    68                     return 'CID'
     69                    return frag_line
    6970
    7071    def _parse_annotations(self, datfile):
     
    143144        """Takes a dat file and returns a dictionary of psms.
    144145        """
    145         # TODO: handle frag_mode from mgf data
    146146        pkl_fn = self._parse_spectra_fn(datfile)
    147147        frag_mode = self._parse_frag_mode(datfile)
Note: See TracChangeset for help on using the changeset viewer.