reverting last changes. no cacheing
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2526 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
a17d725c35
commit
eb899741e1
|
|
@ -20,9 +20,7 @@ import net.sf.samtools.SAMRecord;
|
|||
public class ReadBackedPileup implements Iterable<PileupElement> {
|
||||
private GenomeLoc loc = null;
|
||||
private ArrayList<PileupElement> pileup = null;
|
||||
byte [] bases = null; // will be used to cache pileup bases after first call to getBases
|
||||
byte [] mapquals = null; // will be used to cache pileup mapping quals after first call to getMappingQuals
|
||||
|
||||
|
||||
private int size = 0; // cached value of the size of the pileup
|
||||
private int nDeletions = 0; // cached value of the number of deletions
|
||||
private int nMQ0Reads = 0; // cached value of the number of MQ0 reads
|
||||
|
|
@ -397,11 +395,9 @@ public class ReadBackedPileup implements Iterable<PileupElement> {
|
|||
* @return
|
||||
*/
|
||||
public byte[] getBases() {
|
||||
if ( bases == null ) {
|
||||
bases = new byte[size()];
|
||||
for ( ExtendedPileupElement pile : this.extendedForeachIterator() ) { bases[pile.getPileupOffset()] = pile.getBase(); }
|
||||
}
|
||||
return bases;
|
||||
byte[] v = new byte[size()];
|
||||
for ( ExtendedPileupElement pile : this.extendedForeachIterator() ) { v[pile.getPileupOffset()] = pile.getBase(); }
|
||||
return v;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -429,11 +425,9 @@ public class ReadBackedPileup implements Iterable<PileupElement> {
|
|||
* @return
|
||||
*/
|
||||
public byte[] getMappingQuals() {
|
||||
if ( mapquals == null ) {
|
||||
mapquals = new byte[size()];
|
||||
for ( ExtendedPileupElement pile : this.extendedForeachIterator() ) { mapquals[pile.getPileupOffset()] = (byte)pile.getRead().getMappingQuality(); }
|
||||
}
|
||||
return mapquals;
|
||||
byte[] v = new byte[size()];
|
||||
for ( ExtendedPileupElement pile : this.extendedForeachIterator() ) { v[pile.getPileupOffset()] = (byte)pile.getRead().getMappingQuality(); }
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue