# HG changeset patch # User pjbriggs # Date 1422438601 18000 # Node ID 8b25779ee26120e86c51dc8a4be6d20edf529a1d Uploaded initial version to test toolshed. diff -r 000000000000 -r 8b25779ee261 README.markdown --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.markdown Wed Jan 28 04:50:01 2015 -0500 @@ -0,0 +1,39 @@ +CEASbw +====== + +XML and wrapper script for the Cistrome version of the CEAS package, which can be +used to annotate intervals and scores with genome features. + +In addition to the `ceas` program, the Cistrome version of the package includes the +`ceasBW` program which can handle + +The tool assumes that the `ceas` and `ceasBW` programs are on the Galaxy user's +path. The official CEAS website is at + + + +the Cistrome version can be found via + + + +To add to Galaxy add the following to tool_conf.xml: + + + +You also need to make a copy of the `ceas.loc` file (sample version is provided +here) which points to the available GDB files for different genomes. The GDB files +are essentially SQLite database files containing the RefSeq genes for the genome +in question. + +A limited number of GDB files are available for download from the CEAS website; to +make new ones, see the section "Build a sqlite3 file with a gene annotation table +and genome background annotation for CEAS" in the CEAS manual: + + + +The `ceas.loc` file should be placed in the `tool-data` directory of your Galaxy +installation. + +### Changes ### + +1.0.2-0: first version based on our original `ceas` tool. diff -r 000000000000 -r 8b25779ee261 ceasbw_wrapper.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ceasbw_wrapper.sh Wed Jan 28 04:50:01 2015 -0500 @@ -0,0 +1,78 @@ +#!/bin/sh -e +# +# Wrapper script to run CEASbw as a Galaxy tool +# +# Usage: ceasbw_wrapper.sh $BED_IN $GDB_IN $EXTRA_BED_IN $LOG_OUT $PDF_OUT $XLS_OUT $DBKEY +# +# Process command line +echo $* +BED_IN=$1 +GDB_IN=$2 +EXTRA_BED_IN=$3 +LOG_OUT=$4 +PDF_OUT=$5 +XLS_OUT=$6 +# +# Collect remaining args +CEAS=ceas +OPTIONS= +while [ ! -z "$7" ] ; do + if [ "$7" == "--bigwig" ] ; then + CEAS=ceasBW + fi + OPTIONS="$OPTIONS $7" + shift +done +# +# Convenience variables for local files +base_name="ceas" +log_file=${base_name}.log +r_script=${base_name}.R +pdf_report=${base_name}.pdf +xls_file=${base_name}.xls +# +# Get CEAS version +echo Running $CEAS +$CEAS --version >$log_file 2>/dev/null +# +# Construct and run CEAS command line +ceas_cmd="$CEAS --name $base_name $OPTIONS -g $GDB_IN -b $BED_IN" +if [ "$EXTRA_BED_IN" != "None" ] ; then + ceas_cmd="$ceas_cmd -e $EXTRA_BED_IN" +fi +echo "Running $ceas_cmd" +$ceas_cmd >>$log_file 2>&1 +# +# Move outputs to final destination +if [ -e $log_file ] ; then + echo "Moving $log_file to $LOG_OUT" + /bin/mv $log_file $LOG_OUT +else + echo ERROR failed to make log file >&2 + exit 1 +fi +if [ -e $xls_file ] ; then + echo "Moving $xls_file to $XLS_OUT" + /bin/mv $xls_file $XLS_OUT +else + echo ERROR failed to generate XLS file >&2 + exit 1 +fi +# +# Run the R script to generate the PDF report +if [ -e $r_script ] ; then + echo "Running $r_script to generate $pdf_report" + R --vanilla < $r_script + if [ -e $pdf_report ] ; then + echo "Moving $xls_file to $XLS_OUT" + /bin/mv $pdf_report $PDF_OUT + else + echo ERROR failed to generate PDF report >&2 + exit 1 + fi +else + echo ERROR no R script to generate PDF report >&2 + exit 1 +fi +# +# Done diff -r 000000000000 -r 8b25779ee261 ceasbw_wrapper.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ceasbw_wrapper.xml Wed Jan 28 04:50:01 2015 -0500 @@ -0,0 +1,73 @@ + + Annotate intervals and scores with genome features (cistrome CEAS) + ceasbw_wrapper.sh $bed_file $gdb_file $extra_bed_file $log_output $pdf_report $xls_output + #if (str($wig_file.ext) == 'bigwig') + --bigwig $wig_file + --length $GALAXY_DATA_INDEX_DIR/shared/ucsc/chrom/${bed_file.dbkey}.len + # else + --wig $wig_file + #end if + #if (str($span) and int(str($span)) > 0) + --span $span + #end if + --sizes $sizes_lower,$sizes_middle,$sizes_upper + --bisizes $bisizes_lower,$bisizes_upper + --pf-res $profiling_resolution + --rel-dist $relative_distance + + python_mysqldb + bx_python + cistrome_ceas + + + + + + + + + + + + + + + + + + + + + + + + + + +**What it does** + +CEAS (Cis-regulatory Element Annotation System) is a tool for characterizing genome-wide +protein-DNA interaction patterns from ChIP-chip and ChIP-Seq of both sharp and broad +binding factors. It provides statistics on ChIP enrichment at important genome features +such as specific chromosome, promoters, gene bodies, or exons, and infers genes most +likely to be regulated by a binding factor. + +CEAS also enables biologists to visualize the average ChIP enrichment signals over +specific genomic features, allowing continuous and broad ChIP enrichment to be perceived +which might be too subtle to detect from ChIP peaks alone. + +This tool is compatible with the ceasBW version of CEAS from the Cistrome package +obtained from + +https://bitbucket.org/cistrome/cistrome-applications-harvard/overview + +(commit id d8c0751, datestamp 20140929). The CEAS code is under the +published-packages/CEAS/ subdirectory. + +Cistrome data files and documentation can be found at + +http://liulab.dfci.harvard.edu/CEAS/index.html + +The CEAS user manual is available at http://liulab.dfci.harvard.edu/CEAS/usermanual.html + + diff -r 000000000000 -r 8b25779ee261 tool-data/ceas.loc.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool-data/ceas.loc.sample Wed Jan 28 04:50:01 2015 -0500 @@ -0,0 +1,17 @@ +#This is a sample file distributed with Galaxy that is used by the +#ceas tool. The ceas.loc file has this format (white space +#characters are TAB characters): +# +# +# +#For example: +# +#hg18 Human (hg18) /home/galaxy/genomes/ceaslib/GeneTable/hg18 +#mm9 Mouse (mm9) /home/galaxy/genomes/ceaslib/GeneTable/mm9 +#...etc... +# +# The GDB files are sqlite databases containing the RefSeq genes for +# the organism in question +# +#This file should be placed in galaxy's tool-data directory when the +#ceas tool is installed. diff -r 000000000000 -r 8b25779ee261 tool_data_table_conf.xml.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_data_table_conf.xml.sample Wed Jan 28 04:50:01 2015 -0500 @@ -0,0 +1,6 @@ + + + dbkey, name, value + +
+
\ No newline at end of file diff -r 000000000000 -r 8b25779ee261 tool_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Wed Jan 28 04:50:01 2015 -0500 @@ -0,0 +1,81 @@ + + + + + + https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.5.zip + $INSTALL_DIR/lib/python + + export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python && + python setup.py install --install-lib $INSTALL_DIR/lib/python --install-scripts $INSTALL_DIR/bin + + + $INSTALL_DIR/lib/python + $INSTALL_DIR/bin + + + + Installs Python module MySQLdb 1.2.5 + + + + + + +numpy==1.7.1 +bx-python==0.7.1 + + + $INSTALL_DIR + + + + + Installation of bx-python 0.7.1 along with numpy 1.7.1. The installation can be + accessed via BX_PYTHON_PATH. + + + + + + + + hg clone https://bitbucket.org/cistrome/cistrome-applications-harvard cistrome_ceas + + + hg update d8c0751 + + $INSTALL_DIR/lib/python + + cd published-packages/CEAS/ + export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python && + python setup.py install --install-lib $INSTALL_DIR/lib/python --install-scripts $INSTALL_DIR/bin + + + $INSTALL_DIR/lib/python + $INSTALL_DIR/bin + + + + Installs version 1.0.2 of CEAS from cistrome (commit id d8c0751, + datestamp 20140929), which includes ceasBW (a version of ceas which can + handle bigWig file input from MACS2. + + Cistrome code is at + https://bitbucket.org/cistrome/cistrome-applications-harvard/overview + + The CEAS code is under the published-packages/CEAS/ subdirectory + + Cistrome data files and documentation can be found at + http://liulab.dfci.harvard.edu/CEAS/index.html + + +