@prefix SchemaDefRequirement: <https://w3id.org/cwl/cwl#SchemaDefRequirement/> .
@prefix CommandLineBinding: <https://w3id.org/cwl/cwl#CommandLineBinding/> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix DockerRequirement: <https://w3id.org/cwl/cwl#DockerRequirement/> .
@prefix Workflow: <https://w3id.org/cwl/cwl#Workflow/> .
@prefix InlineJavascriptRequirement: <https://w3id.org/cwl/cwl#InlineJavascriptRequirement/> .
@prefix sld:   <https://w3id.org/cwl/salad#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix CommandOutputBinding: <https://w3id.org/cwl/cwl#CommandOutputBinding/> .
@prefix SoftwarePackage: <https://w3id.org/cwl/cwl#SoftwarePackage/> .
@prefix ns1:   <http://commonwl.org/cwltool#> .
@prefix SecondaryFileSchema: <https://w3id.org/cwl/cwl#SecondaryFileSchema/> .
@prefix NetworkAccess: <https://w3id.org/cwl/cwl#NetworkAccess/> .
@prefix SoftwareRequirement: <https://w3id.org/cwl/cwl#SoftwareRequirement/> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix cwl:   <https://w3id.org/cwl/cwl#> .
@prefix ResourceRequirement: <https://w3id.org/cwl/cwl#ResourceRequirement/> .
@prefix ExpressionTool: <https://w3id.org/cwl/cwl#ExpressionTool/> .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_sort.cwl#sorted_alignments>
        cwl:format         <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_sort.cwl> ;
        cwl:outputBinding  [ CommandOutputBinding:glob
                          "${\n  var filename = inputs.unsorted_alignments.nameroot + \"_sorted.\";\n  if (inputs.force_format !== undefined) {\n    return filename + inputs.force_format.toLowerCase();\n  }\n  return filename + (inputs.unsorted_alignments.format == \"http://edamontology.org/format_2572\" ? \"bam\" : \"sam\");\n }\n" ] ;
        sld:type           cwl:File .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#do_auto_name>
        rdfs:comment  "If true, use the file name to automatically assign the read groups value." ;
        rdfs:label    "Auto-assign read groups" ;
        sld:default   false ;
        sld:type      xsd:boolean .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_sort.cwl#unsorted_alignments>
        rdfs:comment      "aligned reads to be checked in sam or bam format" ;
        cwl:format        <http://edamontology.org/format_2573> , <http://edamontology.org/format_2572> ;
        cwl:inputBinding  [ CommandLineBinding:position
                          2 ] ;
        sld:type          cwl:File .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2.cwl#reference_genome>
        cwl:format          <http://edamontology.org/format_1929> ;
        cwl:inputBinding    [ CommandLineBinding:position
                          1 ] ;
        cwl:secondaryFiles  [ SecondaryFileSchema:pattern
                          ".amb" ] ;
        cwl:secondaryFiles  [ SecondaryFileSchema:pattern
                          ".ann" ] ;
        cwl:secondaryFiles  [ SecondaryFileSchema:pattern
                          ".bwt.2bit.64" ] ;
        cwl:secondaryFiles  [ SecondaryFileSchema:pattern
                          ".pac" ] ;
        cwl:secondaryFiles  [ SecondaryFileSchema:pattern
                          ".0123" ] ;
        sld:type            cwl:File .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#index_genome>
        rdfs:label  "Index the reference genome, if it isn't already indexed" ;
        cwl:in      <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#index_genome/sequences> ;
        cwl:out     <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#index_genome/indexed_sequences> ;
        cwl:run     <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-index.cwl> ;
        cwl:when    "$(inputs.sequences.secondaryFiles !== undefined)\n" .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_view_sam2bam.cwl#bam>
        cwl:format         <http://edamontology.org/format_2572> ;
        cwl:outputBinding  [ CommandOutputBinding:glob
                          "*.bam" ] ;
        sld:type           cwl:File .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-index.cwl>
        a                        cwl:CommandLineTool ;
        ns1:original_cwlVersion  "v1.1" ;
        cwl:arguments            ( "$(inputs.sequences)" ) ;
        cwl:baseCommand          ( "bwa-mem2" "index" ) ;
        cwl:cwlVersion           cwl:v1.2 ;
        cwl:hints                [ a                             cwl:DockerRequirement ;
                                   DockerRequirement:dockerPull  "quay.io/biocontainers/bwa-mem2:2.2.1--hd03093a_2"
                                 ] ;
        cwl:hints                [ a                             cwl:SoftwareRequirement ;
                                   SoftwareRequirement:packages  [ SoftwarePackage:package  "bwa-mem2" ;
                                                                   SoftwarePackage:specs    <https://identifiers.org/biotools/bwa-mem2> ;
                                                                   SoftwarePackage:version  "2.2.1"
                                                                 ]
                                 ] ;
        cwl:inputs               <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-index.cwl#sequences> ;
        cwl:outputs              <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-index.cwl#indexed_sequences> ;
        cwl:requirements         [ a            cwl:InitialWorkDirRequirement ;
                                   cwl:listing  [ cwl:entry  "$(inputs.sequences)" ]
                                 ] .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#align/reads>
        cwl:source  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#reads> .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#compute_read_group_header>
        cwl:in    <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#compute_read_group_header/details> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#compute_read_group_header/do_auto_name> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#compute_read_group_header/input1> ;
        cwl:out   <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#compute_read_group_header/read_group_name> ;
        cwl:run   <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroup.cwl> ;
        cwl:when  "$(inputs.do_auto_name !== null || inputs.details !== null)" .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/identifier>
        rdfs:comment  "This value must be unique among multiple samples in your experiment" ;
        rdfs:label    "Read group identifier (ID)" ;
        sld:type      xsd:string .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroup.cwl#input2>
        sld:type  cwl:File , sld:null .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#index_genome/sequences>
        cwl:source  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#reference_genome> .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl>
        a                        cwl:Workflow ;
        rdfs:label               "map medium and long reads (> 100 bp) against reference genome\n" ;
        ns1:original_cwlVersion  "v1.2" ;
        Workflow:steps           <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#align> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#convert_unsorted_alignments_to_bam> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#compute_read_group_header> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#index_genome> ;
        cwl:cwlVersion           cwl:v1.2 ;
        cwl:inputs               <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort_mode> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#read_group> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#reads> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#do_auto_name> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#reference_genome> ;
        cwl:outputs              <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#alignments> ;
        cwl:requirements         [ a  cwl:MultipleInputFeatureRequirement ] ;
        cwl:requirements         [ a  cwl:StepInputExpressionRequirement ] ;
        cwl:requirements         [ a  cwl:InlineJavascriptRequirement ] ;
        cwl:requirements         [ a                           cwl:SchemaDefRequirement ;
                                   SchemaDefRequirement:types  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails>
                                 ] .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#read_group>
        rdfs:label  "Specify read group details manually." ;
        sld:type    <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails> , sld:null .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_sort.cwl>
        a                        cwl:CommandLineTool ;
        rdfs:comment             "Sort a bam file by read names." ;
        ns1:original_cwlVersion  "v1.2" ;
        cwl:arguments            ( [ CommandLineBinding:prefix  "--threads" ;
                                     cwl:valueFrom              "$(runtime.cores)"
                                   ]
                                   [ CommandLineBinding:position  1 ;
                                     CommandLineBinding:prefix    "-m" ;
                                     cwl:valueFrom                "${ return(parseInt(runtime.ram/runtime.cores-100).toString() + \"M\") }"
                                   ]
                                   [ CommandLineBinding:prefix  "-T" ;
                                     cwl:valueFrom              "$(runtime.tmpdir)"
                                   ]
                                   "--no-PG"
                                 ) ;
        cwl:baseCommand          ( "samtools" "sort" ) ;
        cwl:cwlVersion           cwl:v1.2 ;
        cwl:hints                [ a                             cwl:ResourceRequirement ;
                                   ResourceRequirement:coresMin  4 ;
                                   ResourceRequirement:ramMin    15000
                                 ] ;
        cwl:hints                [ a                             cwl:DockerRequirement ;
                                   DockerRequirement:dockerPull  "quay.io/biocontainers/samtools:1.14--hb421002_0"
                                 ] ;
        cwl:hints                [ a                             cwl:SoftwareRequirement ;
                                   SoftwareRequirement:packages  [ SoftwarePackage:package  "samtools" ;
                                                                   SoftwarePackage:specs    <https://identifiers.org/biotools/samtools> ;
                                                                   SoftwarePackage:version  "1.14"
                                                                 ]
                                 ] ;
        cwl:inputs               <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_sort.cwl#unsorted_alignments> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_sort.cwl#force_format> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_sort.cwl#by_name> ;
        cwl:outputs              <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_sort.cwl#sorted_alignments> ;
        cwl:requirements         [ a  cwl:InlineJavascriptRequirement ] ;
        cwl:stdout               "${\n  var filename = inputs.unsorted_alignments.nameroot + \"_sorted.\";\n  if (inputs.force_format !== undefined) {\n    return filename + inputs.force_format.toLowerCase();\n  }\n  return filename + (inputs.unsorted_alignments.format == \"http://edamontology.org/format_2572\" ? \"bam\" : \"sam\");\n }\n" .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#compute_read_group_header/input1>
        cwl:source  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#reads> .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#convert_unsorted_alignments_to_bam/sam>
        cwl:source  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#align/aligned_reads> .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroup.cwl#input1>
        sld:type  cwl:File .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#align>
        cwl:in   <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#align/read_group_header_line> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#align/reference_genome> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#align/reads> ;
        cwl:out  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#align/aligned_reads> ;
        cwl:run  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2.cwl> .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_view_sam2bam.cwl#sam>
        rdfs:comment      "reads to be checked in sam format" ;
        cwl:format        <http://edamontology.org/format_2573> ;
        cwl:inputBinding  [ CommandLineBinding:position
                          2 ] ;
        sld:type          cwl:File .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort_mode>
        rdfs:comment  "* coordinate: Sort by chromosomal coordinates\n* name: Sort by read names  (i.e., the QNAME field)\n* unsorted: Not sorted (sorted as input)\n" ;
        rdfs:label    "How to sort the alignments, if at all" ;
        sld:default   "coordinate" ;
        sld:type      [ sld:symbols  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort_mode/coordinate> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort_mode/name> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort_mode/unsorted> ;
                        sld:type     sld:enum
                      ] .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort/unsorted_alignments>
        cwl:source  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#align/aligned_reads> .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort/by_name>
        cwl:source     <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort_mode> ;
        cwl:valueFrom  "$(self === \"name\" ? true : false)" .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/library>
        rdfs:label  "Library name (LB)" ;
        sld:type    xsd:string .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_sort.cwl#force_format>
        rdfs:comment      "If true, will force binary output (BAM)" ;
        cwl:inputBinding  [ CommandLineBinding:prefix
                          "-O" ] ;
        sld:type          sld:null ;
        sld:type          [ sld:symbols  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_sort.cwl#force_format/BAM> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_sort.cwl#force_format/CRAM> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_sort.cwl#force_format/SAM> ;
                            sld:type     sld:enum
                          ] .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroup.cwl>
        a                          cwl:ExpressionTool ;
        ns1:original_cwlVersion    "v1.0" ;
        ExpressionTool:expression  "${\n  var rg_auto_name = read_group_name_default(inputs.input1, inputs.input2);\n  var rg_id = rg_auto_name;\n  var rg_string = \"\";\n  if (inputs.details) {\n    rg_string = \"@RG\\\\tID:\" + inputs.details.identifier;\n    rg_string += \"\\\\tPL:\" + inputs.details.platform;\n    rg_string += \"\\\\tLB:\" + inputs.details.library;\n  } else {\n    rg_string = \"@RG\\\\tID:\" + rg_id;\n  }\n  return {\"read_group_name\": rg_string};\n }\n" ;
        cwl:cwlVersion             cwl:v1.2 ;
        cwl:hints                  [ a                cwl:LoadListingRequirement ;
                                     cwl:loadListing  "deep_listing"
                                   ] ;
        cwl:hints                  [ a                            cwl:NetworkAccess ;
                                     NetworkAccess:networkAccess  true
                                   ] ;
        cwl:inputs                 <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroup.cwl#input2> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroup.cwl#input1> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroup.cwl#details> ;
        cwl:outputs                <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroup.cwl#read_group_name> ;
        cwl:requirements           [ a       cwl:InlineJavascriptRequirement ;
                                     InlineJavascriptRequirement:expressionLib
                                             "function clean(name) {\n  return name.replace(/[^\\w\\-_\\.]/, '_');\n};\nfunction read_group_name_default(input1, input2) {\n  // input1: File\n  // input2: File?\n  var input_name1 = clean(input1.nameroot);\n  if (input2 === null) {\n    return input_name1;\n  }\n  var input_name2 = clean(input2.nameroot);\n  var common_prefix = \"\";\n  for (var index = 0; index < input_name1.length; index++) {\n    if (input_name1.charAt(index) == input_name2.charAt(index)) {\n     common_prefix += input_name1.charAt(index);\n    }\n  }\n  if (common_prefix.length > 3) {\n    return common_prefix;\n  }\n  return input_name1;\n};\n"
                                   ] ;
        cwl:requirements           [ a                           cwl:SchemaDefRequirement ;
                                     SchemaDefRequirement:types  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails>
                                   ] .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroup.cwl#read_group_name>
        sld:type  xsd:string .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#alignments>
        rdfs:label        "Alignments of the reads to the references genome" ;
        cwl:format        <http://edamontology.org/format_2572> ;
        cwl:outputSource  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#convert_unsorted_alignments_to_bam/bam> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort/sorted_alignments> ;
        cwl:pickValue     "the_only_non_null" ;
        sld:type          cwl:File .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2.cwl#paired_reads_2>
        rdfs:label        "Second (reverse) set of reads (if using paired reads)." ;
        cwl:format        <http://edamontology.org/format_1932> , <http://edamontology.org/format_1929> ;
        cwl:inputBinding  [ CommandLineBinding:position
                          3 ] ;
        sld:type          cwl:File , sld:null .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroup.cwl#details>
        sld:type  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails> , sld:null .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_sort.cwl#by_name>
        rdfs:comment      "If true, will sort by name, otherwise will sort by genomic position" ;
        cwl:inputBinding  [ CommandLineBinding:position  1 ;
                            CommandLineBinding:prefix    "-n"
                          ] ;
        sld:default       false ;
        sld:type          xsd:boolean .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#convert_unsorted_alignments_to_bam>
        rdfs:label  "If not sorting the reads; convert textual alignments (SAM) to binary (BAM) format" ;
        cwl:in      <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#convert_unsorted_alignments_to_bam/sort_mode> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#convert_unsorted_alignments_to_bam/sam> ;
        cwl:out     <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#convert_unsorted_alignments_to_bam/bam> ;
        cwl:run     <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_view_sam2bam.cwl> ;
        cwl:when    "$(inputs.sort_mode === \"unsorted\")" .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort>
        rdfs:label  "Sort the reads, if requested" ;
        cwl:in      <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort/force_format> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort/sort_mode> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort/by_name> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort/unsorted_alignments> ;
        cwl:out     <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort/sorted_alignments> ;
        cwl:run     <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_sort.cwl> ;
        cwl:when    "$(inputs.sort_mode !== \"unsorted\")" .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2.cwl#aligned_reads>
        cwl:format         <http://edamontology.org/format_2573> ;
        cwl:outputBinding  [ CommandOutputBinding:glob
                          "*.sam" ] ;
        sld:type           cwl:File .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails>
        sld:fields  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/platform> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/library> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/identifier> ;
        sld:type    sld:record .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#reads>
        rdfs:label  "Sequences to map to the reference genome." ;
        cwl:format  <http://edamontology.org/format_1932> , <http://edamontology.org/format_1929> ;
        sld:type    cwl:File .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2.cwl#read_group_header_line>
        rdfs:comment      "read group header line such as '@RG\\tID:foo\\tSM:bar'\n" ;
        cwl:inputBinding  [ CommandLineBinding:prefix
                          "-R" ] ;
        sld:type          xsd:string , sld:null .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#compute_read_group_header/do_auto_name>
        cwl:source  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#do_auto_name> .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_view_sam2bam.cwl>
        a                        cwl:CommandLineTool ;
        rdfs:comment             "Convert SAM to BAM.\n" ;
        ns1:original_cwlVersion  "v1.0" ;
        cwl:arguments            ( [ CommandLineBinding:position  1 ;
                                     cwl:valueFrom                "-h"
                                   ]
                                   [ CommandLineBinding:position  1 ;
                                     cwl:valueFrom                "-b"
                                   ]
                                   "--no-PG"
                                 ) ;
        cwl:baseCommand          ( "samtools" "view" ) ;
        cwl:cwlVersion           cwl:v1.2 ;
        cwl:hints                [ a                            cwl:NetworkAccess ;
                                   NetworkAccess:networkAccess  true
                                 ] ;
        cwl:hints                [ a                             cwl:DockerRequirement ;
                                   DockerRequirement:dockerPull  "quay.io/biocontainers/samtools:1.14--hb421002_0"
                                 ] ;
        cwl:hints                [ a                             cwl:ResourceRequirement ;
                                   ResourceRequirement:coresMin  1 ;
                                   ResourceRequirement:ramMin    10000
                                 ] ;
        cwl:hints                [ a                             cwl:SoftwareRequirement ;
                                   SoftwareRequirement:packages  [ SoftwarePackage:package  "samtools" ;
                                                                   SoftwarePackage:specs    <https://identifiers.org/biotools/samtools> ;
                                                                   SoftwarePackage:version  "1.14"
                                                                 ]
                                 ] ;
        cwl:hints                [ a                cwl:LoadListingRequirement ;
                                   cwl:loadListing  "deep_listing"
                                 ] ;
        cwl:inputs               <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_view_sam2bam.cwl#sam> ;
        cwl:outputs              <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/samtools/samtools_view_sam2bam.cwl#bam> ;
        cwl:stdout               "$(inputs.sam.nameroot).bam" .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#convert_unsorted_alignments_to_bam/sort_mode>
        cwl:source  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort_mode> .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#compute_read_group_header/details>
        cwl:source  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#read_group> .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#align/read_group_header_line>
        cwl:source  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#compute_read_group_header/read_group_name> .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-index.cwl#sequences>
        cwl:format  <http://edamontology.org/format_1929> ;
        sld:type    cwl:File .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2.cwl>
        a                        cwl:CommandLineTool ;
        rdfs:label               "map medium and long reads (> 100 bp) against reference genome\n" ;
        ns1:original_cwlVersion  "v1.0" ;
        cwl:arguments            ( "-t" "$(runtime.cores)" "-v" "1" ) ;
        cwl:baseCommand          ( "bwa-mem2" "mem" ) ;
        cwl:cwlVersion           cwl:v1.2 ;
        cwl:hints                [ a                             cwl:SoftwareRequirement ;
                                   SoftwareRequirement:packages  [ SoftwarePackage:package  "bwa-mem2" ;
                                                                   SoftwarePackage:specs    <https://identifiers.org/biotools/bwa-mem2> ;
                                                                   SoftwarePackage:version  "2.2.1"
                                                                 ]
                                 ] ;
        cwl:hints                [ a                            cwl:NetworkAccess ;
                                   NetworkAccess:networkAccess  true
                                 ] ;
        cwl:hints                [ a                cwl:LoadListingRequirement ;
                                   cwl:loadListing  "deep_listing"
                                 ] ;
        cwl:hints                [ a                             cwl:DockerRequirement ;
                                   DockerRequirement:dockerPull  "quay.io/biocontainers/bwa-mem2:2.2.1--hd03093a_2"
                                 ] ;
        cwl:inputs               <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2.cwl#reads> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2.cwl#read_group_header_line> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2.cwl#paired_reads_2> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2.cwl#reference_genome> ;
        cwl:outputs              <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2.cwl#aligned_reads> ;
        cwl:requirements         [ a  cwl:InlineJavascriptRequirement ] ;
        cwl:stdout               "${\n   var filename = inputs.reads.nameroot;\n   if (inputs.paired_reads_2) {\n     filename += \"_\" + inputs.paired_reads_2.nameroot;\n   }\n   return filename += \".sam\"\n }\n" .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort/force_format>
        sld:default  "BAM" .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/platform>
        rdfs:label  "Platform/technology used to produce the reads (PL)" ;
        sld:type    [ sld:symbols  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/platform/CAPILLARY> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/platform/HELICOS> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/platform/ILLUMINA> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/platform/IONTORRENT> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/platform/LS454> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/platform/PACBIO> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/platform/SOLID> ;
                      sld:type     sld:enum
                    ] ;
        sld:type    [ sld:symbols  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/platform/CAPILLARY> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/platform/HELICOS> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/platform/ILLUMINA> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/platform/IONTORRENT> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/platform/LS454> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/platform/PACBIO> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/ReadGroupType.yml#ReadGroupDetails/platform/SOLID> ;
                      sld:type     sld:enum
                    ] .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort/sort_mode>
        cwl:source  <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#sort_mode> .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#reference_genome>
        rdfs:label          "Reference genome sequences, optionally already indexed for BWA-Mem2." ;
        cwl:format          <http://edamontology.org/format_1929> ;
        cwl:secondaryFiles  [ SecondaryFileSchema:pattern   ".ann" ;
                              SecondaryFileSchema:required  false
                            ] ;
        cwl:secondaryFiles  [ SecondaryFileSchema:pattern   ".0123" ;
                              SecondaryFileSchema:required  false
                            ] ;
        cwl:secondaryFiles  [ SecondaryFileSchema:pattern   ".amb" ;
                              SecondaryFileSchema:required  false
                            ] ;
        cwl:secondaryFiles  [ SecondaryFileSchema:pattern   ".bwt.2bit.64" ;
                              SecondaryFileSchema:required  false
                            ] ;
        cwl:secondaryFiles  [ SecondaryFileSchema:pattern   ".pac" ;
                              SecondaryFileSchema:required  false
                            ] ;
        sld:type            cwl:File .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#align/reference_genome>
        cwl:pickValue  "first_non_null" ;
        cwl:source     <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#reference_genome> , <https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-single.cwl#index_genome/indexed_sequences> .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2-index.cwl#indexed_sequences>
        cwl:format          <http://edamontology.org/format_1929> ;
        cwl:outputBinding   [ CommandOutputBinding:glob
                          "$(inputs.sequences.basename)" ] ;
        cwl:secondaryFiles  [ SecondaryFileSchema:pattern
                          ".amb" ] ;
        cwl:secondaryFiles  [ SecondaryFileSchema:pattern
                          ".0123" ] ;
        cwl:secondaryFiles  [ SecondaryFileSchema:pattern
                          ".bwt.2bit.64" ] ;
        cwl:secondaryFiles  [ SecondaryFileSchema:pattern
                          ".pac" ] ;
        cwl:secondaryFiles  [ SecondaryFileSchema:pattern
                          ".ann" ] ;
        sld:type            cwl:File .

<https://w3id.org/cwl/view/git/810495363e06f80529633389ec25f8bb6b961844/bwa/BWA-Mem2.cwl#reads>
        rdfs:label        "First (forward) set of reads (or unpaired reads)." ;
        cwl:format        <http://edamontology.org/format_1932> , <http://edamontology.org/format_1929> ;
        cwl:inputBinding  [ CommandLineBinding:position
                          2 ] ;
        sld:type          cwl:File .
