From 96b7fff67970caeaee73f49d57d28081354aa612 Mon Sep 17 00:00:00 2001
From: kohleman <kohleman>
Date: Tue, 19 Oct 2010 07:58:25 +0000
Subject: [PATCH] PhiX-Lane is now also parsed in and available as column. More
 XML Elements are read in and can be used for further processing if needed.

SVN: 18338
---
 .../dsu/dss/plugins/ChipResultsSummary.java   |  23 ++-
 .../cisd/dsu/dss/plugins/ChipSummary.java     |  72 +++++++
 .../ethz/bsse/cisd/dsu/dss/plugins/Date.java  |  38 ++++
 .../cisd/dsu/dss/plugins/IlluminaSummary.java |  67 +++++-
 .../IlluminaSummaryReportingPlugin.java       | 109 +++++-----
 .../ethz/bsse/cisd/dsu/dss/plugins/Lane.java  | 191 ++++++++++++++++++
 .../dsu/dss/plugins/LaneResultsSummary.java   |  91 ++-------
 .../ethz/bsse/cisd/dsu/dss/plugins/Read.java  |  66 ++++++
 .../cisd/dsu/dss/plugins/doubleStats.java     |  71 +++++++
 .../ethz/bsse/cisd/dsu/dss/plugins/stats.java |  71 +++++++
 10 files changed, 652 insertions(+), 147 deletions(-)
 create mode 100644 deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/ChipSummary.java
 create mode 100644 deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/Date.java
 create mode 100644 deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/Lane.java
 create mode 100644 deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/Read.java
 create mode 100644 deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/doubleStats.java
 create mode 100644 deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/stats.java

diff --git a/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/ChipResultsSummary.java b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/ChipResultsSummary.java
index d96c5c46b21..b9a7dfa481e 100644
--- a/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/ChipResultsSummary.java
+++ b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/ChipResultsSummary.java
@@ -23,13 +23,15 @@ import javax.xml.bind.annotation.XmlElement;
  *   &lt;ChipResultsSummary&gt;
  *     &lt;clusterCountPF&gt;98792458&lt;/clusterCountPF&gt;
  *     &lt;clusterCountRaw&gt;158466917&lt;/clusterCountRaw&gt;
+ *     &lt;densityRatio&gt;3556528488&lt;/densityRatio&gt;
  *     &lt;yield&gt;3556528488&lt;/yield&gt;
  *   &lt;/ChipResultsSummary&gt;
- *   &lt;Software&gt;CASAVA-1.6.0&lt;/Software&gt;
+ *   &lt;Software&gt;CASAVA-1.7.0&lt;/Software&gt;
  * </pre>
  * 
  * @author Manuel Kohler
  */
+
 class ChipResultsSummary
 {
     private Long clusterCountPF;
@@ -38,7 +40,9 @@ class ChipResultsSummary
 
     private Long yield;
 
-    @XmlElement
+    private Double densityRatio;
+
+    @XmlElement(name = "clusterCountPF")
     public Long getClusterCountPF()
     {
         return clusterCountPF;
@@ -49,7 +53,7 @@ class ChipResultsSummary
         this.clusterCountPF = clusterCountPF;
     }
 
-    @XmlElement
+    @XmlElement(name = "clusterCountRaw")
     public Long getClusterCountRaw()
     {
         return clusterCountRaw;
@@ -60,7 +64,7 @@ class ChipResultsSummary
         this.clusterCountRaw = clusterCountRaw;
     }
 
-    @XmlElement
+    @XmlElement(name = "yield")
     public Long getYield()
     {
         return yield;
@@ -71,4 +75,15 @@ class ChipResultsSummary
         this.yield = yield;
     }
 
+    @XmlElement(name = "densityRatio")
+    public Double getDensityRatio()
+    {
+        return densityRatio;
+    }
+
+    public void setDensityRatio(Double densityRatio)
+    {
+        this.densityRatio = densityRatio;
+    }
+
 }
diff --git a/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/ChipSummary.java b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/ChipSummary.java
new file mode 100644
index 00000000000..f79b6819a06
--- /dev/null
+++ b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/ChipSummary.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2010 ETH Zuerich, CISD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ch.ethz.bsse.cisd.dsu.dss.plugins;
+
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ * <pre>
+ *   &lt;ChipSummary&gt;
+ *     &lt;ChipID&gt;708KLAAXX&lt;/ChipID&gt;
+ *     &lt;Machine&gt;BS-DSU_ELLAC&lt;/Machine&gt;
+ *     &lt;RunFolder&gt;101006_708KLAAXX&lt;/RunFolder&gt;
+ *   &lt;/ChipSummary&gt;
+ * </pre>
+ * 
+ * @author Manuel Kohler
+ */
+class ChipSummary
+{
+    private String chipID;
+
+    private String machine;
+
+    private String runFolder;
+
+    @XmlElement (name = "ChipID")
+    public String getChipID()
+    {
+        return chipID;
+    }
+
+    public void setChipID(String chipID)
+    {
+        this.chipID = chipID;
+    }
+
+    @XmlElement (name = "Machine")
+    public String getMachine()
+    {
+        return machine;
+    }
+
+    public void setMachine(String machine)
+    {
+        this.machine = machine;
+    }
+
+    @XmlElement (name = "RunFolder")
+    public String getRunFolder()
+    {
+        return runFolder;
+    }
+
+    public void setRunFolder(String runFolder)
+    {
+        this.runFolder = runFolder;
+    }
+}
\ No newline at end of file
diff --git a/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/Date.java b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/Date.java
new file mode 100644
index 00000000000..959689d5a08
--- /dev/null
+++ b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/Date.java
@@ -0,0 +1,38 @@
+/* Copyright 2010 ETH Zuerich, CISD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ch.ethz.bsse.cisd.dsu.dss.plugins;
+
+import javax.xml.bind.annotation.XmlElement;
+
+/*
+ * @author Manuel Kohler
+ */
+class Date
+{
+    private String Date;
+
+    @XmlElement
+    public String getDate()
+    {
+        return Date;
+    }
+
+    public void setDate(String date)
+    {
+        this.Date = date;
+    }
+    
+}
diff --git a/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/IlluminaSummary.java b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/IlluminaSummary.java
index b75d90f40e1..22813be1f80 100644
--- a/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/IlluminaSummary.java
+++ b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/IlluminaSummary.java
@@ -20,21 +20,50 @@ import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 
 /**
+ * Note: Not all XML Elements are read in
+ * 
  * <pre>
  *   &lt;Summary&gt;
  *     &lt;ChipResultsSummary&gt;
- *       &lt;clusterCountPF&gt;98792458&lt;/clusterCountPF&gt;
- *       &lt;clusterCountRaw&gt;158466917&lt;/clusterCountRaw&gt;
- *       &lt;yield&gt;3556528488&lt;/yield&gt;
+ *     ...
  *     &lt;/ChipResultsSummary&gt;
  *     ...
- *     &lt;Software&gt;CASAVA-1.6.0&lt;/Software&gt;
+ *     &lt;ChipSummary&gt;
+ *     ...
+ *     &lt;/ChipSummary&gt;
+ *     ...
+ *     &lt;Date&gt;
+ *     ...
+ *     &lt;/Date&gt;
+ *     ...
+ *     &lt;ExpandedLaneSummary&gt;
+ *     ...
+ *     &lt;/ExpandedLaneSummary&gt;
+ *     ...
+ *     &lt;LaneParameterSummary&gt;
+ *     ...
+ *     &lt;/LaneParameterSummary&gt;
+ *     ...
+ *     &lt;LaneResultsSummary&gt;
+ *     ...
+ *     &lt;/LaneResultsSummary&gt;
+ *     ...
+ *     &lt;Software&gt;CASAVA-1.7.0&lt;/Software&gt;
+ *     ...
+ *     &lt;TileErrorsByLane&gt;
+ *     ...
+ *     &lt;/TileErrorsByLane&gt;
+ *     ...
+ *     &lt;TileResultsByLane&gt;
+ *     ...
+ *     &lt;/TileResultsByLane&gt;
  *     ...
  *   &lt;Summary&gt;
  * </pre>
  * 
  * @author Manuel Kohler
  */
+
 @XmlRootElement(name = "Summary")
 class IlluminaSummary
 {
@@ -42,8 +71,12 @@ class IlluminaSummary
 
     private LaneResultsSummary LaneResultsSummary;
 
+    private ChipSummary chipSummary;
+
     private String Software;
 
+    private String Date;
+
     @XmlElement(name = "ChipResultsSummary")
     public ChipResultsSummary getChipResultsSummary()
     {
@@ -63,7 +96,18 @@ class IlluminaSummary
 
     public void setLaneResultsSummary(LaneResultsSummary laneResultsSummary)
     {
-        LaneResultsSummary = laneResultsSummary;
+        this.LaneResultsSummary = laneResultsSummary;
+    }
+
+    @XmlElement(name = "ChipSummary")
+    public ChipSummary getChipSummary()
+    {
+        return chipSummary;
+    }
+
+    public void setChipSummary(ChipSummary chipSummary)
+    {
+        this.chipSummary = chipSummary;
     }
 
     @XmlElement(name = "Software")
@@ -74,6 +118,17 @@ class IlluminaSummary
 
     public void setSoftware(String software)
     {
-        Software = software;
+        this.Software = software;
+    }
+
+    @XmlElement(name = "Date")
+    public String getDate()
+    {
+        return Date;
+    }
+
+    public void setDate(String date)
+    {
+        this.Date = date;
     }
 }
diff --git a/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/IlluminaSummaryReportingPlugin.java b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/IlluminaSummaryReportingPlugin.java
index 62d2a8172eb..e66d9996558 100644
--- a/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/IlluminaSummaryReportingPlugin.java
+++ b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/IlluminaSummaryReportingPlugin.java
@@ -39,12 +39,18 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SampleIdentifier;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SpaceIdentifier;
 
 /**
- * Reporting plugin which shows numbers of the Summary file generated from the Illumina Sequencer.
+ * Reporting plugin which shows numbers of the Summary.xml file generated from the Illumina
+ * Sequencer. The structure of the Summary file has changed from Casava 1.6 to 1.7 so some XML
+ * elements are not available in the old files.
  * 
  * @author Manuel Kohler
  */
 public class IlluminaSummaryReportingPlugin extends AbstractTableModelReportingPlugin
 {
+    private static final int MEGA = 1000000;
+
+    private static final int KILO = 1000;
+
     private static final long serialVersionUID = 1L;
 
     private static final String SUMMARY_FILE_NAME = "Summary.xml";
@@ -55,7 +61,7 @@ public class IlluminaSummaryReportingPlugin extends AbstractTableModelReportingP
 
     private static final String[] PROPERTIES =
         { "GENOME_ANALYZER", "END_TYPE", "ILLUMINA_PIPELINE_VERSION",
-                "CYCLES_REQUESTED_BY_CUSTOMER" };
+        "CYCLES_REQUESTED_BY_CUSTOMER" };
 
     public IlluminaSummaryReportingPlugin(Properties properties, File storeRoot)
     {
@@ -68,31 +74,35 @@ public class IlluminaSummaryReportingPlugin extends AbstractTableModelReportingP
         builder.addHeader("Sample Code");
         builder.addHeader("Clusters");
         builder.addHeader("Clusters (PF)");
-        builder.addHeader("Yield (kbases)");
+        builder.addHeader("Yield (Mbases)");
+        builder.addHeader("Density Ratio");
+        builder.addHeader("PhiX: Clusters");
+        builder.addHeader("PhiX: ClustersPF");
+        builder.addHeader("PhiX: Yield (Mbases)");
+        builder.addHeader("PhiX: % Align (PF)");
+
         builder.addHeader("Software");
+        builder.addHeader("Eland finished");
         for (String property : PROPERTIES)
         {
             builder.addHeader(property);
         }
-        builder.addHeader("PhiX: Clusters");
-        builder.addHeader("PhiX: ClustersPF");
-        builder.addHeader("PhiX: Yield (kbases)");
-        builder.addHeader("PhiX: % Align (PF)");
+
         for (DatasetDescription dataset : datasets)
         {
             File originalData = getDataSubDir(dataset);
 
             // set the directory containing the Summary.xml
             File childDirectory =
-                    new File(originalData, dataset.getSampleCode()
-                            + DATA_INTENSITIES_BASE_CALLS_PATH);
+                new File(originalData, dataset.getSampleCode()
+                        + DATA_INTENSITIES_BASE_CALLS_PATH);
             File[] files = childDirectory.listFiles(new FileFilter()
+            {
+                public boolean accept(File file)
                 {
-                    public boolean accept(File file)
-                    {
-                        return file.isDirectory() && file.getName().startsWith(GERALD_DIR);
-                    }
-                });
+                    return file.isDirectory() && file.getName().startsWith(GERALD_DIR);
+                }
+            });
 
             System.out.println(files[0]);
             if (files.length == 1)
@@ -103,35 +113,12 @@ public class IlluminaSummaryReportingPlugin extends AbstractTableModelReportingP
             } else
             {
                 // throw new EnvironmentFailureException(String.format("More than one ..."));
+                // removed because it doesn't help, so just do nothing
             }
-            // if (childDirectory.exists())
-            // {
-            // File summaryFile = extractSummaryFile(dataset, childDirectory);
-            // describe(builder, dataset, summaryFile);
-            // } else
-            // {
-            // File summaryFile = extractSummaryFile(dataset, originalData);
-            // }
         }
         return builder.getTableModel();
     }
 
-    // private static File extractSummaryFile(DatasetDescription dataset, File originalData)
-    // {
-    // List<File> files = new ArrayList<File>();
-    // FileUtilities.findFiles(originalData, files, createIlluminaSummaryFileFilter());
-    // int size = files.size();
-    // if (size == 1)
-    // {
-    // return files.get(0);
-    // } else
-    // {
-    // throw new EnvironmentFailureException(String.format(
-    // "%s file was found for the dataset %s (%s).", (size == 0) ? "No summary"
-    // : " More than one", dataset.getDatasetCode(), dataset.getSampleCode()));
-    // }
-    // }
-
     private static void describe(SimpleTableModelBuilder builder, DatasetDescription dataset,
             File summaryFile)
     {
@@ -143,6 +130,8 @@ public class IlluminaSummaryReportingPlugin extends AbstractTableModelReportingP
             DatasetDescription dataset, IlluminaSummary summary)
     {
         ChipResultsSummary chipResultSummary = summary.getChipResultsSummary();
+        LaneResultsSummary laneResultSummary = summary.getLaneResultsSummary();
+        // ChipSummary chipSummary = summary.getChipSummary();
 
         String software_version = summary.getSoftware();
         if (software_version == null)
@@ -150,18 +139,29 @@ public class IlluminaSummaryReportingPlugin extends AbstractTableModelReportingP
             software_version = "Not available";
         }
 
+        // TODO : Cover Paired end runs
+
         List<ISerializableComparable> row = new ArrayList<ISerializableComparable>();
         row.add(new StringTableCell(dataset.getSampleCode()));
         row.add(new IntegerTableCell(chipResultSummary.getClusterCountRaw()));
         row.add(new IntegerTableCell(chipResultSummary.getClusterCountPF()));
-        row.add(new IntegerTableCell(chipResultSummary.getYield() / 1000));
+        row.add(new IntegerTableCell(chipResultSummary.getYield() / MEGA));
+        row.add(new DoubleTableCell(chipResultSummary.getDensityRatio()));
+
+        // PhiX Lane
+        row.add(new IntegerTableCell(laneResultSummary.getRead().getLanes().get(4)
+                .getClusterCountRaw().getMean()));
+        row.add(new IntegerTableCell(laneResultSummary.getRead().getLanes().get(4)
+                .getClusterCountPF().getMean()));
+        row.add(new IntegerTableCell(laneResultSummary.getRead().getLanes().get(4).getLaneYield()
+                / KILO));
+        row.add(new DoubleTableCell(laneResultSummary.getRead().getLanes().get(4)
+                .getPercentUniquelyAlignedPF().getMean()));
+
         row.add(new StringTableCell(software_version));
+        row.add(new StringTableCell(summary.getDate()));
         addPropertyColumnValues(dataset, row);
-        // just dummies
-        row.add(new IntegerTableCell(1));
-        row.add(new IntegerTableCell(1));
-        row.add(new IntegerTableCell(1));
-        row.add(new DoubleTableCell(1.0));
+
         builder.addRow(row);
     }
 
@@ -194,10 +194,10 @@ public class IlluminaSummaryReportingPlugin extends AbstractTableModelReportingP
         String sampleCode = dataset.getSampleCode();
         String databaseInstanceCode = dataset.getDatabaseInstanceCode();
         SampleIdentifier sampleIdentifier =
-                new SampleIdentifier(new SpaceIdentifier(databaseInstanceCode, spaceCode),
-                        sampleCode);
+            new SampleIdentifier(new SpaceIdentifier(databaseInstanceCode, spaceCode),
+                    sampleCode);
         Sample sampleOrNull =
-                ServiceProvider.getOpenBISService().tryGetSampleWithExperiment(sampleIdentifier);
+            ServiceProvider.getOpenBISService().tryGetSampleWithExperiment(sampleIdentifier);
         if (sampleOrNull == null)
         {
             throw new EnvironmentFailureException(String.format(
@@ -207,23 +207,12 @@ public class IlluminaSummaryReportingPlugin extends AbstractTableModelReportingP
         return sampleOrNull;
     }
 
-    // private static FileFilter createIlluminaSummaryFileFilter()
-    // {
-    // return new FileFilter()
-    // {
-    // public boolean accept(File file)
-    // {
-    // return file.isFile() && file.getName().equals(SUMMARY_FILE_NAME);
-    // }
-    // };
-    // }
-
     /**
      * Loader of Illumina summary XML file.
      * <p>
      * NOTE: This is not thread safe as it holds {@link JaxbXmlParser} singleton. As long as it is
      * used only by {@link IlluminaSummaryReportingPlugin} it will work correctly because we only
-     * use a singleto of each reporting plugin.
+     * use a singleton of each reporting plugin.
      * 
      * @author Piotr Buczek
      */
@@ -231,7 +220,7 @@ public class IlluminaSummaryReportingPlugin extends AbstractTableModelReportingP
     {
         // we use one instance
         private static JaxbXmlParser<IlluminaSummary> PARSER_INSTANCE =
-                new JaxbXmlParser<IlluminaSummary>(IlluminaSummary.class, false);
+            new JaxbXmlParser<IlluminaSummary>(IlluminaSummary.class, false);
 
         public static IlluminaSummary readSummaryXML(File summaryXml)
         {
diff --git a/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/Lane.java b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/Lane.java
new file mode 100644
index 00000000000..f221cc5ec2c
--- /dev/null
+++ b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/Lane.java
@@ -0,0 +1,191 @@
+/*
+ * Copyright 2010 ETH Zuerich, CISD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ch.ethz.bsse.cisd.dsu.dss.plugins;
+
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ * <pre>
+ *  &lt;Lane&gt;
+ *  &lt;laneNumber&gt;1&lt;/laneNumber&gt;
+ *  &lt;averageAlignScorePF&gt;
+ *  ...
+ *  &lt;/averageAlignScorePF&gt;
+ *  &lt;clusterCountPF&gt;
+ *  ...
+ *  &lt;/clusterCountPF&gt;
+ *  &lt;clusterCountRaw&gt;
+ *  ...
+ *  &lt;/clusterCountRaw&gt;
+ *  &lt;errorPF&gt;
+ *  ...
+ *  &lt;/errorPF&gt;
+ *  &lt;laneYield&gt;2290093&lt;/laneYield&gt;
+ *  &lt;oneSig&gt;
+ *  ...
+ *  &lt;/oneSig&gt;
+ *  &lt;percentClustersPF&gt;
+ *  ...
+ *  &lt;/percentClustersPF&gt;
+ *  &lt;percentUniquelyAlignedPF&gt;
+ *  ...
+ *  &lt;/percentUniquelyAlignedPF&gt;
+ *  &lt;signal20AsPctOf1&gt;
+ *  ...
+ *  &lt;/signal20AsPctOf1&gt;
+ *  &lt;/Lane&gt;
+ * </pre>
+ * 
+ * @author Manuel Kohler
+ */
+
+class Lane
+{
+    private Integer laneNumber;
+
+    // since Casava 1.7 available
+    private doubleStats averageAlignScorePF;
+
+    private stats clusterCountPF;
+
+    private stats clusterCountRaw;
+
+    // since Casava 1.7 available
+    private doubleStats errorPF;
+
+    private Integer laneYield;
+
+    private stats oneSig;
+
+    private doubleStats percentClustersPF;
+
+    // since Casava 1.7 available
+    private doubleStats percentUniquelyAlignedPF;
+
+    private doubleStats signal20AsPctOf1;
+
+    @XmlElement(name = "laneNumber")
+    public Integer getLaneNumber()
+    {
+        return laneNumber;
+    }
+
+    public void setLaneNumber(Integer laneNumber)
+    {
+        this.laneNumber = laneNumber;
+    }
+
+    @XmlElement(name = "averageAlignScorePF")
+    public doubleStats getAverageAlignScorePF()
+    {
+        return averageAlignScorePF;
+    }
+
+    public void setAverageAlignScorePF(doubleStats averageAlignScorePF)
+    {
+        this.averageAlignScorePF = averageAlignScorePF;
+    }
+
+    @XmlElement(name = "clusterCountPF")
+    public stats getClusterCountPF()
+    {
+        return clusterCountPF;
+    }
+
+    public void setClusterCountPF(stats clusterCountPF)
+    {
+        this.clusterCountPF = clusterCountPF;
+    }
+
+    @XmlElement(name = "clusterCountRaw")
+    public stats getClusterCountRaw()
+    {
+        return clusterCountRaw;
+    }
+
+    public void setClusterCountRaw(stats clusterCountRaw)
+    {
+        this.clusterCountRaw = clusterCountRaw;
+    }
+
+    @XmlElement(name = "errorPF")
+    public doubleStats getErrorPF()
+    {
+        return errorPF;
+    }
+
+    public void setErrorPF(doubleStats errorPF)
+    {
+        this.errorPF = errorPF;
+    }
+
+    @XmlElement(name = "laneYield")
+    public Integer getLaneYield()
+    {
+        return laneYield;
+    }
+
+    public void setLaneYield(Integer laneYield)
+    {
+        this.laneYield = laneYield;
+    }
+
+    @XmlElement(name = "oneSig")
+    public stats getOneSig()
+    {
+        return oneSig;
+    }
+
+    public void setOneSig(stats oneSig)
+    {
+        this.oneSig = oneSig;
+    }
+
+    @XmlElement(name = "percentClustersPF")
+    public doubleStats getPercentClustersPF()
+    {
+        return percentClustersPF;
+    }
+
+    public void setPercentClustersPF(doubleStats percentClustersPF)
+    {
+        this.percentClustersPF = percentClustersPF;
+    }
+
+    @XmlElement(name = "percentUniquelyAlignedPF")
+    public doubleStats getPercentUniquelyAlignedPF()
+    {
+        return percentUniquelyAlignedPF;
+    }
+
+    public void setPercentUniquelyAlignedPF(doubleStats percentUniquelyAlignedPF)
+    {
+        this.percentUniquelyAlignedPF = percentUniquelyAlignedPF;
+    }
+
+    @XmlElement(name = "signal20AsPctOf1")
+    public doubleStats getSignal20AsPctOf1()
+    {
+        return signal20AsPctOf1;
+    }
+
+    public void setSignal20AsPctOf1(doubleStats signal20AsPctOf1)
+    {
+        this.signal20AsPctOf1 = signal20AsPctOf1;
+    }
+
+}
diff --git a/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/LaneResultsSummary.java b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/LaneResultsSummary.java
index 7f6865e89ec..50c3538b359 100644
--- a/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/LaneResultsSummary.java
+++ b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/LaneResultsSummary.java
@@ -16,94 +16,31 @@
 
 package ch.ethz.bsse.cisd.dsu.dss.plugins;
 
+import javax.xml.bind.annotation.XmlElement;
+
 /**
  * <pre>
- * &lt;LaneResultsSummary&gt;
- *  &lt;Read&gt;
- *  &lt;readNumber&gt;1&lt;/readNumber&gt;
- *  &lt;Lane&gt;
- *  &lt;laneNumber&gt;1&lt;/laneNumber&gt;
- *  &lt;clusterCountPF&gt;
- *  &lt;mean&gt;251107&lt;/mean&gt;
- *  &lt;stdev&gt;9934&lt;/stdev&gt;
- *  &lt;sumsq&gt;11841370000&lt;/sumsq&gt;
- *  &lt;/clusterCountPF&gt;
- *  &lt;clusterCountRaw&gt;
- *  &lt;mean&gt;290967&lt;/mean&gt;
- *  &lt;stdev&gt;12357&lt;/stdev&gt;
- *  &lt;sumsq&gt;18322720000&lt;/sumsq&gt;
- *  &lt;/clusterCountRaw&gt;
- *  &lt;laneYield&gt;2290093&lt;/laneYield&gt;
- * &lt;oneSig&gt;
- *  &lt;mean&gt;497&lt;/mean&gt;
- *  &lt;stdev&gt;61&lt;/stdev&gt;
- *  &lt;sumsq&gt;447654&lt;/sumsq&gt;
- *  &lt;/oneSig&gt;
- *  &lt;percentClustersPF&gt;
- *  &lt;mean&gt;86.32&lt;/mean&gt;
- *  &lt;stdev&gt;1.66&lt;/stdev&gt;
- *  &lt;sumsq&gt;331.22&lt;/sumsq&gt;
- *  &lt;/percentClustersPF&gt;
- *  &lt;signal20AsPctOf1&gt;
- *  &lt;mean&gt;81.60&lt;/mean&gt;
- *  &lt;stdev&gt;6.26&lt;/stdev&gt;
- *  &lt;sumsq&gt;4700.89&lt;/sumsq&gt;
- *  &lt;/signal20AsPctOf1&gt;
- *  &lt;/Lane&gt;
- *  ...
- *  &lt;/Read&gt;
- *  &lt;/LaneResultsSummary&gt;
+ *   &lt;ExpandedLaneSummary&gt;
+ *      &lt;Read&gt;
+ *      &lt;/Read&gt;
+ *   &lt;/ExpandedLaneSummary&gt;
  * </pre>
  * 
  * @author Manuel Kohler
  */
 
-public class LaneResultsSummary
+class LaneResultsSummary
 {
-    private String Read;
-
-    private Long clusterCountPF;
-
-    private Long clusterCountRaw;
-
-    private Long laneyield;
-
-    public String getRead()
-    {
-        return Read;
-    }
-    
-    public void setRead(String read)
-    {
-        Read = read;
-    }
-    public Long getClusterCountPF()
-    {
-        return clusterCountPF;
-    }
-
-    public void setClusterCountPF(Long clusterCountPF)
-    {
-        this.clusterCountPF = clusterCountPF;
-    }
-
-    public Long getClusterCountRaw()
-    {
-        return clusterCountRaw;
-    }
-
-    public void setClusterCountRaw(Long clusterCountRaw)
-    {
-        this.clusterCountRaw = clusterCountRaw;
-    }
+    private Read read;
 
-    public Long getLaneyield()
+    @XmlElement(name = "Read")
+    public Read getRead()
     {
-        return laneyield;
+        return read;
     }
 
-    public void setLaneyield(Long laneyield)
+    public void setRead(Read read)
     {
-        this.laneyield = laneyield;
+        this.read = read;
     }
-}
\ No newline at end of file
+}
diff --git a/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/Read.java b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/Read.java
new file mode 100644
index 00000000000..18dcee10c78
--- /dev/null
+++ b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/Read.java
@@ -0,0 +1,66 @@
+/* Copyright 2010 ETH Zuerich, CISD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ch.ethz.bsse.cisd.dsu.dss.plugins;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ * <pre>
+ *  &lt;Read&gt;
+ *  &lt;readNumber&gt;1&lt;/readNumber&gt;
+ *  &lt;Lane&gt;
+ *  ...
+ *  &lt;/Lane&gt;
+ *  ...
+ *  &lt;/Read&gt;
+ * </pre>
+ * 
+ * @author Manuel Kohler
+ */
+
+class Read
+{
+    private List<Integer> readNumber = new ArrayList<Integer>();
+    
+    private List<Lane> lanes;
+    
+    @XmlElement (name = "readNumber")
+    public List<Integer> getReadNumbers()
+    {
+        return readNumber;
+    }
+
+    public void setReadNumbers(List<Integer> readNumber)
+    {
+        this.readNumber = readNumber;
+    }
+
+    @XmlElement (name = "Lane")
+    public List<Lane> getLanes()
+    {
+        return lanes;
+    }
+
+    public void setLanes(List<Lane> lanes)
+    {
+        this.lanes = lanes;
+    }
+    
+
+}
+    
\ No newline at end of file
diff --git a/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/doubleStats.java b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/doubleStats.java
new file mode 100644
index 00000000000..d45ae2c7b7e
--- /dev/null
+++ b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/doubleStats.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2010 ETH Zuerich, CISD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ch.ethz.bsse.cisd.dsu.dss.plugins;
+
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ * <pre>
+ *   &lt;mean&gt;277736.1&lt;/mean&gt;
+ *   &lt;stdev&gt;11981.2&lt;/stdev&gt;
+ *   &lt;sumsq&gt;17.3&lt;/sumsq&gt;
+ * </pre>
+ * 
+ * @author kohleman
+ */
+
+public class doubleStats
+{
+    private double mean;
+
+    private double stdev;
+
+    private double sumsq;
+
+    @XmlElement(name = "mean")
+    public double getMean()
+    {
+        return mean;
+    }
+
+    public void setMean(double mean)
+    {
+        this.mean = mean;
+    }
+
+    @XmlElement(name = "stdev")
+    public double getStdev()
+    {
+        return stdev;
+    }
+
+    public void setStdev(double stdev)
+    {
+        this.stdev = stdev;
+    }
+
+    @XmlElement(name = "sumsq")
+    public double getSumsq()
+    {
+        return sumsq;
+    }
+
+    public void setSumsq(double sumsq)
+    {
+        this.sumsq = sumsq;
+    }
+}
\ No newline at end of file
diff --git a/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/stats.java b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/stats.java
new file mode 100644
index 00000000000..205a0d7939e
--- /dev/null
+++ b/deep_sequencing_unit/source/java/ch/ethz/bsse/cisd/dsu/dss/plugins/stats.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2010 ETH Zuerich, CISD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ch.ethz.bsse.cisd.dsu.dss.plugins;
+
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ * <pre>
+ *   &lt;mean&gt;277736&lt;/mean&gt;
+ *   &lt;stdev&gt;11981&lt;/stdev&gt;
+ *   &lt;sumsq&gt;17224950000&lt;/sumsq&gt;
+ * </pre>
+ * 
+ * @author kohleman
+ */
+
+public class stats
+{
+    private Long mean;
+
+    private Long stdev;
+
+    private Long sumsq;
+
+    @XmlElement(name = "mean")
+    public Long getMean()
+    {
+        return mean;
+    }
+
+    public void setMean(Long mean)
+    {
+        this.mean = mean;
+    }
+
+    @XmlElement(name = "stdev")
+    public Long getStdev()
+    {
+        return stdev;
+    }
+
+    public void setStdev(Long stdev)
+    {
+        this.stdev = stdev;
+    }
+
+    @XmlElement(name = "sumsq")
+    public Long getSumsq()
+    {
+        return sumsq;
+    }
+
+    public void setSumsq(Long sumsq)
+    {
+        this.sumsq = sumsq;
+    }
+}
-- 
GitLab