<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to BEDTools</title><link>https://sourceforge.net/p/altanalyze/wiki/BEDTools/</link><description>Recent changes to BEDTools</description><atom:link href="https://sourceforge.net/p/altanalyze/wiki/BEDTools/feed" rel="self"/><language>en</language><lastBuildDate>Sat, 01 Feb 2014 01:06:26 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/altanalyze/wiki/BEDTools/feed" rel="self" type="application/rss+xml"/><item><title>BEDTools modified by Anonymous</title><link>https://sourceforge.net/p/altanalyze/wiki/BEDTools/</link><description>&lt;div class="markdown_content"&gt;&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;BEDTools is a suite of open-source utilities for analyzing genomic sequence and coverage from various file types, including BED, SAM and BAM files. BEDTools can be easily compiled on Unix, Linux and Mac OS X operating systems. Directions for installation on Windows can be found &lt;a class="" href="http://bcc.bx.psu.edu/course/install-bedtools.html" rel="nofollow"&gt;here&lt;/a&gt;. &lt;/p&gt;
&lt;h2 id="details"&gt;Details&lt;/h2&gt;
&lt;p&gt;See the &lt;a class="" href="http://code.google.com/p/bedtools/" rel="nofollow"&gt;BEDTools website&lt;/a&gt; for more information. &lt;/p&gt;
&lt;h3 id="usage-with-altanalyze"&gt;Usage with &lt;a class="" href="../AltAnalyze"&gt;AltAnalyze&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;After installation of BEDTools, &lt;a class="" href="../AltAnalyze"&gt;AltAnalyze&lt;/a&gt; users will need to call the utility bamToBed (recognized on Unix systems once BEDTools has been added to the local or global .bashrc file). The file accepted_hits.bam is produced with each &lt;a class="" href="../TopHat"&gt;TopHat&lt;/a&gt; run in the same output directory as the junction BED file. &lt;/p&gt;
&lt;p&gt;In the below example, "hESC_differentiation_exons.bed" is produced by &lt;a class="" href="../AltAnalyze"&gt;AltAnalyze&lt;/a&gt; prior to running BEDTools (&lt;a class="" href="../BAMtoBED"&gt;see instructions here&lt;/a&gt;), containing all known mRNA exon region coordinates from Ensembl/UCSC and all novel exon coordinates indicated from the &lt;a class="" href="../TopHat"&gt;TopHat&lt;/a&gt; junction BED results. These methods should work equivalently for non-&lt;a class="" href="../TopHat"&gt;TopHat&lt;/a&gt; produced BAM files, however, additional sorting of the BAM file may be required (e.g., SAMTools). &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Build Exon BED file from BAM&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;For a Single BAM File&lt;/strong&gt;&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;bamToBed&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="n"&gt;accepted_hits&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bam&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;split&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;coverageBed&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;stdin&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;home&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;BAMtoBED&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;Hs_cancer_exons&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bed&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;home&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;RNASeqStudy&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;Sample1&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;day0_s1__exons&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bed&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;For Many BAM Files (one per folder)&lt;/strong&gt;&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;for f in */accepted_hits.bam; do parentdir=`dirname &lt;span class="nv"&gt;$f&lt;/span&gt;`;   parentdirname=`basename &lt;span class="nv"&gt;$parentdir&lt;/span&gt;`; bamToBed -i &lt;span class="nv"&gt;$f&lt;/span&gt; -split| coverageBed -a stdin -b Hs_cancer_exons.bed &amp;gt; &lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;parentdirname&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;__exon.bed; done
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This will loop through every folder in the current directory, find the accepted_hits.bam file and name the resulting exon.bed file as "folder_name"__exon.bed. Thus, you can obtain all exon.bed files with this single command. &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sat, 01 Feb 2014 01:06:26 -0000</pubDate><guid>https://sourceforge.netebb5c9603451e2343f5965c6c135964d56da5e57</guid></item></channel></rss>