Let's make artificial reads that actually adhere to the specs...
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3022 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
5b34bb9ab0
commit
ded4ba8966
|
|
@ -155,12 +155,14 @@ public class ArtificialSAMUtils {
|
||||||
record.setCigar(new Cigar(elements));
|
record.setCigar(new Cigar(elements));
|
||||||
record.setProperPairFlag(false);
|
record.setProperPairFlag(false);
|
||||||
|
|
||||||
// our reads are all 'A's by default
|
// our reads and quals are all 'A's by default
|
||||||
byte[] c = new byte[length];
|
byte[] c = new byte[length];
|
||||||
|
byte[] q = new byte[length];
|
||||||
for (int x = 0; x < length; x++)
|
for (int x = 0; x < length; x++)
|
||||||
c[x] = 'A';
|
c[x] = q[x] = 'A';
|
||||||
record.setReadBases(c);
|
record.setReadBases(c);
|
||||||
|
record.setBaseQualities(q);
|
||||||
|
|
||||||
if (refIndex == SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX) {
|
if (refIndex == SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX) {
|
||||||
record.setReadUmappedFlag(true);
|
record.setReadUmappedFlag(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,8 @@ public class GATKSAMRecord extends SAMRecord {
|
||||||
setAttribute(attribute.tag, attribute.value);
|
setAttribute(attribute.tag, attribute.value);
|
||||||
|
|
||||||
// if we are using original quals, set them now if t hey are present in the record
|
// if we are using original quals, set them now if t hey are present in the record
|
||||||
if ( GenomeAnalysisEngine.instance.getArguments().useOriginalBaseQualities ) {
|
if ( GenomeAnalysisEngine.instance != null &&
|
||||||
|
GenomeAnalysisEngine.instance.getArguments().useOriginalBaseQualities ) {
|
||||||
byte[] originalQuals = mRecord.getOriginalBaseQualities();
|
byte[] originalQuals = mRecord.getOriginalBaseQualities();
|
||||||
if ( originalQuals != null )
|
if ( originalQuals != null )
|
||||||
mRecord.setBaseQualities(originalQuals);
|
mRecord.setBaseQualities(originalQuals);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue