#!/usr/bin/env node

var minimist = require('minimist');

var argv = minimist(process.argv.slice(2));

var cmd = argv._[0];

// generate a random nucleotide sequence of length length.
function random_sequence(length) {
  var sequence = "";
  var nucleotides = "GATC";
  for (var i = 0; i < length; i++) {
    sequence += nucleotides.charAt(Math.floor(Math.random() * nucleotides.length));
  }
  return sequence
}

switch(cmd) {
  case "seqs":
    while (true) {
      console.log(random_sequence(100));
    }
    break
}

@@ -436,16 +436,62 @@
 %22seqs%22:%0A
+    console.log('i,sequence');%0A    var i = 0;%0A
     whil
@@ -519,16 +519,26 @@
 ole.log(
+i + ',' + 
 random_s
@@ -552,16 +552,27 @@
 (100));%0A
+      i++;%0A
     %7D%0A  

generate a proper CSV file