INNER CODE UNIT · JavaScript

mg_cmd_getlcr

lh3/minigraph · misc/mgutils-es6.js:232

function mg_cmd_getlcr(args) {
	let ext = 5, min_lcr = 0.7, min_ac = 5, ref_idx = 0;
	for (const o of getopt(args, "a:r:e:f:")) {
		if (o.opt == "-r") ref_idx = parseInt(o.arg);
		else if (o.opt == "-e") ext = parseInt(o.arg);
		else if (o.opt == "-f") min_lcr = parseFloat(o.arg);
		else if (o.opt == "-a") min_ac = parseInt(o.arg);
	}
	if (args.length == 0) {
		print("Usage: mgutils-es6.js getlcr [options] <merged.bed>");
		print("Options:");
		print(`  -r INT      index of the reference sample [${ref_idx}]`);
		print(`  -f FLOAT    min fraction LCR [${min_lcr}]`);
		print(`  -a INT      min allele count [${min_ac}]`);
		print(`  -e INT      extend by INT-bp on each side in output [${ext}]`);
		return 1;
	}
	const re = /([^\s=;]+)=([^\s=;]+)/g;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…