INNER CODE UNIT · JavaScript

l

lh3/miniasm · misc/sam2paf.js:54

			var l = (m = /\tLN:(\d+)/.exec(line)) != null? parseInt(m[1]) : null;
			if (name != null && l != null) len[name] = l;
		}
		continue;
	}
	var t = line.split("\t");
	var flag = parseInt(t[1]);
	if (t[9] != '*' && t[10] != '*' && t[9].length != t[10].length) throw Error("ERROR at line " + lineno + ": inconsistent SEQ and QUAL lengths - " + t[9].length + " != " + t[10].length);
	if (t[2] == '*' || (flag&4)) continue;
	if (pri_only && (flag&0x100)) continue;
	var tlen = len[t[2]];
	if (tlen == null) throw Error("ERROR at line " + lineno + ": can't find the length of contig " + t[2]);
	var nn = (m = /\tnn:i:(\d+)/.exec(line)) != null? parseInt(m[1]) : 0;
	var NM = (m = /\tNM:i:(\d+)/.exec(line)) != null? parseInt(m[1]) : null;
	var have_NM = NM == null? false : true;
	NM += nn;
	var clip = [0, 0], I = [0, 0], D = [0, 0], M = 0, N = 0, ql = 0, tl = 0, mm = 0, ext_cigar = false;
	while ((m = re.exec(t[5])) != null) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…