<!--
  ~ The MIT License (MIT)
  ~
  ~ Copyright (c) 2007-2015 Broad Institute
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining a copy
  ~ of this software and associated documentation files (the "Software"), to deal
  ~ in the Software without restriction, including without limitation the rights
  ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  ~ copies of the Software, and to permit persons to whom the Software is
  ~ furnished to do so, subject to the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be included in
  ~ all copies or substantial portions of the Software.
  ~
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  ~ THE SOFTWARE.
  -->

<!DOCTYPE cli_plugin SYSTEM "cli_plugin.dtd">
<cli_plugin api_version="alpha" plugin_version="1.0" name="BEDTools"
            id="org.broad.igv.plugin.bedtools">
    <tool name="BEDTools" defaultPath="bedtools" toolUrl="http://code.google.com/p/bedtools/" visible="true"
          helpUrl="http://bedtools.readthedocs.org/en/latest/"
          description="bedtools: a flexible suite of utilities for comparing genomic features."
          forbidEmptyOutput="true">

        <default_arg>
            <arg name="Track A" cmd_arg="-a" type="FEATURE_TRACK"/>
            <arg name="Track B" cmd_arg="-b" type="FEATURE_TRACK"
                 encodingCodec="org.broad.igv.feature.tribble.IGVBEDCodec"/>
            <arg name="Optional Arguments" cmd_arg="" type="TEXT" defaultValue=""/>
        </default_arg>

        <default_output>
            <output name="Output Track">
                <parser format="bed" strict="true" decodingCodec="org.broad.igv.cli_plugin.BEDToolsDecoder">
                    <libs>BEDToolsPluginCodec.jar</libs>
                </parser>
            </output>
        </default_output>

        <command name="Intersect" cmd="intersect">
            <arg name="Split by Exons" cmd_arg="-split" type="BOOL" defaultValue="true"/>
            <arg name="Output bed" cmd_arg="-bed" type="BOOL" defaultValue="true" visible="false"/>
            <arg name="Track A" cmd_arg="-a" type="FEATURE_TRACK"/>
            <arg name="Track B" cmd_arg="-b" type="FEATURE_TRACK"/>
            <arg name="Optional Arguments" cmd_arg="" type="TEXT"/>
        </command>

        <command name="Remove/Subtract" cmd="subtract"/>

        <command name="Closest" cmd="closest"/>

        <command name="Window" cmd="window">
            <arg name="Track A" cmd_arg="-a" type="FEATURE_TRACK"/>
            <arg name="Track B" cmd_arg="-b" type="FEATURE_TRACK"/>
            <arg name="Optional Arguments" cmd_arg="" type="TEXT" defaultValue=""/>
        </command>

        <command name="Coverage" cmd="coverage">
            <arg name="Split by Exons" cmd_arg="-split" type="BOOL" defaultValue="true"/>
            <arg name="Track A" cmd_arg="-a" type="FEATURE_TRACK"/>
            <arg name="Track B" cmd_arg="-b" type="FEATURE_TRACK"/>
            <arg name="Optional Arguments" cmd_arg="" type="TEXT"/>
        </command>

        <command name="Multi-intersect" cmd="multiinter">
            <arg name="Tracks" cmd_arg="-i" type="MULTI_FEATURE_TRACK"/>
            <arg name="Optional Arguments" type="TEXT"/>
        </command>
    </tool>
</cli_plugin>