<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>
<div>HI Mathew,</div>
<div><br>
</div>
<div>Not sure what’s going on, but can you submit this as a big report? </div>
<div><br>
</div>
<div><a href="https://github.com/bioperl/bioperl-run/issues">https://github.com/bioperl/bioperl-run/issues</a></div>
<div><br>
</div>
<div>My guess is there is a discrepancy in the attributes being passed to bedtools; I know this wrapper is older so it may be due to an API change.</div>
<div><br>
</div>
<div>chris</div>
<div>
<div id="MAC_OUTLOOK_SIGNATURE"></div>
</div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:12pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Bioperl-l <<a href="mailto:bioperl-l-bounces+cjfields=illinois.edu@mailman.open-bio.org">bioperl-l-bounces+cjfields=illinois.edu@mailman.open-bio.org</a>> on behalf of Matthew <<a href="mailto:mccormack@molbio.mgh.harvard.edu">mccormack@molbio.mgh.harvard.edu</a>><br>
<span style="font-weight:bold">Date: </span>Monday, September 26, 2016 at 2:14 PM<br>
<span style="font-weight:bold">To: </span>BioPerl List <<a href="mailto:bioperl-l@mailman.open-bio.org">bioperl-l@mailman.open-bio.org</a>><br>
<span style="font-weight:bold">Subject: </span>[Bioperl-l] Bio::Tools:Run::BEDTools using switches with intersect BED<br>
</div>
<div><br>
</div>
<div>
<div bgcolor="#FFFFFF" text="#000000">
<p>I am using Bio::Tools::Run::BEDTools. I would like to intersect two BED files and print out the intersecting lines of the first BED file. I am using the code below, but it is not printing out the first file entries. <font face="Courier New,Courier,
monospace"><br>
</font></p>
<p><font face="Courier New,Courier,monospace"> my $bedtools_fac2 = Bio::Tools::Run::BEDTools->new( -command => 'intersect'); $bedtools_fac2->set_parameters( -switches => 'write_entry_1');
<br>
my $result_file2 = $bedtools_fac2->run( -bgv1 => $bed1, -bgv2 => $files);</font></p>
<p><font face="Courier New,Courier,monospace"><br>
</font>The first file, $bed1, file looks like this:</p>
<p>chr1 5686 5887 1:5786 130 . 44.0 0.00 4.35 100 ABI3VP1 AT5G60130 col<br>
chr1 14354 14555 1:14454 147 . 68.6 0.00 14.69 100 ABI3VP1 AT5G60130 col<br>
chr1 21440 21641 1:21540 163 . 90.9 0.00 27.26 100 ABI3VP1 AT5G60130 col<br>
chr1 41649 41850 1:41749 129 . 42.0 0.00 3.75 100 ABI3VP1 AT5G60130 col</p>
<p>The second file, $files, looks like this:<br>
chr1 1 3630 AT1G01010 intergenic + AT1G01010 0 255,0,0<br>
chr1 631 3630 AT1G01010 upstream_3000 + AT1G01010 0 255,0,0<br>
chr1 760 3759 AT1G01010 upstream_3000_translation_start + AT1G01010 0 255,0,0<br>
chr1 2631 3630 AT1G01010 upstream_1000 + AT1G01010 0 255,0,0<br>
chr1 2760 3759 AT1G01010 upstream_1000_translation_start + AT1G01010 0 255,0,0</p>
<p>The output, $result_file2, looks like this:</p>
<p>chr1 4775 4976 AT1G01010.1 cds_updated + AT1G01010 0 255,0,0<br>
chr1 4775 4976 AT1G01010.1 exon + AT1G01010 0 255,0,0<br>
chr1 1635 1836 AT1G01010 intergenic + AT1G01010 0 255,0,0<br>
chr1 1635 1836 AT1G01010 upstream_3000 + AT1G01010 0 255,0,0</p>
<p>Columns 2 and 3, the numbers (4775 4976), in the output file may have come from the first file, but the rest seems to come from the 2nd file. The intersection is being done, but I would like the output to come from the first file. I can use
<font face="Courier
New,Courier,monospace">-switches => 'write_entry_1' </font>
and get the same result with <font face="Courier New,Courier,
monospace">
-switches => 'write_entry_2'</font> </p>
<p>Matthew<br>
</p>
</div>
</div>
</span>
</body>
</html>