# HG changeset patch # User Lance Parsons # Date 1314211389 14400 # Node ID b8525303b945b00f861db283b91a7c53919c2f12 # Parent ed97c3e7e0bde5a5f688088ec6de374a14e7ecc5 Reorganized repo diff -r ed97c3e7e0bd -r b8525303b945 README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README Wed Aug 24 14:43:09 2011 -0400 @@ -0,0 +1,18 @@ +Galaxy tool wrapper to generate BigWig coverage files from BAM files. BigWig +files can be displaye at UCSC directly from Galaxy. Allows user to split gapped +reads (particularly useful for RNA-Seq with large splice regions). + +Requirements +------------ +genomeCoverageBed - part of BedTools (http://code.google.com/p/bedtools/) +bedGraphToBigWig - from UCSC (http://hgdownload.cse.ucsc.edu/admin/exe/) + +This tool also uses the samtools fai fasta index files stored in Galaxy's shared +tool data directory. A sample version of this file is included for completeness. + +Installation +------------ + +1 - Install genomeCoverageBed and bedGraphToBigWig and make sure they in the PATH +2 - Copy bam_to_bigwig.xml to $GALAXY_HOME/tools/bam_to_bigwig +3 - Add the tool to the $GALAXY_HOME/tool_conf.xml tool-registry file diff -r ed97c3e7e0bd -r b8525303b945 bam_to_bigwig.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bam_to_bigwig.xml Wed Aug 24 14:43:09 2011 -0400 @@ -0,0 +1,42 @@ + + Calculates coverage from a BAM alignment file + + genomeCoverageBed + bedGraphToBigWig + + + genomeCoverageBed -ibam $align -bg $split -g + `awk '($0 !~ /^#.*/) && ($2 == "$align.dbkey") {print $3}' ${GALAXY_DATA_INDEX_DIR}/sam_fa_indices.loc`.fai + > tmp.bedgraph; + bedGraphToBigWig tmp.bedgraph + `awk '($0 !~ /^#.*/) && ($2 == "$align.dbkey") {print $3}' ${GALAXY_DATA_INDEX_DIR}/sam_fa_indices.loc`.fai + $out; + + + + + + + + + + + + + + **What it does** + + Creates a coverage file in BigWig format, given a BAM alignment file. + + **Input** + + A BAM alignment file. This needs to have the genome database build used in alignment annotated. If your file has '?' for the database build, click on the pencil icon to edit the alignment attributes, and specify the organism used to align against. + + The BAM file must also be sorted. If you generated the BAM file in Galaxy, this will be true, however, if you uploaded the file, you must make sure it was sorted. + + **Output** + + BigWig files can be loaded directly from Galaxy into the UCSC browser. They can be loaded incrementally by UCSC, so a single file can be used to represent the entire genome without having to upload the entire thing as a custom track. + + + diff -r ed97c3e7e0bd -r b8525303b945 bam_to_bigwig/README --- a/bam_to_bigwig/README Wed Aug 24 14:40:22 2011 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -Galaxy tool wrapper to generate BigWig coverage files from BAM files. BigWig -files can be displaye at UCSC directly from Galaxy. Allows user to split gapped -reads (particularly useful for RNA-Seq with large splice regions). - -Requirements ------------- -genomeCoverageBed - part of BedTools (http://code.google.com/p/bedtools/) -bedGraphToBigWig - from UCSC (http://hgdownload.cse.ucsc.edu/admin/exe/) - -This tool also uses the samtools fai fasta index files stored in Galaxy's shared -tool data directory. A sample version of this file is included for completeness. - -Installation ------------- - -1 - Install genomeCoverageBed and bedGraphToBigWig and make sure they in the PATH -2 - Copy bam_to_bigwig.xml to $GALAXY_HOME/tools/bam_to_bigwig -3 - Add the tool to the $GALAXY_HOME/tool_conf.xml tool-registry file diff -r ed97c3e7e0bd -r b8525303b945 bam_to_bigwig/bam_to_bigwig.xml --- a/bam_to_bigwig/bam_to_bigwig.xml Wed Aug 24 14:40:22 2011 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ - - Calculates coverage from a BAM alignment file - - genomeCoverageBed - bedGraphToBigWig - - - genomeCoverageBed -ibam $align -bg $split -g - `awk '($0 !~ /^#.*/) && ($2 == "$align.dbkey") {print $3}' ${GALAXY_DATA_INDEX_DIR}/sam_fa_indices.loc`.fai - > tmp.bedgraph; - bedGraphToBigWig tmp.bedgraph - `awk '($0 !~ /^#.*/) && ($2 == "$align.dbkey") {print $3}' ${GALAXY_DATA_INDEX_DIR}/sam_fa_indices.loc`.fai - $out; - - - - - - - - - - - - - - **What it does** - - Creates a coverage file in BigWig format, given a BAM alignment file. - - **Input** - - A BAM alignment file. This needs to have the genome database build used in alignment annotated. If your file has '?' for the database build, click on the pencil icon to edit the alignment attributes, and specify the organism used to align against. - - The BAM file must also be sorted. If you generated the BAM file in Galaxy, this will be true, however, if you uploaded the file, you must make sure it was sorted. - - **Output** - - BigWig files can be loaded directly from Galaxy into the UCSC browser. They can be loaded incrementally by UCSC, so a single file can be used to represent the entire genome without having to upload the entire thing as a custom track. - - - diff -r ed97c3e7e0bd -r b8525303b945 bam_to_bigwig/sam_fa_indices.loc.sample --- a/bam_to_bigwig/sam_fa_indices.loc.sample Wed Aug 24 14:40:22 2011 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -#This is a sample file distributed with Galaxy that enables tools -#to use a directory of Samtools indexed sequences data files. You will need -#to create these data files and then create a sam_fa_indices.loc file -#similar to this one (store it in this directory) that points to -#the directories in which those files are stored. The sam_fa_indices.loc -#file has this format (white space characters are TAB characters): -# -#index -# -#So, for example, if you had hg18 indexed stored in -#/depot/data2/galaxy/sam/, -#then the sam_fa_indices.loc entry would look like this: -# -#index hg18 /depot/data2/galaxy/sam/hg18.fa -# -#and your /depot/data2/galaxy/sam/ directory -#would contain hg18.fa and hg18.fa.fai files: -# -#-rw-r--r-- 1 james universe 830134 2005-09-13 10:12 hg18.fa -#-rw-r--r-- 1 james universe 527388 2005-09-13 10:12 hg18.fa.fai -# -#Your sam_fa_indices.loc file should include an entry per line for -#each index set you have stored. The file in the path does actually -#exist, but it should never be directly used. Instead, the name serves -#as a prefix for the index file. For example: -# -#index hg18 /depot/data2/galaxy/sam/hg18.fa -#index hg19 /depot/data2/galaxy/sam/hg19.fa diff -r ed97c3e7e0bd -r b8525303b945 sam_fa_indices.loc.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sam_fa_indices.loc.sample Wed Aug 24 14:43:09 2011 -0400 @@ -0,0 +1,28 @@ +#This is a sample file distributed with Galaxy that enables tools +#to use a directory of Samtools indexed sequences data files. You will need +#to create these data files and then create a sam_fa_indices.loc file +#similar to this one (store it in this directory) that points to +#the directories in which those files are stored. The sam_fa_indices.loc +#file has this format (white space characters are TAB characters): +# +#index +# +#So, for example, if you had hg18 indexed stored in +#/depot/data2/galaxy/sam/, +#then the sam_fa_indices.loc entry would look like this: +# +#index hg18 /depot/data2/galaxy/sam/hg18.fa +# +#and your /depot/data2/galaxy/sam/ directory +#would contain hg18.fa and hg18.fa.fai files: +# +#-rw-r--r-- 1 james universe 830134 2005-09-13 10:12 hg18.fa +#-rw-r--r-- 1 james universe 527388 2005-09-13 10:12 hg18.fa.fai +# +#Your sam_fa_indices.loc file should include an entry per line for +#each index set you have stored. The file in the path does actually +#exist, but it should never be directly used. Instead, the name serves +#as a prefix for the index file. For example: +# +#index hg18 /depot/data2/galaxy/sam/hg18.fa +#index hg19 /depot/data2/galaxy/sam/hg19.fa