Hrumph. Don't just add pointers to the same objects, actually clone the underlying arrays.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3379 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
886e9c1297
commit
eb200e4cce
|
|
@ -86,15 +86,25 @@ public class DepthOfCoverageStats {
|
||||||
|
|
||||||
public DepthOfCoverageStats(DepthOfCoverageStats cloneMe) {
|
public DepthOfCoverageStats(DepthOfCoverageStats cloneMe) {
|
||||||
this.binLeftEndpoints = cloneMe.binLeftEndpoints;
|
this.binLeftEndpoints = cloneMe.binLeftEndpoints;
|
||||||
this.granularHistogramBySample = cloneMe.granularHistogramBySample;
|
granularHistogramBySample = new HashMap<String,int[]>();
|
||||||
this.totalCoverages = cloneMe.totalCoverages;
|
totalCoverages = new HashMap<String,Long>();
|
||||||
this.nLoci = cloneMe.nLoci;
|
for ( String s : cloneMe.getAllSamples() ) {
|
||||||
this.totalLocusDepth = cloneMe.totalLocusDepth;
|
granularHistogramBySample.put(s,new int[cloneMe.getHistograms().get(s).length]);
|
||||||
this.totalDepthOfCoverage = cloneMe.totalDepthOfCoverage;
|
for ( int i = 0; i < granularHistogramBySample.get(s).length; i++ ) {
|
||||||
this.locusHistogram = cloneMe.locusHistogram;
|
granularHistogramBySample.get(s)[i] = cloneMe.getHistograms().get(s)[i];
|
||||||
this.locusCoverageCounts = cloneMe.locusCoverageCounts;
|
}
|
||||||
this.tabulateLocusCounts = cloneMe.tabulateLocusCounts;
|
totalCoverages.put(s,cloneMe.totalCoverages.get(s));
|
||||||
|
}
|
||||||
|
|
||||||
this.includeDeletions = cloneMe.includeDeletions;
|
this.includeDeletions = cloneMe.includeDeletions;
|
||||||
|
if ( cloneMe.tabulateLocusCounts ) {
|
||||||
|
this.locusCoverageCounts = new int[cloneMe.locusCoverageCounts.length][cloneMe.locusCoverageCounts[0].length];
|
||||||
|
}
|
||||||
|
//this.granularHistogramBySample = cloneMe.granularHistogramBySample;
|
||||||
|
//this.totalCoverages = cloneMe.totalCoverages;
|
||||||
|
this.nLoci = cloneMe.nLoci;
|
||||||
|
this.totalDepthOfCoverage = cloneMe.totalDepthOfCoverage;
|
||||||
|
this.tabulateLocusCounts = cloneMe.tabulateLocusCounts;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addSample(String sample) {
|
public void addSample(String sample) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue