read.getReadString().charAt(offset) --> read.getReadBases()[offset]
[As a courtesy I fixed all instances once I was updating GenotypeLikelihoods] git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2136 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
ec321abd7b
commit
c90bea39a1
|
|
@ -193,7 +193,7 @@ public class LocusIteratorByState extends LocusIterator {
|
||||||
logger.debug(String.format("printState():"));
|
logger.debug(String.format("printState():"));
|
||||||
SAMRecord read = state.getRead();
|
SAMRecord read = state.getRead();
|
||||||
int offset = state.getReadOffset();
|
int offset = state.getReadOffset();
|
||||||
logger.debug(String.format(" read: %s(%d)=%s, cigar=%s", read.getReadName(), offset, read.getReadString().charAt(offset), read.getCigarString()));
|
logger.debug(String.format(" read: %s(%d)=%s, cigar=%s", read.getReadName(), offset, (char)read.getReadBases()[offset], read.getCigarString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ public class FisherStrand extends StandardVariantAnnotation {
|
||||||
if ( offset == -1 )
|
if ( offset == -1 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int readAllele = BaseUtils.simpleBaseToBaseIndex(read.getReadString().charAt(offset));
|
int readAllele = BaseUtils.simpleBaseToBaseIndex((char)read.getReadBases()[offset]);
|
||||||
boolean isFW = !read.getReadNegativeStrandFlag();
|
boolean isFW = !read.getReadNegativeStrandFlag();
|
||||||
|
|
||||||
if (readAllele == allele1 || readAllele == allele2) {
|
if (readAllele == allele1 || readAllele == allele2) {
|
||||||
|
|
|
||||||
|
|
@ -281,7 +281,7 @@ public class GenotypeLikelihoods implements Cloneable {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SAMRecord read = pileup.getReads().get(i);
|
SAMRecord read = pileup.getReads().get(i);
|
||||||
char base = read.getReadString().charAt(offset);
|
char base = (char)read.getReadBases()[offset];
|
||||||
byte qual = read.getBaseQualities()[offset];
|
byte qual = read.getBaseQualities()[offset];
|
||||||
if ( ! ignoreBadBases || ! badBase(base) ) {
|
if ( ! ignoreBadBases || ! badBase(base) ) {
|
||||||
n += add(base, qual, read, offset);
|
n += add(base, qual, read, offset);
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ public class CalculateBaseLikelihoodsWalker extends LocusWalker<Integer, Pair<Lo
|
||||||
for (int i = 0; i < reads.size(); i++) {
|
for (int i = 0; i < reads.size(); i++) {
|
||||||
read = reads.get(i);
|
read = reads.get(i);
|
||||||
offset = offsets.get(i);
|
offset = offsets.get(i);
|
||||||
base = read.getReadString().charAt(offset);
|
base = (char)read.getReadBases()[offset];
|
||||||
qual = read.getBaseQualities()[offset];
|
qual = read.getBaseQualities()[offset];
|
||||||
//mapquality = read.getMappingQuality();
|
//mapquality = read.getMappingQuality();
|
||||||
if (!ReadsToDiscard.contains(read.getReadName()) && BaseUtils.simpleBaseToBaseIndex(base) != -1) {
|
if (!ReadsToDiscard.contains(read.getReadName()) && BaseUtils.simpleBaseToBaseIndex(base) != -1) {
|
||||||
|
|
|
||||||
|
|
@ -341,7 +341,7 @@ public class CallHLAWalker extends LocusWalker<Integer, Pair<Long, Long>>{
|
||||||
for (int i = 0; i < reads.size(); i++) {
|
for (int i = 0; i < reads.size(); i++) {
|
||||||
read = reads.get(i);
|
read = reads.get(i);
|
||||||
offset = offsets.get(i);
|
offset = offsets.get(i);
|
||||||
base = read.getReadString().charAt(offset);
|
base = (char)read.getReadBases()[offset];
|
||||||
qual = read.getBaseQualities()[offset];
|
qual = read.getBaseQualities()[offset];
|
||||||
mapquality = read.getMappingQuality();
|
mapquality = read.getMappingQuality();
|
||||||
if (mapquality >= 5 && BaseUtils.simpleBaseToBaseIndex(base) != -1) {
|
if (mapquality >= 5 && BaseUtils.simpleBaseToBaseIndex(base) != -1) {
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ public class PopPriorWalker extends LocusWalker<Integer, Integer> {
|
||||||
}
|
}
|
||||||
|
|
||||||
int offset = offsets.get(i);
|
int offset = offsets.get(i);
|
||||||
char base = read.getReadString().charAt(offset);
|
char base = (char)read.getReadBases()[offset];
|
||||||
byte qual = read.getBaseQualities()[offset];
|
byte qual = read.getBaseQualities()[offset];
|
||||||
|
|
||||||
if (qual == 0) { continue; }
|
if (qual == 0) { continue; }
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ public class PrintCoverageWalker extends LocusWalker<Integer, Integer> {
|
||||||
}
|
}
|
||||||
|
|
||||||
int offset = context.getOffsets().get(i);
|
int offset = context.getOffsets().get(i);
|
||||||
char base = read.getReadString().charAt(offset);
|
char base = (char)read.getReadBases()[offset];
|
||||||
if (base == 'a' || base == 'A') { aCount++; }
|
if (base == 'a' || base == 'A') { aCount++; }
|
||||||
if (base == 'c' || base == 'C') { cCount++; }
|
if (base == 'c' || base == 'C') { cCount++; }
|
||||||
if (base == 'g' || base == 'G') { gCount++; }
|
if (base == 'g' || base == 'G') { gCount++; }
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ public class AlignmentUtils {
|
||||||
case M:
|
case M:
|
||||||
for ( int l = 0 ; l < ce.getLength() ; l++, i_ref++, i_read++ ) {
|
for ( int l = 0 ; l < ce.getLength() ; l++, i_ref++, i_read++ ) {
|
||||||
char refChr = (char)ref[i_ref];
|
char refChr = (char)ref[i_ref];
|
||||||
char readChr = r.getReadString().charAt(i_read);
|
char readChr = (char)r.getReadBases()[i_read];
|
||||||
if ( BaseUtils.simpleBaseToBaseIndex(readChr) == -1 ||
|
if ( BaseUtils.simpleBaseToBaseIndex(readChr) == -1 ||
|
||||||
BaseUtils.simpleBaseToBaseIndex(refChr) == -1 )
|
BaseUtils.simpleBaseToBaseIndex(refChr) == -1 )
|
||||||
continue; // do not count Ns/Xs/etc ?
|
continue; // do not count Ns/Xs/etc ?
|
||||||
|
|
@ -77,8 +77,8 @@ public class AlignmentUtils {
|
||||||
switch( ce.getOperator() ) {
|
switch( ce.getOperator() ) {
|
||||||
case M:
|
case M:
|
||||||
for ( int l = 0 ; l < ce.getLength() ; l++, i_ref++, i_read++ ) {
|
for ( int l = 0 ; l < ce.getLength() ; l++, i_ref++, i_read++ ) {
|
||||||
char refChr = (char)ref[i_ref];
|
char refChr = ref[i_ref];
|
||||||
char readChr = r.getReadString().charAt(i_read);
|
char readChr = (char)r.getReadBases()[i_read];
|
||||||
if ( BaseUtils.simpleBaseToBaseIndex(readChr) == -1 ||
|
if ( BaseUtils.simpleBaseToBaseIndex(readChr) == -1 ||
|
||||||
BaseUtils.simpleBaseToBaseIndex(refChr) == -1 )
|
BaseUtils.simpleBaseToBaseIndex(refChr) == -1 )
|
||||||
continue; // do not count Ns/Xs/etc ?
|
continue; // do not count Ns/Xs/etc ?
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue