Skip to content
Snippets Groups Projects
Commit 59d8bbea authored by kohleman's avatar kohleman
Browse files

initialize variables with zero or an empty string to be more robust against missing values

SVN: 18415
parent 35a171fb
No related branches found
No related tags found
No related merge requests found
......@@ -34,13 +34,13 @@ import javax.xml.bind.annotation.XmlElement;
class ChipResultsSummary
{
private Long clusterCountPF;
private Long clusterCountPF = 0L;
private Long clusterCountRaw;
private Long clusterCountRaw = 0L;
private Long yield;
private Long yield = 0L;
private Double densityRatio;
private Double densityRatio = 0.0;
@XmlElement(name = "clusterCountPF")
public Long getClusterCountPF()
......
......@@ -31,13 +31,13 @@ import javax.xml.bind.annotation.XmlElement;
*/
class ChipSummary
{
private String chipID;
private String chipID = "";
private String machine;
private String machine = "";
private String runFolder;
private String runFolder = "";
@XmlElement (name = "ChipID")
@XmlElement(name = "ChipID")
public String getChipID()
{
return chipID;
......@@ -48,7 +48,7 @@ class ChipSummary
this.chipID = chipID;
}
@XmlElement (name = "Machine")
@XmlElement(name = "Machine")
public String getMachine()
{
return machine;
......@@ -59,7 +59,7 @@ class ChipSummary
this.machine = machine;
}
@XmlElement (name = "RunFolder")
@XmlElement(name = "RunFolder")
public String getRunFolder()
{
return runFolder;
......
......@@ -73,9 +73,9 @@ class IlluminaSummary
private ChipSummary chipSummary;
private String Software;
private String Software = "";
private String Date;
private String Date = "";
@XmlElement(name = "ChipResultsSummary")
public ChipResultsSummary getChipResultsSummary()
......
......@@ -132,14 +132,20 @@ public class IlluminaSummaryReportingPlugin extends AbstractTableModelReportingP
software_version = "Not available";
}
// TODO : Cover Paired end runs
Double densityRatio = chipResultSummary.getDensityRatio();
// if (densityRatio == null)
// {
// // densityRatio = 0.0;
// }
// TODO 2010-10-20, Manuel Kohler : 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() / MEGA));
row.add(new DoubleTableCell(chipResultSummary.getDensityRatio()));
row.add(new DoubleTableCell(densityRatio));
// PhiX Lane
row.add(new IntegerTableCell(laneResultSummary.getRead().getLanes().get(4)
......
......@@ -55,7 +55,7 @@ import javax.xml.bind.annotation.XmlElement;
class Lane
{
private Integer laneNumber;
private Integer laneNumber = 0;
// since Casava 1.7 available
private doubleStats averageAlignScorePF;
......@@ -67,7 +67,7 @@ class Lane
// since Casava 1.7 available
private doubleStats errorPF;
private Integer laneYield;
private Integer laneYield = 0;
private stats oneSig;
......
......@@ -30,11 +30,11 @@ import javax.xml.bind.annotation.XmlElement;
public class doubleStats
{
private double mean;
private double mean = 0.0;
private double stdev;
private double stdev = 0.0;
private double sumsq;
private double sumsq = 0.0;
@XmlElement(name = "mean")
public double getMean()
......
......@@ -30,11 +30,11 @@ import javax.xml.bind.annotation.XmlElement;
public class stats
{
private Long mean;
private Long mean = 0L;
private Long stdev;
private Long stdev = 0L;
private Long sumsq;
private Long sumsq = 0L;
@XmlElement(name = "mean")
public Long getMean()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment