{"body": "<h1>Source code for iCallSV.launch_FilterDellyCalls</h1><div class=\"highlight\"><pre>\n<span></span><span class=\"sd\">&quot;&quot;&quot;</span>\n<span class=\"sd\">launch_FilterDellyCalls</span>\n<span class=\"sd\">~~~~~~~~~~~~~~~~~~~~~~~</span>\n\n<span class=\"sd\">:Description: This module will filter delly results and create filtered delly vcf files</span>\n<span class=\"sd\">&quot;&quot;&quot;</span>\n<span class=\"sd\">&#39;&#39;&#39;</span>\n<span class=\"sd\">Created on November 20, 2015</span>\n<span class=\"sd\">Description: This module will filter delly results and create filtered delly vcf files</span>\n<span class=\"sd\">@author: Ronak H Shah</span>\n<span class=\"sd\">::Inputs::</span>\n<span class=\"sd\">args: Arguments passed to iCallSV</span>\n<span class=\"sd\">config: configuration file passed to iCallSV</span>\n<span class=\"sd\">sampleOutdirForDelly: Output directory for delly vcf files.</span>\n<span class=\"sd\">del_vcf: Path to deletion based vcf file</span>\n<span class=\"sd\">dup_vcf: Path to duplication based vcf file</span>\n<span class=\"sd\">inv_vcf: Path to inversion based vcf file</span>\n<span class=\"sd\">tra_vcf: Path to translocation based vcf file</span>\n<span class=\"sd\">ins_vcf: Path to insertion based vcf file</span>\n<span class=\"sd\">&#39;&#39;&#39;</span>\n\n<span class=\"kn\">import</span> <span class=\"nn\">os</span>\n<span class=\"kn\">import</span> <span class=\"nn\">logging</span>\n<span class=\"kn\">import</span> <span class=\"nn\">FilterDellyCalls</span> <span class=\"k\">as</span> <span class=\"nn\">fdc</span>\n<span class=\"kn\">import</span> <span class=\"nn\">multiprocessing</span> <span class=\"k\">as</span> <span class=\"nn\">mp</span>\n<span class=\"kn\">import</span> <span class=\"nn\">coloredlogs</span>\n\n<span class=\"n\">logger</span> <span class=\"o\">=</span> <span class=\"n\">logging</span><span class=\"o\">.</span><span class=\"n\">getLogger</span><span class=\"p\">(</span><span class=\"s1\">&#39;iCallSV.launch_FilterDellyCalls&#39;</span><span class=\"p\">)</span>\n<span class=\"n\">coloredlogs</span><span class=\"o\">.</span><span class=\"n\">install</span><span class=\"p\">(</span><span class=\"n\">level</span><span class=\"o\">=</span><span class=\"s1\">&#39;DEBUG&#39;</span><span class=\"p\">)</span>\n\n<div class=\"viewcode-block\" id=\"launch_filterdellycalls_for_different_analysis_type\"><a class=\"viewcode-back\" href=\"../../../iCallSV/#iCallSV.launch_FilterDellyCalls.launch_filterdellycalls_for_different_analysis_type\">[docs]</a><span class=\"k\">def</span> <span class=\"nf\">launch_filterdellycalls_for_different_analysis_type</span><span class=\"p\">(</span>\n        <span class=\"n\">args</span><span class=\"p\">,</span> <span class=\"n\">config</span><span class=\"p\">,</span> <span class=\"n\">sampleOutdirForDelly</span><span class=\"p\">,</span> <span class=\"n\">del_vcf</span><span class=\"p\">,</span> <span class=\"n\">dup_vcf</span><span class=\"p\">,</span> <span class=\"n\">inv_vcf</span><span class=\"p\">,</span> <span class=\"n\">tra_vcf</span><span class=\"p\">):</span>\n    <span class=\"sd\">&quot;&quot;&quot;</span>\n<span class=\"sd\">    This will launch the filtering of delly calls in parallel.</span>\n\n<span class=\"sd\">    :param Namespace args: Namespace of args to get other variables</span>\n<span class=\"sd\">    :param Namespace config: configuration file passed to iCallSV</span>\n<span class=\"sd\">    :param str sampleOutdirForDelly: Output directory for delly vcf files.</span>\n<span class=\"sd\">    :param str del_vcf: Path to deletion based vcf file</span>\n<span class=\"sd\">    :param str dup_vcf: Path to duplication based vcf file</span>\n<span class=\"sd\">    :param str inv_vcf: Path to inversion based vcf file</span>\n<span class=\"sd\">    :param str tra_vcf: Path to translocation based vcf file</span>\n<span class=\"sd\">    :return: Multiple objects</span>\n<span class=\"sd\">    :rtype: list</span>\n\n<span class=\"sd\">    &quot;&quot;&quot;</span>\n    <span class=\"n\">verbose</span> <span class=\"o\">=</span> <span class=\"n\">args</span><span class=\"o\">.</span><span class=\"n\">verbose</span>\n    <span class=\"n\">fileType</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"n\">del_vcf</span><span class=\"p\">,</span> <span class=\"n\">dup_vcf</span><span class=\"p\">,</span> <span class=\"n\">inv_vcf</span><span class=\"p\">,</span> <span class=\"n\">tra_vcf</span><span class=\"p\">]</span>\n    <span class=\"n\">pool</span> <span class=\"o\">=</span> <span class=\"n\">mp</span><span class=\"o\">.</span><span class=\"n\">Pool</span><span class=\"p\">(</span><span class=\"n\">processes</span><span class=\"o\">=</span><span class=\"mi\">4</span><span class=\"p\">)</span>\n    <span class=\"k\">if</span><span class=\"p\">(</span><span class=\"n\">verbose</span><span class=\"p\">):</span>\n        <span class=\"n\">logger</span><span class=\"o\">.</span><span class=\"n\">info</span><span class=\"p\">(</span>\n            <span class=\"s2\">&quot;launch_FilterDellyCalls: Launched FilterDellyCalls for Deletion, Duplication, Inversion and Translocation Events&quot;</span><span class=\"p\">)</span>\n    <span class=\"n\">results</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"n\">pool</span><span class=\"o\">.</span><span class=\"n\">apply_async</span><span class=\"p\">(</span><span class=\"n\">fdc</span><span class=\"o\">.</span><span class=\"n\">run</span><span class=\"p\">,</span> <span class=\"n\">args</span><span class=\"o\">=</span><span class=\"p\">(</span>\n        <span class=\"n\">x</span><span class=\"p\">,</span>\n        <span class=\"n\">sampleOutdirForDelly</span><span class=\"p\">,</span>\n        <span class=\"n\">args</span><span class=\"o\">.</span><span class=\"n\">controlId</span><span class=\"p\">,</span>\n        <span class=\"n\">args</span><span class=\"o\">.</span><span class=\"n\">caseId</span><span class=\"p\">,</span>\n        <span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;HotSpotRegions&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;HotspotFile&quot;</span><span class=\"p\">),</span>\n        <span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;BlackListRegions&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;BlackListFile&quot;</span><span class=\"p\">),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;LengthOfSV&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;OverallMapq&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;OverallMapqHotspot&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">float</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;CaseAltFreqHotspot&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;CaseCoverageHotspot&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">float</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;ControlAltFreqHotspot&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">float</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;CaseAltFreq&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;CaseCoverage&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">float</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;ControlAltFreq&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;OverallSupportingReads&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;OverallSupportingSplitReads&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;OverallSupportingReadsHotspot&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;OverallSupportingSplitReadsHotspot&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;CaseSupportingReads&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;CaseSupportingSplitReads&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;CaseSupportingReadsHotspot&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;CaseSupportingSplitReadsHotspot&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;ControlSupportingReads&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;ControlSupportingSplitReads&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;ControlSupportingReadsHotspot&quot;</span><span class=\"p\">)),</span>\n        <span class=\"nb\">int</span><span class=\"p\">(</span><span class=\"n\">config</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">(</span><span class=\"s2\">&quot;ParametersToFilterDellyResults&quot;</span><span class=\"p\">,</span> <span class=\"s2\">&quot;ControlSupportingSplitReadsHotspot&quot;</span><span class=\"p\">)),</span>\n        <span class=\"n\">verbose</span><span class=\"p\">))</span> <span class=\"k\">for</span> <span class=\"n\">x</span> <span class=\"ow\">in</span> <span class=\"n\">fileType</span><span class=\"p\">]</span>\n    <span class=\"n\">output</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"n\">p</span><span class=\"o\">.</span><span class=\"n\">get</span><span class=\"p\">()</span> <span class=\"k\">for</span> <span class=\"n\">p</span> <span class=\"ow\">in</span> <span class=\"n\">results</span><span class=\"p\">]</span>\n    <span class=\"n\">filter_del_vcf</span><span class=\"p\">,</span> <span class=\"n\">filter_dup_vcf</span><span class=\"p\">,</span> <span class=\"n\">filter_inv_vcf</span><span class=\"p\">,</span> <span class=\"n\">filter_tra_vcf</span> <span class=\"o\">=</span> <span class=\"n\">output</span>\n    <span class=\"k\">return</span><span class=\"p\">(</span><span class=\"n\">filter_del_vcf</span><span class=\"p\">,</span> <span class=\"n\">filter_dup_vcf</span><span class=\"p\">,</span> <span class=\"n\">filter_inv_vcf</span><span class=\"p\">,</span> <span class=\"n\">filter_tra_vcf</span><span class=\"p\">)</span></div>\n\n<span class=\"sd\">&#39;&#39;&#39;</span>\n<span class=\"sd\">    # Run Delly for Deletion</span>\n<span class=\"sd\">    if(verbose):</span>\n<span class=\"sd\">        logger.info(&quot;launch_Run_Delly: Launched Delly for Deletion Events&quot;)</span>\n<span class=\"sd\">    filter_del_vcf = os.path.splitext(os.path.basename(del_vcf))[0] + &quot;_filtered.vcf&quot;</span>\n<span class=\"sd\">    filter_dup_vcf = os.path.splitext(os.path.basename(dup_vcf))[0] + &quot;_filtered.vcf&quot;</span>\n<span class=\"sd\">    filter_del_vcf = fdc.run(</span>\n<span class=\"sd\">        del_vcf,</span>\n<span class=\"sd\">        sampleOutdirForDelly,</span>\n<span class=\"sd\">        args.controlId,</span>\n<span class=\"sd\">        args.caseId,</span>\n<span class=\"sd\">        config.get(&quot;HotSpotRegions&quot;, &quot;HotspotFile&quot;),</span>\n<span class=\"sd\">        config.get(&quot;BlackListRegions&quot;, &quot;BlackListFile&quot;),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;LengthOfSV&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallMapq&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallMapqHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallSupportingReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallSupportingSplitReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallSupportingReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallSupportingSplitReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;CaseSupportingReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;CaseSupportingSplitReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;CaseSupportingReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;CaseSupportingSplitReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;ControlSupportingReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;ControlSupportingSplitReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;ControlSupportingReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;ControlSupportingSplitReadsHotspot&quot;)),</span>\n<span class=\"sd\">        verbose)</span>\n<span class=\"sd\"># Run Delly for duplication</span>\n<span class=\"sd\">    if(verbose):</span>\n<span class=\"sd\">        logger.info(&quot;launch_Run_Delly: Launched Delly for Duplication Events&quot;)</span>\n<span class=\"sd\">    filter_dup_vcf = os.path.splitext(os.path.basename(dup_vcf))[0] + &quot;_filtered.vcf&quot;</span>\n<span class=\"sd\">    filter_dup_vcf = fdc.run(</span>\n<span class=\"sd\">        dup_vcf,</span>\n<span class=\"sd\">        sampleOutdirForDelly,</span>\n<span class=\"sd\">        args.controlId,</span>\n<span class=\"sd\">        args.caseId,</span>\n<span class=\"sd\">        config.get(&quot;HotSpotRegions&quot;, &quot;HotspotFile&quot;),</span>\n<span class=\"sd\">        config.get(&quot;BlackListRegions&quot;, &quot;BlackListFile&quot;),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;LengthOfSV&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallMapq&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallMapqHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallSupportingReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallSupportingSplitReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallSupportingReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallSupportingSplitReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;CaseSupportingReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;CaseSupportingSplitReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;CaseSupportingReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;CaseSupportingSplitReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;ControlSupportingReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;ControlSupportingSplitReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;ControlSupportingReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;ControlSupportingSplitReadsHotspot&quot;)),</span>\n<span class=\"sd\">        verbose)</span>\n<span class=\"sd\"># Run Delly for inversion</span>\n<span class=\"sd\">    if(verbose):</span>\n<span class=\"sd\">        logger.info(&quot;launch_Run_Delly: Launched Delly for Inversion Events&quot;)</span>\n<span class=\"sd\">    filter_inv_vcf = os.path.splitext(os.path.basename(inv_vcf))[0] + &quot;_filtered.vcf&quot;</span>\n<span class=\"sd\">    filter_inv_vcf = fdc.run(</span>\n<span class=\"sd\">        inv_vcf,</span>\n<span class=\"sd\">        sampleOutdirForDelly,</span>\n<span class=\"sd\">        args.controlId,</span>\n<span class=\"sd\">        args.caseId,</span>\n<span class=\"sd\">        config.get(&quot;HotSpotRegions&quot;, &quot;HotspotFile&quot;),</span>\n<span class=\"sd\">        config.get(&quot;BlackListRegions&quot;, &quot;BlackListFile&quot;),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;LengthOfSV&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallMapq&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallMapqHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallSupportingReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallSupportingSplitReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallSupportingReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallSupportingSplitReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;CaseSupportingReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;CaseSupportingSplitReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;CaseSupportingReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;CaseSupportingSplitReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;ControlSupportingReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;ControlSupportingSplitReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;ControlSupportingReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;ControlSupportingSplitReadsHotspot&quot;)),</span>\n<span class=\"sd\">        verbose)</span>\n<span class=\"sd\"># Run Delly for Translocation</span>\n<span class=\"sd\">    if(verbose):</span>\n<span class=\"sd\">        logger.info(&quot;launch_Run_Delly: Launched Delly for Translocation Envents&quot;)</span>\n<span class=\"sd\">    filter_tra_vcf=os.path.splitext(os.path.basename(tra_vcf))[0] + &quot;_filtered.vcf&quot;</span>\n<span class=\"sd\">    filter_tra_vcf=fdc.run(</span>\n<span class=\"sd\">        tra_vcf,</span>\n<span class=\"sd\">        sampleOutdirForDelly,</span>\n<span class=\"sd\">        args.controlId,</span>\n<span class=\"sd\">        args.caseId,</span>\n<span class=\"sd\">        config.get(&quot;HotSpotRegions&quot;, &quot;HotspotFile&quot;),</span>\n<span class=\"sd\">        config.get(&quot;BlackListRegions&quot;, &quot;BlackListFile&quot;),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;LengthOfSV&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallMapq&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallMapqHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallSupportingReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallSupportingSplitReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallSupportingReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;OverallSupportingSplitReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;CaseSupportingReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;CaseSupportingSplitReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;CaseSupportingReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;CaseSupportingSplitReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;ControlSupportingReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;ControlSupportingSplitReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;ControlSupportingReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;, &quot;ControlSupportingSplitReadsHotspot&quot;)),</span>\n<span class=\"sd\">        verbose)</span>\n<span class=\"sd\">    return(filter_del_vcf, filter_dup_vcf, filter_inv_vcf, filter_tra_vcf)</span>\n<span class=\"sd\"># Run Delly for Insertion</span>\n<span class=\"sd\">    if(verbose):</span>\n<span class=\"sd\">        logger.info(&quot;launch_Run_Delly: Launched Delly for Insertion Events&quot;)</span>\n<span class=\"sd\">    filter_ins_vcf = os.path.splitext(os.path.basename(tra_vcf))[0] + &quot;_filtered.vcf&quot;</span>\n<span class=\"sd\">    ins_vcf = fdc.run(</span>\n<span class=\"sd\">        ins_vcf,</span>\n<span class=\"sd\">        sampleOutdirForDelly,</span>\n<span class=\"sd\">        args.controlId,</span>\n<span class=\"sd\">        args.caseId,</span>\n<span class=\"sd\">        config.get(&quot;HotSpotRegions&quot;,&quot;HotspotFile&quot;),</span>\n<span class=\"sd\">        config.get(&quot;BlackListRegions&quot;,&quot;BlackListFile&quot;),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;,&quot;LengthOfSV&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;,&quot;OverallMapq&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;,&quot;OverallMapqHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;,&quot;OverallSupportingReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;,&quot;OverallSupportingSplitReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;,&quot;OverallSupportingReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;,&quot;OverallSupportingSplitReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;,&quot;CaseSupportingReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;,&quot;CaseSupportingSplitReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;,&quot;CaseSupportingReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;,&quot;CaseSupportingSplitReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;,&quot;ControlSupportingReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;,&quot;ControlSupportingSplitReads&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;,&quot;ControlSupportingReadsHotspot&quot;)),</span>\n<span class=\"sd\">        int(config.get(&quot;ParametersToFilterDellyResults&quot;,&quot;ControlSupportingSplitReadsHotspot&quot;)),</span>\n<span class=\"sd\">        verbose)</span>\n<span class=\"sd\">&#39;&#39;&#39;</span>\n</pre></div>", "title": "iCallSV.launch_FilterDellyCalls", "customsidebar": null, "current_page_name": "_modules/iCallSV/launch_FilterDellyCalls", "sidebars": null, "parents": [{"link": "../../", "title": "Module code"}], "alabaster_version": "0.7.9"}