INNER CODE UNIT · JavaScript

mg_cmd_joinfa

lh3/minigraph · misc/mgutils.js:136

function mg_cmd_joinfa(args)
{
	var c, len_n = 20, min_len = 150, name = "decoy-cat";
	while ((c = getopt(args, "n:l:s:")) != null) {
		if (c == 'l') min_len = parseInt(getopt.arg);
		else if (c == 'n') len_n = parseInt(getopt.arg);
		else if (c == 's') name = getopt.arg;
	}
	if (args.length - getopt.ind < 1) {
		print("Usage: mgutils.js joinfa [options] <in.fa>");
		return;
	}
	var seq = new Bytes(), seq1 = new Bytes(), lineno = 0, nn = new Bytes();
	for (var i = 0; i < len_n; ++i) nn.set(78);
	var buf = new Bytes();
	var file = new File(args[getopt.ind]);
	while (file.readline(buf) >= 0) {
		++lineno;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…