INNER CODE UNIT · JavaScript

mg_cmd_renamefa

lh3/minigraph · misc/mgutils.js:108

function mg_cmd_renamefa(args)
{
	var c, sep = '#';
	while ((c = getopt(args, "d:")) != null)
		if (c == 'd') sep = getopt.arg;
	if (args.length - getopt.ind < 2) {
		print("Usage: mgutils.js renamefa [-d delimitor] <prefix> <in.fa>");
		return;
	}
	var prefix = args[getopt.ind];
	var file = new File(args[getopt.ind+1]);
	var buf = new Bytes();
	while (file.readline(buf) >= 0) {
		const s = buf.toString();
		if (s[0] != '>') {
			print(buf);
		} else {
			var m;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…