Changeset 59


Ignore:
Timestamp:
Aug 11, 2010, 4:14:21 PM (10 years ago)
Author:
j@…
bzr:base-revision:
j@dannynavarro.net-20100811094810-08o9ti8sq8zm2bfs
bzr:committer:
Danny Navarro <j@dannynavarro.net>
bzr:file-ids:

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-20100811095935-ob1ok26lpa8bi3ul
bzr:revno:
59
bzr:revprop:branch-nick:
trunk
bzr:root:
trunk
bzr:timestamp:
2010-08-11 11:59:35.641000032 +0200
bzr:user-agent:
bzr2.1.2+bzr-svn1.0.3
svn:original-date:
2010-08-11T09:59:35.641000Z
Message:

Set for protein peptide references instead of list to avoid redundant peptide references

Location:
trunk/mzcms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/mzcms/models.py

    r57 r59  
    2222            if prot_id in self:
    2323                # XXX: Test this is done correctly
    24                 self[prot_id].pep_refs.extend(prot.pep_refs)
     24                self[prot_id].pep_refs.update(prot.pep_refs)
    2525            else:
    2626                self[prot_id] = prot
  • trunk/mzcms/parsers.py

    r58 r59  
    210210                                native_id=prot_id,
    211211                                sequence="TBI",
    212                                 pep_refs=[peptide]
     212                                pep_refs=set([peptide])
    213213                                )
    214214                        proteins[prot_id] = protein
    215215                    else:
    216                         if peptide not in proteins[prot_id].pep_refs:
    217                             proteins[prot_id].pep_refs.append(peptide)
     216                        proteins[prot_id].pep_refs.add(peptide)
    218217        return proteins, peptides, spectra, psms
    219218
Note: See TracChangeset for help on using the changeset viewer.