Changeset 1531


Ignore:
Timestamp:
Feb 2, 2007, 4:29:27 PM (14 years ago)
Author:
fredrik
Message:

Tandem input bug corrected. peptides didn't have the correct parent molecule accession number in all cases.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/proteios/importer/TandemFileHandler.java

    r1496 r1531  
    156156        {
    157157          String uid=attrs.getValue( attrs.getIndex("uid"));
     158          String acc=attrs.getValue( attrs.getIndex("label"));
     159          if (acc.contains(" "))
     160          {
     161            acc=acc.substring(0,acc.indexOf(" "));
     162          }
     163          if (acc.startsWith("IPI:"))
     164          {
     165            String[] accessions = acc.split("[:|]",3);
     166            acc = accessions[1];
     167          }
     168          current_accession=acc;
     169
    158170          protein_exists=false;
    159171          for (int i=0;i<protein_uids.size();++i)
     
    207219          parent_molecule.setEntityValue("end",attrs.getValue( attrs.getIndex("end")));
    208220          parent_molecule.setEntityValue("post",attrs.getValue( attrs.getIndex("post")));
    209           parent_molecule.setEntityValue("accession_number",current_molecule.getEntityValue("accession_number"));
     221          parent_molecule.setEntityValue("accession_number",current_accession);
    210222          // Does this peptite result exist?
    211223          List l = current_peptide.getChildren("IdentificationHypothesis",null);
     
    428440  private List protein_uids=new ArrayList();
    429441  private List protein_ids=new ArrayList();
     442  private String current_accession;
    430443  private String current_spectrum;
    431444  private Result current_peptide;
Note: See TracChangeset for help on using the changeset viewer.