Changeset 25 for trunk/mzcms/models.py


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

.bzrignore bzrignore-20100730084509-1oxl7srf8gii89tg-1
mzcms/models.py models.py-20100730084238-fjjwldiefr0w07zv-4
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-20100806113756-c05d2haeot4rmaiy
bzr:revno:
25
bzr:revprop:branch-nick:
trunk
bzr:root:
trunk
bzr:timestamp:
2010-08-06 13:37:56.970999956 +0200
bzr:user-agent:
bzr2.1.2+bzr-svn1.0.3
svn:original-date:
2010-08-06T11:37:56.971000Z
Message:

Pseudocode for parse_dats

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mzcms/models.py

    r24 r25  
    99class Experiment(Folder):
    1010    __parent__ = __name__ = None
    11     def __init__(self, proteins, peptides, spectra, psms):
     11    def __init__(self, subfolders):
    1212        super(Experiment, self).__init__()
    13         self['proteins'] = Proteins(proteins)
    14         self['peptides'] = Peptides(peptides)
    15         self['spectra'] = Spectra(spectra)
    16         self['psms'] = Psms(psms)
     13        for subfolder in subfolders:
     14            self[subfolder.name] = subfolder
    1715
    1816class Proteins(Folder):
     
    7472def appmaker(zodb_root):
    7573    if not 'app_root' in zodb_root:
    76         data = parse_dats('./dats')
    77         app_root = Experiment(data)
     74        folders = parse_dats('./dats', proteins_factory=Proteins,
     75                             peptides_factory=Peptides,
     76                             spectra_factory=Spectra,
     77                             psms_factory=Psms,
     78                             )
     79        app_root = Experiment(folders)
    7880        zodb_root['app_root'] = app_root
    7981        import transaction
Note: See TracChangeset for help on using the changeset viewer.