# HG changeset patch
# User vipints
# Date 1307484511 14400
# Node ID 45f3fa82369f156dd0d3e26e9007999a34dc725e
Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
diff -r 000000000000 -r 45f3fa82369f Wig_to_bedGraph/README
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Wig_to_bedGraph/README Tue Jun 07 18:08:31 2011 -0400
@@ -0,0 +1,41 @@
+INTRODUCTION
+
+A tool for converting data in wiggle fixedStep or variableStep format to four column bedGraph format
+
+CONTENTS
+
+galaxy: Contains tool configuration file in *.xml format.
+
+ Wig2bedGraph.xml
+
+t: Test data set. (move to your galaxy root folder/test-data/)
+
+ You may need to move the test files into your test-data directory so galaxy can find them.
+ If you want to run the functional tests eg as:
+
+ sh run_functional_tests.sh -id fml_wig2bed
+
+script: Perl based script.
+
+ wig2bedGraph_converter.pl: Read data in wiggle fixedStep and variableStep and convert to bedGraph format.
+
+REQUIREMENTS
+
+ Perl
+
+COMMENTS/QUESTIONS
+
+I can be reached at vipin.ts@tuebingen.mpg.de
+
+LICENSE
+
+Copyright (C) 2010 Friedrich Miescher Laboratory of the Max Planck Society
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+COURTESY
+
+Galaxy Team.
diff -r 000000000000 -r 45f3fa82369f Wig_to_bedGraph/galaxy/Wig2bedGraph.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Wig_to_bedGraph/galaxy/Wig2bedGraph.xml Tue Jun 07 18:08:31 2011 -0400
@@ -0,0 +1,65 @@
+
+ converter
+ wig2bedGraph_converter.pl $inf_wig > $bed_format
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**What it does**
+
+This tool converts data in wiggle fixedStep_ or variableStep_ format to four column bedGraph_ format.
+
+.. _fixedStep: http://genome.ucsc.edu/goldenPath/help/wiggle.html
+.. _variableStep: http://genome.ucsc.edu/goldenPath/help/wiggle.html
+.. _bedGraph: http://genome.ucsc.edu/goldenPath/help/bedgraph.html
+
+--------
+
+**Example**
+
+- The following data in wiggle fixedStep format::
+
+ track type=wiggle_0 name="ARTS+ chrY" description="ARTS - TSS Finder - chrY - positive strand" visibility=full autoScale=on color=0,200,100 maxHeightPixels=300:150:50 graphType=bar yLineMark=0 yLineOnOff=on smoothingWindow=2
+ fixedStep chrom=chrY start=1151 step=50
+ -1.17966
+ -0.56397
+ -0.79706
+ -0.99435
+ -1.11338
+ -1.23153
+
+- Will be converted to bedGraph format::
+
+ chrY 1150 1151 -1.17966
+ chrY 1200 1201 -0.56397
+ chrY 1250 1251 -0.79706
+ chrY 1300 1301 -0.99435
+ chrY 1350 1351 -1.11338
+ chrY 1400 1401 -1.23153
+
+--------
+
+**About formats**
+
+**Wiggle (variableStep)** The data is introduced by a line beginning with the keyword "variableStep", and the arguments "chrom" and "span", which indicate the chromosome on which the features are located, and the width of each feature, in base pairs. This is followed by a series of two-element lines indicating the start position of each feature, and its quantitative value. Values can be any sort of numeric data, including integers, negative numbers and floating point.
+
+**Wiggle (fixedStep)** The data is introduced by a line beginning with the keyword "fixedStep", and the arguments "chrom", "span", "start" and "step". The first two arguments are the same as wiggle variableStep, while "start" and "step" indicate the starting position of the first feature, and the spacing between each feature. This is followed by a numeric value for each step.
+
+**bedGraph** There are four required fields: ref_sequence,start,end and score. Note that here the coordinates are "zero-indexed", half open, which means the start coordinate is zero-indexed and the end coordinate is 1-indexed.
+
+--------
+
+This tool is a part of the **MLB Group at Friedrich Miescher Laboratory of the Max Planck Society**. Copyright (C) 2010-2011 Max Planck Society
+
+
diff -r 000000000000 -r 45f3fa82369f Wig_to_bedGraph/script/wig2bedGraph_converter.pl
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Wig_to_bedGraph/script/wig2bedGraph_converter.pl Tue Jun 07 18:08:31 2011 -0400
@@ -0,0 +1,62 @@
+#!/usr/bin/env perl
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# Written (W) 2010 Vipin T. Sreedharan, Friedrich Miescher Laboratory of the Max Planck Society
+# Copyright (C) 2010 Max Planck Society
+#
+# Description: - read fixedStep and variableStep wiggle input data,
+# output four column bedGraph format data
+
+use warnings;
+use strict;
+
+my ($position, $chr, $step, $span) = (0, "", 1, 1);
+
+my $usage = q(
+fixedStep2BED.pl - Program to convert a valid fixedStep or variableStep wiggle input data to BED format.
+USAGE: wig2bedGraph_converter >