4 InlineJavascriptRequirement: {}
12 var pattern = /^(.+)(_S[0-9]{1,3}_)(.+)$/;
13 for (var i = 0; i < inputs.dir.listing.length; i++) {
14 var file = inputs.dir.listing[i];
15 var groups = file.basename.match(pattern);
17 var sampleid = groups[1];
18 if (!samples[sampleid]) {
19 samples[sampleid] = [];
21 samples[sampleid].push(file);
25 Object.keys(samples).sort().forEach(function(sampleid, _) {
26 dirs.push({"class": "Directory",
28 "listing": samples[sampleid]});