1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
8 InlineJavascriptRequirement: {}
16 var pattern = /^(.+)(_S[0-9]{1,3}_)(.+)$/;
17 for (var i = 0; i < inputs.dir.listing.length; i++) {
18 var file = inputs.dir.listing[i];
19 var groups = file.basename.match(pattern);
21 var sampleid = groups[1];
22 if (!samples[sampleid]) {
23 samples[sampleid] = [];
25 samples[sampleid].push(file);
29 Object.keys(samples).sort().forEach(function(sampleid, _) {
30 dirs.push({"class": "Directory",
32 "listing": samples[sampleid]});