Skip to content

Commit

Permalink
fixes due to bdg-formats 0.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
heuermh committed Sep 23, 2019
1 parent f750a9c commit 1c20d01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ public SAMRecord convert(final AlignmentRecord alignmentRecord,
builder.setReadName(alignmentRecord.getReadName());
builder.setReadString(alignmentRecord.getSequence());

if (alignmentRecord.getQuality() == null) {
if (alignmentRecord.getQualityScores() == null) {
builder.setBaseQualityString("*");
}
else {
builder.setBaseQualityString(alignmentRecord.getQuality());
builder.setBaseQualityString(alignmentRecord.getQualityScores());
}

String readGroupId = alignmentRecord.getReadGroupId();
Expand Down Expand Up @@ -178,8 +178,8 @@ public SAMRecord convert(final AlignmentRecord alignmentRecord,
if (alignmentRecord.getMismatchingPositions() != null) {
builder.setAttribute("MD", alignmentRecord.getMismatchingPositions());
}
if (alignmentRecord.getOriginalQuality() != null) {
builder.setOriginalBaseQualities(SAMUtils.fastqToPhred(alignmentRecord.getOriginalQuality()));
if (alignmentRecord.getOriginalQualityScores() != null) {
builder.setOriginalBaseQualities(SAMUtils.fastqToPhred(alignmentRecord.getOriginalQualityScores()));
}
if (alignmentRecord.getOriginalCigar() != null) {
builder.setAttribute("OC", alignmentRecord.getOriginalCigar());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ public AlignmentRecord convert(final SAMRecord samRecord,
}

if (samRecord.getBaseQualityString() != "*") {
builder.setQuality(samRecord.getBaseQualityString());
builder.setQualityScores(samRecord.getBaseQualityString());
}
if (samRecord.getOriginalBaseQualities() != null) {
builder.setOriginalQuality(SAMUtils.phredToFastq(samRecord.getOriginalBaseQualities()));
builder.setOriginalQualityScores(SAMUtils.phredToFastq(samRecord.getOriginalBaseQualities()));
}

int readReference = samRecord.getReferenceIndex();
Expand Down

0 comments on commit 1c20d01

Please sign in to comment.