projects
/
arvados-tutorial.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updating readme and reorganization
[arvados-tutorial.git]
/
WGS-processing
/
cwl
/
helper
/
getfastq.cwl
diff --git
a/WGS-processing/cwl/helper/getfastq.cwl
b/WGS-processing/cwl/helper/getfastq.cwl
index a38bc9125a60652a71c65e7f58d193a47a6663eb..c651771389f2720614f5e33fcab54e325f3a5305 100644
(file)
--- a/
WGS-processing/cwl/helper/getfastq.cwl
+++ b/
WGS-processing/cwl/helper/getfastq.cwl
@@
-7,15
+7,17
@@
label: Create array of gvcfs to process
requirements:
InlineJavascriptRequirement: {}
inputs:
requirements:
InlineJavascriptRequirement: {}
inputs:
- fast
j
dir:
+ fast
q
dir:
type: Directory
type: Directory
- label: Input directory of fast
j
+ label: Input directory of fast
qs
loadListing: 'shallow_listing'
outputs:
fastq1:
type: File[]
fastq2:
type: File[]
loadListing: 'shallow_listing'
outputs:
fastq1:
type: File[]
fastq2:
type: File[]
+ sample:
+ type: string[]
expression: |
${function compare(a, b) {
var baseA = a.basename;
expression: |
${function compare(a, b) {
var baseA = a.basename;
@@
-32,8
+34,8
@@
expression: |
var fastq1 = [];
var fastq2 = [];
var fastq1 = [];
var fastq2 = [];
- for (var i = 0; i < inputs.fast
j
dir.listing.length; i++) {
- var name = inputs.fast
j
dir.listing[i];
+ for (var i = 0; i < inputs.fast
q
dir.listing.length; i++) {
+ var name = inputs.fast
q
dir.listing[i];
if (name.basename.indexOf('_1.fastq.gz') != -1 ) {
fastq1.push(name);
}
if (name.basename.indexOf('_1.fastq.gz') != -1 ) {
fastq1.push(name);
}
@@
-44,6
+46,15
@@
expression: |
fastq1 = fastq1.sort(compare)
fastq2 = fastq2.sort(compare)
fastq1 = fastq1.sort(compare)
fastq2 = fastq2.sort(compare)
+
+ var sample = [];
+
+ for (var i = 0; i < fastq1.length; i++) {
+ var name = fastq1[i].basename;
+ var samplename = name.replace(/_1.fastq.gz/,'');
+ sample.push(samplename);
+ }
+
- return {"fastq1": fastq1, "fastq2": fastq2};
+ return {"fastq1": fastq1, "fastq2": fastq2
, "sample": sample
};
}
}