INNER CODE UNIT · Python
sortVarType
aquaskyline/Clairvoyante · clairvoyante/callVar.py:69
sortVarType = np.sort(t[j])[::-1]
sortZygosity = np.sort(z[j])[::-1]
sortLength = np.sort(l[j])[::-1]
qual = int(-4.343 * log((sortVarType[1]*sortZygosity[1]*sortLength[1] + 1e-300) / (sortVarType[0]*sortZygosity[0]*sortLength[0] + 1e-300)))
#if qual > 999: qual = 999
filt = "."
if args.qual != None:
if qual >= args.qual:
filt = "PASS"
else:
filt = "LowQual"
# Get possible alternative bases
sortBase = base[j].argsort()[::-1]
base1 = num2base[sortBase[0]]
base2 = num2base[sortBase[1]]
# Initialize other variables
refBase = ""; altBase = ""; inferredIndelLength = 0; dp = 0; af = 0.; info = [];
dp = sum(XBatch[j,param.flankingBaseNum,:,0]) + sum(XBatch[j,param.flankingBaseNum+1,:,1]) + \