Skip to content

Commit

Permalink
latest
Browse files Browse the repository at this point in the history
  • Loading branch information
markozecevic committed Jul 26, 2018
1 parent 2efc681 commit 3184a92
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 28 deletions.
2 changes: 1 addition & 1 deletion topmed-workflows/alignment/steps/align.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,4 @@ requirements:
};
hints:
- class: 'sbg:AWSInstanceType'
value: c4.4xlarge;ebs-gp2;512
value: c5.4xlarge;ebs-gp2;512
41 changes: 22 additions & 19 deletions topmed-workflows/alignment/steps/post-align.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ inputs:
- id: reference
type: File
- id: dbsnp
type: File
type: File?
inputBinding:
position: 3
prefix: '--dbsnp'
Expand All @@ -21,11 +21,22 @@ inputs:
- id: threads
type: int?
label: Number of threads
- id: input_cram
type: File
label: Input CRAM
doc: Input CRAM is passed to Post-align for output naming.
'sbg:fileTypes': CRAM
outputs:
- id: output
type: File?
outputBinding:
glob: '*cram'
glob: |-
${
var outname = inputs.input_cram.path.split('/').slice(-1)[0]
outname = outname.split('.').slice(0, -1).join('.')
outname = outname.concat(".recab.cram")
return outname
}
label: Post-align
arguments:
- position: 1
Expand Down Expand Up @@ -58,20 +69,10 @@ arguments:
shellQuote: false
valueFrom: |-
${
function sharedStart(array){
var A= array.concat().sort(),
a1= A[0], a2= A[A.length-1], L= a1.length, i= 0;
while(i<L && a1.charAt(i)=== a2.charAt(i)) i++;
return a1.substring(0, i);
}
var path_list = []
inputs.alignment_files.forEach(function(f){return path_list.push(f.path.replace(/\\/g,'/').replace( /.*\//, '' ))})
var common_prefix = sharedStart(path_list)
if (common_prefix.length >0){
return common_prefix.concat(".recab.cram")
} else {
return "recab.cram"
}
var outname = inputs.input_cram.path.split('/').slice(-1)[0]
outname = outname.split('.').slice(0, -1).join('.')
outname = outname.concat(".recab.cram")
return outname
}
- position: 0
prefix: '--threads'
Expand Down Expand Up @@ -99,11 +100,13 @@ requirements:
- class: ShellCommandRequirement
- class: ResourceRequirement
ramMin: 7500
coresMin: 8
coresMin: 2
- class: DockerRequirement
dockerPull: 'statgen/alignment:1.0.0'
- class: InitialWorkDirRequirement
listing: |-
listing:
- $(inputs.input_cram)
- |-
${
var out = []
out.push(inputs.reference)
Expand All @@ -116,4 +119,4 @@ requirements:
- class: InlineJavascriptRequirement
hints:
- class: 'sbg:AWSInstanceType'
value: c4.4xlarge;ebs-gp2;512
value: m5.large;ebs-gp2;700
4 changes: 2 additions & 2 deletions topmed-workflows/alignment/steps/pre-align.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ requirements:
- class: ShellCommandRequirement
- class: ResourceRequirement
ramMin: 7500
coresMin: 8
coresMin: 2
- class: DockerRequirement
dockerPull: 'statgen/alignment:1.0.0'
- class: InitialWorkDirRequirement
Expand Down Expand Up @@ -151,4 +151,4 @@ requirements:
};
hints:
- class: 'sbg:AWSInstanceType'
value: c4.4xlarge;ebs-gp2;512
value: m5.large;ebs-gp2;512
4 changes: 2 additions & 2 deletions topmed-workflows/alignment/steps/samtools-sort.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class: CommandLineTool
cwlVersion: v1.0
$namespaces:
sbg: 'https://sevenbridges.com'
id: marko_zecevic/topmed-alignment/samtools-sort/0
id: marko_zecevic_topmed_alignment_samtools_sort_0
baseCommand:
- samtools
- sort
Expand Down Expand Up @@ -91,4 +91,4 @@ requirements:
};
hints:
- class: 'sbg:AWSInstanceType'
value: c4.4xlarge;ebs-gp2;512
value: c5.4xlarge;ebs-gp2;512
2 changes: 2 additions & 0 deletions topmed-workflows/alignment/topmed-alignment-checker.cwl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class: Workflow
cwlVersion: v1.0
id: topmed_alignment_checker
doc: Checker for the TopMed alignment workflow.
label: TOPMed Alignment - checker
$namespaces:
sbg: 'https://sevenbridges.com'
Expand Down Expand Up @@ -101,3 +102,4 @@ requirements:
'dct:creator':
'foaf:mbox': 'mailto:support@sbgenomics.com'
'foaf:name': Seven Bridges
'sbg:wrapperAuthor': Marko Zecevic ([email protected])
10 changes: 6 additions & 4 deletions topmed-workflows/alignment/topmed-alignment.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ inputs:
'sbg:fileTypes': CRAM
type: File
label: Input CRAM file
'sbg:x': -233.1334991455078
'sbg:y': -43.2740478515625
'sbg:x': -253.4855499267578
'sbg:y': 25.186986923217773
- id: bwa_index
'sbg:fileTypes': TAR
type: File
Expand Down Expand Up @@ -57,7 +57,7 @@ steps:
- id: comp_ref
source: reference_genome
- id: threads
default: 8
default: 1
out:
- id: fastq
- id: list
Expand Down Expand Up @@ -107,7 +107,9 @@ steps:
source:
- samtools_sort/output
- id: threads
default: 8
default: 1
- id: input_cram
source: input_file
out:
- id: output
run: steps/post-align.cwl
Expand Down

0 comments on commit 3184a92

Please sign in to comment.