{"@id":"https://w3id.org/cwl/view/git/c822e40575ecd7fc65626a73363f3bbc193b9a74/cwl/workflows/intersect_intervals.cwl","retrievedFrom":{"repoUrl":"https://github.com/wtsi-hgi/arvados-pipelines.git","branch":"c822e40575ecd7fc65626a73363f3bbc193b9a74","path":"cwl/workflows/intersect_intervals.cwl","packedId":null,"type":"GITHUB","rawUrl":"https://raw.githubusercontent.com/wtsi-hgi/arvados-pipelines/c822e40575ecd7fc65626a73363f3bbc193b9a74/cwl/workflows/intersect_intervals.cwl","url":"https://github.com/wtsi-hgi/arvados-pipelines/blob/c822e40575ecd7fc65626a73363f3bbc193b9a74/cwl/workflows/intersect_intervals.cwl"},"retrievedOn":"2023-01-12T05:58:23.244+00:00","lastCommit":"c822e40575ecd7fc65626a73363f3bbc193b9a74","label":"intersect_intervals.cwl","inputs":{"interval_list_A":{"type":"File"},"interval_list_B":{"type":"File"}},"outputs":{"intersected_interval_list":{"type":"File"}},"steps":{"intersect":{"doc":"Tool:    bedtools intersect (aka intersectBed)\nVersion: v2.25.0\nSummary: Report overlaps between two feature files.\n\nUsage:   bedtools intersect [OPTIONS] -a <bed/gff/vcf/bam> -b <bed/gff/vcf/bam>\n\n\tNote: -b may be followed with multiple databases and/or \n\twildcard (*) character(s). \nOptions: \n\t-wa\tWrite the original entry in A for each overlap.\n\n\t-wb\tWrite the original entry in B for each overlap.\n\t\t- Useful for knowing _what_ A overlaps. Restricted by -f and -r.\n\n\t-loj\tPerform a \\\"left outer join\\\". That is, for each feature in A\n\t\treport each overlap with B.  If no overlaps are found, \n\t\treport a NULL feature for B.\n\n\t-wo\tWrite the original A and B entries plus the number of base\n\t\tpairs of overlap between the two features.\n\t\t- Overlaps restricted by -f and -r.\n\t\t  Only A features with overlap are reported.\n\n\t-wao\tWrite the original A and B entries plus the number of base\n\t\tpairs of overlap between the two features.\n\t\t- Overlapping features restricted by -f and -r.\n\t\t  However, A features w/o overlap are also reported\n\t\t  with a NULL B feature and overlap = 0.\n\n\t-u\tWrite the original A entry _once_ if _any_ overlaps found in B.\n\t\t- In other words, just report the fact >=1 hit was found.\n\t\t- Overlaps restricted by -f and -r.\n\n\t-c\tFor each entry in A, report the number of overlaps with B.\n\t\t- Reports 0 for A entries that have no overlap with B.\n\t\t- Overlaps restricted by -f and -r.\n\n\t-v\tOnly report those entries in A that have _no overlaps_ with B.\n\t\t- Similar to \\\"grep -v\\\" (an homage).\n\n\t-ubam\tWrite uncompressed BAM output. Default writes compressed BAM.\n\n\t-s\tRequire same strandedness.  That is, only report hits in B\n\t\tthat overlap A on the _same_ strand.\n\t\t- By default, overlaps are reported without respect to strand.\n\n\t-S\tRequire different strandedness.  That is, only report hits in B\n\t\tthat overlap A on the _opposite_ strand.\n\t\t- By default, overlaps are reported without respect to strand.\n\n\t-f\tMinimum overlap required as a fraction of A.\n\t\t- Default is 1E-9 (i.e., 1bp).\n\t\t- FLOAT (e.g. 0.50)\n\n\t-F\tMinimum overlap required as a fraction of B.\n\t\t- Default is 1E-9 (i.e., 1bp).\n\t\t- FLOAT (e.g. 0.50)\n\n\t-r\tRequire that the fraction overlap be reciprocal for A AND B.\n\t\t- In other words, if -f is 0.90 and -r is used, this requires\n\t\t  that B overlap 90 percent of A and A _also_ overlaps 90 percent of B.\n\n\t-e\tRequire that the minimum fraction be satisfied for A OR B.\n\t\t- In other words, if -e is used with -f 0.90 and -F 0.10 this requires\n\t\t  that either 90 percent of A is covered OR 10 percent of  B is covered.\n\t\t  Without -e, both fractions would have to be satisfied.\n\n\t-split\tTreat \\\"split\\\" BAM or BED12 entries as distinct BED intervals.\n\n\t-g\tProvide a genome file to enforce consistent chromosome sort order\n\t\tacross input files. Only applies when used with -sorted option.\n\n\t-nonamecheck\tFor sorted data, don't throw an error if the file has different naming conventions\n\t\t\tfor the same chromosome. ex. \\\"chr1\\\" vs \\\"chr01\\\".\n\n\t-sorted\tUse the \\\"chromsweep\\\" algorithm for sorted (-k1,1 -k2,2n) input.\n\n\t-names\tWhen using multiple databases, provide an alias for each that\n\t\twill appear instead of a fileId when also printing the DB record.\n\n\t-filenames\tWhen using multiple databases, show each complete filename\n\t\t\tinstead of a fileId when also printing the DB record.\n\n\t-sortout\tWhen using multiple databases, sort the output DB hits\n\t\t\tfor each record.\n\n\t-bed\tIf using BAM input, write output as BED.\n\n\t-header\tPrint the header from the A file prior to results.\n\n\t-nobuf\tDisable buffered output. Using this option will cause each line\n\t\tof output to be printed as it is generated, rather than saved\n\t\tin a buffer. This will make printing large output files \n\t\tnoticeably slower, but can be useful in conjunction with\n\t\tother software tools and scripts that need to process one\n\t\tline of bedtools output at a time.\n\n\t-iobuf\tSpecify amount of memory to use for input buffer.\n\t\tTakes an integer argument. Optional suffixes K/M/G supported.\n\t\tNote: currently has no effect with compressed files.\n\nNotes: \n\t(1) When a BAM file is used for the A file, the alignment is retained if overlaps exist,\n\tand exlcuded if an overlap cannot be found.  If multiple overlaps exist, they are not\n\treported, as we are only testing for one or more overlaps.","run":"../tools/bedtools/bedtools-intersect.cwl","runType":"COMMANDLINETOOL","sources":{"intersect":{"sourceIDs":["interval_list_to_bed_B"]},"https://w3id.org/cwl/view/git/c822e40575ecd7fc65626a73363f3bbc193b9a74/cwl/workflows/intersect_intervals.cwl#intersect/a":{"sourceIDs":["interval_list_to_bed_A"]}}},"bed_to_interval_list":{"run":"../tools/intersect_intervals/bed_to_interval_list.cwl","runType":"COMMANDLINETOOL","sources":{"bed_to_interval_list":{"sourceIDs":["intersect"]},"https://w3id.org/cwl/view/git/c822e40575ecd7fc65626a73363f3bbc193b9a74/cwl/workflows/intersect_intervals.cwl#bed_to_interval_list/header":{"sourceIDs":["interval_list_to_bed_A"]}}},"interval_list_to_bed_A":{"run":"../tools/intersect_intervals/interval_list_to_bed.cwl","runType":"COMMANDLINETOOL","sources":{"interval_list_to_bed_A":{"sourceIDs":["interval_list_A"]}}},"interval_list_to_bed_B":{"run":"../tools/intersect_intervals/interval_list_to_bed.cwl","runType":"COMMANDLINETOOL","sources":{"interval_list_to_bed_B":{"sourceIDs":["interval_list_B"]}}}},"cwltoolVersion":"3.1.20221201130942","visualisationDot":"digraph workflow {\n  graph [\n    bgcolor = \"#eeeeee\"\n    color = \"black\"\n    fontsize = \"10\"\n    labeljust = \"left\"\n    clusterrank = \"local\"\n    ranksep = \"0.22\"\n    nodesep = \"0.05\"\n  ]\n  node [\n    fontname = \"Helvetica\"\n    fontsize = \"10\"\n    fontcolor = \"black\"\n    shape = \"record\"\n    height = \"0\"\n    width = \"0\"\n    color = \"black\"\n    fillcolor = \"lightgoldenrodyellow\"\n    style = \"filled\"\n  ];\n  edge [\n    fontname=\"Helvetica\"\n    fontsize=\"8\"\n    fontcolor=\"black\"\n    color=\"black\"\n    arrowsize=\"0.7\"\n  ];\n  subgraph cluster_inputs {\n    rank = \"same\";\n    style = \"dashed\";\n    label = \"Workflow Inputs\";\n    \"interval_list_B\" [fillcolor=\"#94DDF4\",label=\"interval_list_B\"];\n    \"interval_list_A\" [fillcolor=\"#94DDF4\",label=\"interval_list_A\"];\n  }\n  subgraph cluster_outputs {\n    rank = \"same\";\n    style = \"dashed\";\n    labelloc = \"b\";\n    label = \"Workflow Outputs\";\n    \"intersected_interval_list\" [fillcolor=\"#94DDF4\",label=\"intersected_interval_list\"];\n  }\n  \"interval_list_to_bed_B\" [label=\"interval_list_to_bed_B\"];\n  \"intersect\" [label=\"intersect\"];\n  \"interval_list_to_bed_A\" [label=\"interval_list_to_bed_A\"];\n  \"bed_to_interval_list\" [label=\"bed_to_interval_list\"];\n  \"interval_list_B\" -> \"interval_list_to_bed_B\" [label=\"input\"];\n  \"interval_list_to_bed_B\" -> \"intersect\" [label=\"b\"];\n  \"interval_list_to_bed_A\" -> \"intersect\" [label=\"a\"];\n  \"interval_list_A\" -> \"interval_list_to_bed_A\" [label=\"input\"];\n  \"intersect\" -> \"bed_to_interval_list\" [label=\"input\"];\n  \"interval_list_to_bed_A\" -> \"bed_to_interval_list\" [label=\"header\"];\n  \"bed_to_interval_list\" -> \"intersected_interval_list\";\n}\n","packed":false,"permalink":"https://w3id.org/cwl/view/git/c822e40575ecd7fc65626a73363f3bbc193b9a74/cwl/workflows/intersect_intervals.cwl","visualisationXdot":"/graph/xdot/github.com/wtsi-hgi/arvados-pipelines/blob/c822e40575ecd7fc65626a73363f3bbc193b9a74/cwl/workflows/intersect_intervals.cwl","roBundle":"/robundle/github.com/wtsi-hgi/arvados-pipelines/blob/c822e40575ecd7fc65626a73363f3bbc193b9a74/cwl/workflows/intersect_intervals.cwl","visualisationPng":"/graph/png/github.com/wtsi-hgi/arvados-pipelines/blob/c822e40575ecd7fc65626a73363f3bbc193b9a74/cwl/workflows/intersect_intervals.cwl","visualisationSvg":"/graph/svg/github.com/wtsi-hgi/arvados-pipelines/blob/c822e40575ecd7fc65626a73363f3bbc193b9a74/cwl/workflows/intersect_intervals.cwl"}