Next changeset 1:cb4f92e6fd4e (2015-08-26) |
Commit message:
planemo upload for repository https://github.com/bxlab/galaxy_tools/suites/suite_hifive commit abaefa638db82abe90f335d783c9503dce28944f-dirty |
added:
hifive.xml hifive_macros.xml readme.rst tool_dependencies.xml |
b |
diff -r 000000000000 -r 0a9c76d80e33 hifive.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hifive.xml Fri Jun 05 14:09:00 2015 -0400 |
[ |
b'@@ -0,0 +1,390 @@\n+<?xml version="1.0"?>\n+<tool id="hifive" name="hifive" version="@WRAPPER_VERSION@.0">\n+\t<description>manipulate, analyze, and plot HiC and 5C chromatin interaction data</description>\n+\t<macros>\n+\t\t<import>hifive_macros.xml</import>\n+\t</macros>\n+\t<expand macro="requirements"/>\n+\t<expand macro="stdio"/>\n+\t<command><![CDATA[\n+hifive\n+\n+$command.command_select\n+\n+#if str( $command.command_select ) == "hic-complete":\n+\t@HIC_NORMALIZE@\n+\t@HIC_FEND@\n+\t@HIC_SEQUENCE@\n+\t@HIC_CHROMOSOMES@\n+\t@HIC_PROJECT@\n+\t@HIC_RANGE@\n+\t-o $hic_comp_fends $hic_comp_data $hic_comp_project\n+#end if\n+#if str( $command.command_select ) == "fends":\n+\t@HIC_FEND@\n+\t$hic_fend_output\n+#end if\n+#if str( $command.command_select ) == "hic-data":\n+\t@HIC_SEQUENCE@\n+\t$fends $hic_data_output\n+#end if\n+#if str( $command.command_select ) == "hic-project":\n+\t@HIC_CHROMOSOMES@\n+\t@HIC_PROJECT@\n+\t@HIC_RANGE@\n+\t$hic_data $hic_project_output\n+#end if\n+#if str( $command.command_select ) == "hic-normalize":\n+\t@HIC_NORMALIZE@\n+\t@HIC_CHROMOSOMES@\n+\t@HIC_RANGE@\n+\t-o $hic_norm_output\n+\t$hic_project\n+#end if\n+#if str( $command.command_select ) == "hic-heatmap":\n+\t@HIC_CHROMOSOMES@\n+\t$command.trans1\n+\t@BINSIZE@\n+\t@HIC_DATATYPE@\n+\t@HIC_DYNAMIC@\n+ #if str( $command.image.generate ) == "yes":\n+\t\t@IMAGE@\n+\t\t-i $hic_hm_image\n+\t#end if\n+\t$hic_project $hic_hm_output\n+#end if\n+#if str( $command.command_select ) == "hic-interval":\n+\t-c $command.chrom\n+\t#if $command.start:\n+ -s $command.start\n+ #end if\n+ #if $command.stop:\n+ -e $command.stop\n+ #end if\n+ #if $command.maxdist:\n+ -m $command.maxdist\n+ #end if\n+\t@BINSIZE@\n+\t@HIC_DATATYPE@\n+\t@HIC_DYNAMIC@\n+ #if str( $command.image.generate ) == "yes":\n+\t\t@IMAGE@\n+\t\t@ROTATE@\n+\t\t-i $hic_int_image\n+\t#end if\n+\t$hic_project $hic_int_output\n+#end if\n+#if str( $command.command_select ) == "5c-complete":\n+\t@5C_NORMALIZE@\n+\t@5C_SEQUENCE@\n+\t@5C_REGIONS@\n+\t@5C_PROJECT@\n+\t@5C_RANGE@\n+\t-o $fivec_comp_frags $fivec_comp_data $fivec_comp_project\n+\t@5C_FRAGMENT@\n+#end if\n+#if str( $command.command_select ) == "fragments":\n+\t@5C_FRAGMENT@\n+\t$fivec_frag_output\n+#end if\n+#if str( $command.command_select ) == "5c-data":\n+\t@5C_SEQUENCE@\n+\t$fragments $fivec_data_output\n+#end if\n+#if str( $command.command_select ) == "5c-project":\n+\t@5C_REGIONS@\n+\t@5C_PROJECT@\n+\t@5C_RANGE@\n+\t$fivec_data $fivec_project_output\n+#end if\n+#if str( $command.command_select ) == "5c-normalize":\n+\t@5C_NORMALIZE@\n+\t@5C_REGIONS@\n+\t@5C_RANGE@\n+\t-o $fivec_norm_output\n+\t$fivec_project\n+#end if\n+#if str( $command.command_select ) == "5c-heatmap":\n+\t@5C_REGIONS@\n+\t$command.trans2\n+\t@BINSIZE@\n+\t@5C_DATATYPE@\n+\t@5C_DYNAMIC@\n+ #if str( $command.image.generate ) == "yes":\n+\t\t@IMAGE@\n+\t\t-i $fivec_hm_image\n+\t#end if\n+\t$fivec_project $fivec_hm_output\n+#end if\n+#if str( $command.command_select ) == "5c-interval":\n+\t-c $command.region \n+\t#if $command.start:\n+ -s $command.start\n+ #end if\n+ #if $command.stop:\n+ -e $command.stop\n+ #end if\n+\t@BINSIZE@\n+\t@5C_DATATYPE@\n+\t@5C_DYNAMIC@\n+ #if str( $command.image.generate ) == "yes":\n+\t\t@IMAGE@\n+\t\t@ROTATE@\n+\t\t-i $fivec_int_image\n+\t#end if\n+\t$fivec_project $fivec_int_output\n+#end if\n+ -q\n+\n+\t\t]]></command>\n+\t<inputs>\n+\t\t<conditional name="command">\n+\t\t\t<param name="command_select" type="select" label="Select action to perform">\n+\t\t\t\t<option value="hic-complete">Complete HiC analysis</option>\n+\t\t\t\t<option value="5c-complete">Complete 5C analysis</option>\n+\t\t\t\t<option value="fends">Create HiC fend set</option>\n+\t\t\t\t<option value="hic-data">Create HiC data set</option>\n+\t\t\t\t<option value="hic-project">Create HiC project</option>\n+\t\t\t\t<option value="hic-normalize">Normalize HiC project</option>\n+\t\t\t\t<option value="hic-heatmap">Create HiC heatmap set</option>\n+\t\t\t\t<option value="hic-interval">Extract HiC interval</option>\n+\t\t\t\t<option value="fragments">Create 5C fragment set</option>\n+\t\t\t\t<option value="5c-data">Create 5C data set</option>\n+\t\t\t\t<option value="5c-project">Create 5C project<'..b'command["command_select"] == "fends")</filter>\n+ </data>\n+ <data format="h5" name="hic_data_output" label="${tool.name} on ${on_string}: HiC data">\n+ \t<filter>(command["command_select"] == "hic-data")</filter>\n+ </data>\n+ <data format="h5" name="hic_project_output" label="${tool.name} on ${on_string}: HiC project">\n+ \t<filter>(command["command_select"] == "hic-project")</filter>\n+ </data>\n+ <data format="h5" name="hic_norm_output" label="${tool.name} on ${on_string}: HiC project ${command.analysis.algorithm}">\n+ \t<filter>(command["command_select"] == "hic-normalize")</filter>\n+ </data>\n+ <data format="h5" name="hic_hm_output" label="${tool.name} on ${on_string}: HiC heatmap HDF5">\n+ \t<filter>(command["command_select"] == "hic-heatmap")</filter>\n+ </data>\n+ <data format="png" name="hic_hm_image" label="${tool.name} on ${on_string}: HiC heatmap PNG">\n+ \t<filter>(command["command_select"] == "hic-heatmap")</filter>\n+ <filter>(command["image"]["generate"] == "yes")</filter>\n+ </data>\n+ <data format="chrint" name="hic_int_output" label="${tool.name} on ${on_string}: HiC interval">\n+ \t<filter>(command["command_select"] == "hic-interval")</filter>\n+ </data>\n+ <data format="png" name="hic_int_image" label="${tool.name} on ${on_string}: HiC interval PNG">\n+ \t<filter>(command["command_select"] == "hic-interval")</filter>\n+ <filter>(command["image"]["generate"] == "yes")</filter>\n+ </data>\n+ <data format="h5" name="fivec_comp_frags" label="${tool.name} on ${on_string}: 5C frags">\n+ \t<filter>(command["command_select"] == "5c-complete")</filter>\n+ </data>\n+ <data format="h5" name="fivec_comp_data" label="${tool.name} on ${on_string}: 5C data">\n+ \t<filter>(command["command_select"] == "5c-complete")</filter>\n+ </data>\n+ <data format="h5" name="fivec_comp_project" label="${tool.name} on ${on_string}: 5C project ${command.analysis.algorithm}">\n+ \t<filter>(command["command_select"] == "5c-complete")</filter>\n+ </data>\n+ <data format="h5" name="fivec_frag_output" label="${tool.name} on ${on_string}: 5C frags">\n+ \t<filter>(command["command_select"] == "fragments")</filter>\n+ </data>\n+ <data format="h5" name="fivec_data_output" label="${tool.name} on ${on_string}: 5C data">\n+ \t<filter>(command["command_select"] == "5c-data")</filter>\n+ </data>\n+ <data format="h5" name="fivec_project_output" label="${tool.name} on ${on_string}: 5C project">\n+ \t<filter>(command["command_select"] == "5c-project")</filter>\n+ </data>\n+ <data format="h5" name="fivec_norm_output" label="${tool.name} on ${on_string}: 5C project ${command.analysis.algorithm}">\n+ \t<filter>(command["command_select"] == "5c-normalize")</filter>\n+ </data>\n+ <data format="h5" name="fivec_hm_output" label="${tool.name} on ${on_string}: 5C heatmap HDF5">\n+ \t<filter>(command["command_select"] == "5c-heatmap")</filter>\n+ </data>\n+ <data format="png" name="fivec_hm_image" label="${tool.name} on ${on_string}: 5C heatmap PNG">\n+ \t<filter>(command["command_select"] == "5c-heatmap")</filter>\n+ <filter>(command["image"]["generate"] == "yes")</filter>\n+ </data>\n+ <data format="chrint" name="fivec_int_output" label="${tool.name} on ${on_string}: 5C interval">\n+ \t<filter>(command["command_select"] == "5c-interval")</filter>\n+ </data>\n+ <data format="png" name="fivec_int_image" label="${tool.name} on ${on_string}: 5C interval PNG">\n+ \t<filter>(command["command_select"] == "5c-interval")</filter>\n+ <filter>(command["image"]["generate"] == "yes")</filter>\n+ </data>\n+ </outputs>\n+ <tests>\n+ </tests>\n+ <help><![CDATA[\n+@COMMAND_HELP@\n+@HIC_HELP@\n+@5C_HELP@\n+]]></help>\n+</tool>\n' |
b |
diff -r 000000000000 -r 0a9c76d80e33 hifive_macros.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hifive_macros.xml Fri Jun 05 14:09:00 2015 -0400 |
[ |
b'@@ -0,0 +1,816 @@\n+<?xml version="1.0"?>\n+<macros>\n+ <xml name="requirements">\n+ <requirements>\n+ <requirement type=\'package\' version="1.0.3">hifive</requirement>\n+ <yield/>\n+ </requirements>\n+ </xml>\n+ <token name="@WRAPPER_VERSION@">0.1</token>\n+ <xml name="stdio">\n+ <stdio>\n+ <!-- Anything other than zero is an error -->\n+ <exit_code range="1:"/>\n+ <exit_code range=":-1"/>\n+ <!-- In case the return code has not been set propery check stderr too -->\n+ <regex match="Error:"/>\n+ <regex match="Exception:"/>\n+ </stdio>\n+ </xml>\n+ <token name="@HIC_FEND@">\n+-B $command.bed\n+ </token>\n+ <xml name="hic_fend_xml">\n+ <!-- Options controlling fend file creation -->\n+ <param format="bed" name="bed" type="data" label="RE Cutsite BED File" optional="False"/>\n+ </xml>\n+ <token name="@HIC_SEQUENCE@">\n+-i $command.insert\n+#if str( $command.datafile.format ) == "bam":\n+ #for $bam_file in $command.datafile.paired_bam:\n+ --bam ${bam_file.readend1} ${bam_file.readend2}\n+ #end for\n+#elif str( $command.datafile.format ) == "mat":\n+ --mat ${command.datafile.mat}\n+#else:\n+ #for raw_file in $command.datafile.raw_files:\n+ --raw ${raw_file.raw}\n+ #end for\n+#end if\n+ </token>\n+ <xml name="hic_sequence_xml">\n+ <!-- Options controlling hic sequence data input -->\n+ <conditional name="datafile">\n+ <param name="format" type="select" label="Data Format">\n+ <option value="bam">bam</option>\n+ <option value="mat">mat</option>\n+ <option value="raw">raw</option>\n+ </param>\n+ <when value="bam">\n+ <repeat name="paired_bam" title="Sequencing lane" min="1">\n+ <param format="bam" name="readend1" label="First read end" type="data"/>\n+ <param format="bam" name="readend2" label="Second read end" type="data"/>\n+ </repeat>\n+ </when>\n+ <when value="mat">\n+ <param format="tabular" name="mat" type="data" label="Mat file" optional="False"/>\n+ </when>\n+ <when value="raw">\n+ <repeat name="raw_files" title="Raw file" min="1">\n+ <param format="tabular" name="raw" type="data" label="Raw file" optional="False"/>\n+ </repeat>\n+ </when>\n+ </conditional>\n+ <param type="integer" name="insert" value="500" label="Maximum insert size" optional="False">\n+ <validator type="in_range" min="1"/>\n+ </param>\n+ </xml>\n+ <token name="@HIC_PROJECT@">\n+-f $command.minint\n+-j $command.minbin\n+-n $command.numbin\n+ </token>\n+ <xml name="hic_project_xml">\n+ <!-- Options controlling hic project creation -->\n+ <param type="integer" name="minint" value="20" label="Minimum interactions per fend" optional="False">\n+ <validator type="in_range" min="1"/>\n+ </param>\n+ <param type="integer" name="minbin" value="1000" label="Minimum distance bin cutoff" optional="False">\n+ <validator type="in_range" min="1"/>\n+ </param>\n+ <param type="integer" name="numbin" value="100" label="Number of distance bins" optional="False" help="A value of zero indicates that finding the distance dependence function should be skipped.">\n+ <validator type="in_range" min="0"/>\n+ </param>\n+ </xml>\n+ <token name="@HIC_RANGE@">\n+-m $command.filtermin\n+-x $command.filtermax\n+ </token>\n+ <xml name="hic_range_xml">\n+ <!-- Options controlling hic interaction size range limits -->\n+ <param type="integer" name="filtermin" value="1000000" label="Minimum interaction distance" optional="False" help="The minimum interaction distance included for filtering fends and learning correction values.">\n+ <validator type="in_range" mi'..b' Each parameter has a number of bins specified to divide it into and can be partitioned according to its type to contain approximately equal numbers of fends (\'even\'), or to cover equal portions of the range of parameter values (\'fixed\'). In addition, parameter types can include the \'-const\' suffix to denote a parameter that should not be optimized after seeding.\n+\n+]]></token>\n+ <token name="@5C_HELP@"><![CDATA[\n+5C genomic partitioning - fragment file\n+---------------------------------------\n+\n+A bed file containing targeted restriction enzyme fragment boundaries is converted into an hdf5-type fragment file of fragment characteristics. In addition to coordinates, strand, and chromosome information, additional columns can be included containing other fragment characteristics, such as GC content. If additional columns are included, they must be labeled in the header with a label containing no spaces or commas. These names can be used with the binning algorithm to include the fragment characteristic in the model to be learned.\n+\n+5C data\n+-------\n+\n+Reads are loaded and paired with the specified fragment file, creating a HiFive dataset object. Data can be a series of paired-end bam files or a tabular format list of paired fragments and their observed read count (fragment1 fragment2 count).\n+\n+5C project\n+----------\n+\n+Fragments are filtered in an iterative manner using the minimum interaction cutoff and interaction size parameters specified to ensure that all valid fragments have at least the minimum number of interactions with other valid fragments. Subsequently, a distance dependence approximation line is calculated using a regression line to approximate the linear relationship between log(# reads) and log(distance).\n+\n+5C normalization\n+----------------\n+\n+Corrections values are learned for either each valid fragment, ranges of fragment characteristics, or both. The \'probability\' and \'express\' algorithms learn correction values associated with each fragment while the \'binning\' algorithm learns fragment characteristic corrections. These can be chained together in either order to produce more robust corrections.\n+\n+The probability algorithm assumes non-zero counts to distributed according to a log-normal distribution with each interaction having a mean equal to the distance-depedence predicted signal times each of the interaction fragment correction parameters and a universal sigma value. Using the probability algorithm, learning is done using a backtracking line gradient descent approach. Learning proceeds for up to the maximum number of iterations but is terminated early if all of the absolute gradient values fall below the cutoff threshold. At each step, the learning rate is scaled down by the step value if the current learning rate does not produce sufficient improvement as measured by the Arjimo criterion.\n+\n+The express algorithm is a variant of matrix balancing and approximates the corrections through an iterative norm-2 adjustment to given all fragments a mean ratio of one for valid counts versus predicted signal from distance-dependence. This can be done using intra-regional interactions, inter-regional interactions, or all interactions.\n+\n+The binning algorithm divides each model parameter into some number of bins and based on a log-normal distribution, correction values for each bin are learned, maximizing the log-likelihood of the data. Model parameters can be the fragment lengths (\'len\') and any other characteristics passed as additional columns (with header labels) in the bed file used to create the HiFive fragment file. Each parameter has a number of bins specified to divide it into and can be partitioned according to its type to contain approximately equal numbers of fragments (\'even\'), or to cover equal portions of the range of parameter values (\'fixed\'). In addition, parameter types can include the \'-const\' suffix to denote a parameter that should not be optimized after seeding.\n+\n+]]></token>\n+</macros>\n' |
b |
diff -r 000000000000 -r 0a9c76d80e33 readme.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/readme.rst Fri Jun 05 14:09:00 2015 -0400 |
b |
@@ -0,0 +1,68 @@ +============================= +Galaxy wrapper for HiFive +============================= + +This wrapper allows use of the hifive package, a set of tools for handling HiC +and 5C data, on Galaxy. This includes managing data from mapped reads, either +in bam, mat, or raw formats. All stages use hdf5 dictionaries for fast access +and minimal memory and storage usage. + +This toolset includes methods for normalizing data from either HiC or 5C +experiments at the fragment-end, or fragment level resolution, respectively. +Once normalized, data can be used for plotting, binning, or other statistical +tests within the package very quickly. + +Original documentation can be found `here <http://hifive.docs.taylorlab.org/en/latest/>`_. + +Automated Installation +====================== + +Galaxy should be able to automatically install the dependencies, i.e. the +``h5py`` and ``hifive`` tool depedency packages. + +Manual Installation +=================== + +For those not using Galaxy's automated installation from the Tool Shed, put +the XML and Python files in the ``tools/hifive/`` folder and add the +XML files to your ``tool_conf.xml`` as normal. For example, use:: + + <section name="HiFive" id="hifive_tools"> + <tool file="hifive/complete_hic_project.xml" /> + <tool file="hifive/create_hic_fendset.xml" /> + <tool file="hifive/create_hic_dataset.xml" /> + <tool file="hifive/create_hic_project.xml" /> + <tool file="hifive/learn_hic_normalization.xml" /> + <tool file="hifive/create_hic_heatmap.xml" /> + <tool file="hifive/get_interval_hic_data.xml" /> + <tool file="hifive/complete_fivec_project.xml" /> + <tool file="hifive/create_fivec_fragmentset.xml" /> + <tool file="hifive/create_fivec_dataset.xml" /> + <tool file="hifive/create_fivec_project.xml" /> + <tool file="hifive/learn_fivec_normalization.xml" /> + <tool file="hifive/create_fivec_heatmap.xml" /> + <tool file="hifive/get_interval_fivec_data.xml" /> + </section> + + +================ +Wrapper Licence +================ + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. |
b |
diff -r 000000000000 -r 0a9c76d80e33 tool_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Fri Jun 05 14:09:00 2015 -0400 |
b |
@@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<tool_dependency> + <package name="scipy" version="0.12.0"> + <repository changeset_revision="cfbbe183f8a7" name="package_scipy_0_12" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" /> + </package> + <package name="numpy" version="1.7.1"> + <repository changeset_revision="8b3a5c7061d8" name="package_numpy_1_7" owner="iuc" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" /> + </package> + <package name="cython" version="0.20.1"> + <repository changeset_revision="c3a8c46fcb97" name="package_cython_0_20_1" owner="iuc" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" /> + </package> + <package name="h5py" version="2.5.0"> + <repository changeset_revision="cc1a2aae5057" name="package_h5py_2_5_0" owner="sauria" toolshed="https://toolshed.g2.bx.psu.edu" /> + </package> + <package name="hifive" version="1.0.3"> + <repository changeset_revision="8cecdadaf46e" name="package_hifive_1_0_3" owner="sauria" toolshed="https://toolshed.g2.bx.psu.edu" /> + </package> +</tool_dependency> |