Constructor for GATKSamRecord with header only, for unit testing
This commit is contained in:
parent
3227143a1c
commit
999a8998ae
|
|
@ -36,6 +36,16 @@ public class GATKSamRecord extends BAMRecord {
|
||||||
// These attributes exist in memory only, and are never written to disk.
|
// These attributes exist in memory only, and are never written to disk.
|
||||||
private Map<Object, Object> temporaryAttributes;
|
private Map<Object, Object> temporaryAttributes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HACK TO CREATE GATKSAMRECORD WITH ONLY A HEADER FOR TESTING PURPOSES ONLY
|
||||||
|
* @param header
|
||||||
|
*/
|
||||||
|
public GATKSamRecord(final SAMFileHeader header) {
|
||||||
|
super(header, SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX, SAMRecord.NO_ALIGNMENT_START,
|
||||||
|
(short)0, (short)255, 0, 1, 0, 1, 0, 0, 0, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public GATKSamRecord(final SAMFileHeader header,
|
public GATKSamRecord(final SAMFileHeader header,
|
||||||
final int referenceSequenceIndex,
|
final int referenceSequenceIndex,
|
||||||
final int alignmentStart,
|
final int alignmentStart,
|
||||||
|
|
@ -57,17 +67,20 @@ public class GATKSamRecord extends BAMRecord {
|
||||||
// *** The following methods are overloaded to cache the appropriate data ***//
|
// *** The following methods are overloaded to cache the appropriate data ***//
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getReadString() {
|
public String getReadString() {
|
||||||
if ( mReadString == null )
|
if ( mReadString == null )
|
||||||
mReadString = super.getReadString();
|
mReadString = super.getReadString();
|
||||||
return mReadString;
|
return mReadString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setReadString(String s) {
|
public void setReadString(String s) {
|
||||||
super.setReadString(s);
|
super.setReadString(s);
|
||||||
mReadString = s;
|
mReadString = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public SAMReadGroupRecord getReadGroup() {
|
public SAMReadGroupRecord getReadGroup() {
|
||||||
if ( !retrievedReadGroup ) {
|
if ( !retrievedReadGroup ) {
|
||||||
SAMReadGroupRecord tempReadGroup = super.getReadGroup();
|
SAMReadGroupRecord tempReadGroup = super.getReadGroup();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue