Changeset 4553


Ignore:
Timestamp:
Apr 24, 2014, 10:38:32 AM (8 years ago)
Author:
Fredrik Levander
Message:

Refs #805. Adding file associations to raw files from PRIDE XML files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugin/src/org/proteios/plugins/ProteomeXchangeExportPlugin.java

    r4552 r4553  
    340340  {
    341341    return new AboutImpl("ProteomeXchange Submission Summary File Export",
    342       "Generate ProteomeXchange Submission Summary File", "1.0",
    343       "2013, Lund University", null, null,
     342      "Generate ProteomeXchange Submission Summary File", "1.1",
     343      "2013-2014, Lund University", null, null,
    344344      "http://www.proteios.org  ");
    345345  }
     
    831831        }
    832832      }
     833      // Add raw file to mapping as well, if the name is the same. Assuming search done with MGF.
     834      for (String filename:relatedPeakListFileNames)
     835      {
     836        if (filename.toUpperCase().endsWith(".MGF"))
     837        {
     838          String basefile = filename.substring(0,filename.lastIndexOf('.'));
     839          for (File rawFile: proteomeXchangeRawFiles)
     840          {
     841            String rawBase = rawFile.getName();
     842            if (rawBase.toUpperCase().endsWith(".RAW") || rawBase.toUpperCase().endsWith(".GZ"))
     843            {
     844              rawBase = rawBase.substring(0,rawBase.lastIndexOf('.'));
     845            }
     846            if (rawBase.toUpperCase().endsWith(".MZML"))
     847            {
     848              rawBase = rawBase.substring(0,rawBase.lastIndexOf('.'));
     849            }
     850            if (rawBase.equals(basefile)) relatedPeakListFiles.add(rawFile);
     851          }
     852        }
     853      }
    833854      fileMappingList = updateFileMappingList(fileMappingList,
    834855        relatedPeakListFiles, resultFile, fileIdMapIndexHashMap);
Note: See TracChangeset for help on using the changeset viewer.