INNER CODE UNIT · JavaScript
fn_cen
lh3/psmc · utils/dec2img.js:39
var c, fn_cen = null, ws = 50, step = 100, max = 2e-3;
while ((c = getopt(arguments, "c:w:s:m:")) != null)
if (c == 'c') fn_cen = getopt.arg;
else if (c == 'w') ws = parseInt(getopt.arg);
else if (c == 's') step = parseInt(getopt.arg);
else if (c == 'm') max = parseFloat(getopt.arg);
ws *= 1000; // in kb
if (arguments.length - getopt.ind < 2) {
print("Usage: k8 dec2img.js [-c centro.bed] [-w 100] [-s 100] <chr.len> <psmc.dec>");
exit(1);
}
var f, b = new Bytes();
var len_acc = {}, len_sum = 0;
f = new File(arguments[getopt.ind]);