Changeset 4536


Ignore:
Timestamp:
Nov 25, 2013, 4:01:04 PM (9 years ago)
Author:
Fredrik Levander
Message:

Only reporting modified peptides once for updated Mascot XML export.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/api/core/src/org/proteios/io/MascotFileReader.java

    r4534 r4536  
    11/*
    2  $Id$
     2  $Id$
    33
    44 Copyright (C) 2007 Fredrik Levander, Gregory Vincic
     
    543543              // list
    544544              boolean existed = false;
     545              String currentPeptideHitSeq = currentPeptideHit.getDescription();
    545546              Iterator<AHit> peptideIt = peptideHits.iterator();
    546547              while (peptideIt.hasNext())
     
    556557                  {
    557558                    String currentSeq = current.getDescription();
    558                     if (currentSeq.equals(currentPeptideHit.getDescription())) existed = true;
    559                     if (currentSeq.contains(" ") && !currentSeq.startsWith(currentPeptideHit.getDescription()) && !currentSeq.contains(" delta:"))
     559                    if (currentSeq.equals(currentPeptideHitSeq)) existed = true;
     560                    if (currentSeq.contains(" ") && !currentSeq.startsWith(currentPeptideHitSeq) && !currentSeq.contains(" delta:"))
    560561                    {
    561562                    Float deltaScore = current
     
    568569                      }
    569570                    }
     571                    // A new hit should not be added if only the modification position is different
     572                    if (!existed && currentRank==1 && pep_acc && currentPeptideHitSeq.contains(" "))
     573                    {
     574                      if (currentPeptideHitSeq.split(" ")[0].equals(currentSeq.split(" ")[0]))
     575                      {
     576                        existed=true;
     577                      }
     578                    }
     579
    570580                  }
    571581                  else if (current.getDescription().equals(
Note: See TracChangeset for help on using the changeset viewer.