# HG changeset patch # User qtrinh # Date 1352480428 18000 # Node ID 8ed4fe2456f053618e1eea5344105a98a85b2ec2 Uploaded diff -r 000000000000 -r 8ed4fe2456f0 fa_gc_content/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fa_gc_content/README Fri Nov 09 12:00:28 2012 -0500 @@ -0,0 +1,6 @@ + + +to setup, run perl setup.pl + + + diff -r 000000000000 -r 8ed4fe2456f0 fa_gc_content/gc_content.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fa_gc_content/gc_content.pl Fri Nov 09 12:00:28 2012 -0500 @@ -0,0 +1,23 @@ +#!/usr/bin/perl -w + +# usage : perl toolExample.pl + +open (IN, "<$ARGV[0]"); +open (OUT, ">$ARGV[1]"); +while () { + chop; + if (m/^>/) { + s/^>//; + if ($. > 1) { + print OUT sprintf("%.3f", $gc/$length) . "\n"; + } + $gc = 0; + $length = 0; + } else { + ++$gc while m/[gc]/ig; + $length += length $_; + } +} +print OUT sprintf("%.3f", $gc/$length) . "\n"; +close( IN ); +close( OUT ); diff -r 000000000000 -r 8ed4fe2456f0 fa_gc_content/gc_content.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fa_gc_content/gc_content.xml Fri Nov 09 12:00:28 2012 -0500 @@ -0,0 +1,22 @@ + + for each sequence in a file + gc_content.pl $input $output + + + + + + + + + + + + + + + +This tool computes GC content from a FASTA file. + + + diff -r 000000000000 -r 8ed4fe2456f0 fa_gc_content/setup.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fa_gc_content/setup.pl Fri Nov 09 12:00:28 2012 -0500 @@ -0,0 +1,21 @@ +#!/usr/bin/perl -w + +# make a backup +my $TOOL_XML="/mnt/galaxyTools/galaxy-central/tool_conf.xml"; +print "\nmaking backup of $TOOL_XML ..."; +system ("sudo cp $TOOL_XML $TOOL_XML.bak") || die ; +system ("sudo cp tool_conf.xml /mnt/galaxyTools/galaxy-central/") || die ; + +my $DIR="/mnt/galaxyTools/galaxy-central/tools/qtrinh"; +if (! -e $DIR) { + system ("sudo mkdir $DIR") || die ; +} + +system ("sudo cp gc_content.xml gc_content.pl $DIR") || die ; + +system ("sudo chown -R galaxy:galaxy $DIR") || die ; +system ("sudo chmod -R a+rx $DIR") || die ; + +print "\n\ndone setting up ... please restart Galaxy ...\n\n"; + + diff -r 000000000000 -r 8ed4fe2456f0 fa_gc_content/tool_conf.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fa_gc_content/tool_conf.xml Fri Nov 09 12:00:28 2012 -0500 @@ -0,0 +1,547 @@ + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+
+ + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+ + + + + +
+
+ + + + + + + + + + + + + + + + + +
+
+ +
+
+ +
+
+ + + + + + + + + + + + +
+
+ + + +
+
+ + + + + + + + + + + + +
+
+ + + + + + + + +
+ +
+ + + + + + + + + + +
+
+ + + + + + + + + + + + + + + s + + + +
+
+ + + +
+
+ + + + +
+
+ + + + + + +
+
+ + +
+
+ +
+
+ + + + + + +
+
+ + + + + + + + +
+ +
+
+ +
+
+
+ + + + + + + + + + + + +
+
+ + + + +
+
+
+
+ + + + + + + + + +
+
+
+
+ + + + +
+ +
+
+
+
+
+ + + + +
+
+ + + + + + + + + + + + + + + +
+ + +
+ + + + +
+ +