Added QUAL/MINVAR parameters to the walker
This commit is contained in:
parent
c81675be4c
commit
943876c6eb
|
|
@ -674,11 +674,14 @@ public class ReadUtils {
|
||||||
public static int getRefCoordSoftUnclippedEnd(SAMRecord read) {
|
public static int getRefCoordSoftUnclippedEnd(SAMRecord read) {
|
||||||
int stop = read.getUnclippedStart();
|
int stop = read.getUnclippedStart();
|
||||||
int shift = 0;
|
int shift = 0;
|
||||||
for (CigarElement cigarElement : read.getCigar().getCigarElements())
|
CigarOperator lastOperator = null;
|
||||||
if (cigarElement.getOperator().consumesReferenceBases() || cigarElement.getOperator() == CigarOperator.SOFT_CLIP)
|
for (CigarElement cigarElement : read.getCigar().getCigarElements()) {
|
||||||
shift += cigarElement.getLength();
|
stop += shift;
|
||||||
|
lastOperator = cigarElement.getOperator();
|
||||||
return (shift == 0) ? stop : stop+shift-1;
|
if (cigarElement.getOperator().consumesReferenceBases() || cigarElement.getOperator() == CigarOperator.SOFT_CLIP || cigarElement.getOperator() == CigarOperator.HARD_CLIP)
|
||||||
|
shift = cigarElement.getLength();
|
||||||
|
}
|
||||||
|
return (lastOperator == CigarOperator.HARD_CLIP) ? stop-1 : stop+shift-1 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue