# HG changeset patch
# User Franco Caramia
# Date 1401780688 -36000
# Node ID c361b3fb806ec7722de32365fe38b6eb79baaa9f
# Parent 6bcf47cc272a8ca703cedc177624cc646bfea0d4
added Nicola Path 2.0
diff -r 6bcf47cc272a -r c361b3fb806e contra.xml
--- a/contra.xml Mon May 19 20:00:44 2014 -0400
+++ b/contra.xml Tue Jun 03 17:31:28 2014 +1000
@@ -2,8 +2,10 @@
: Copy Number Analysis for Targeted Resequencing
bedtools
- samtools
- contra
+ samtools
+ R
+ contra
+
diff -r 6bcf47cc272a -r c361b3fb806e contra_wrapper.pl
--- a/contra_wrapper.pl Mon May 19 20:00:44 2014 -0400
+++ b/contra_wrapper.pl Tue Jun 03 17:31:28 2014 +1000
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use FindBin;
+use Find;
use File::Path qw(make_path);
use File::Spec;
@@ -22,7 +22,7 @@
{
my $variable = $tmp[1];
$variable =~ s/=/ /g;
- print "$variable\n";
+
$player_options = "$player_options $variable";
}
elsif($tmp[0] eq "CONTRAOUTPUT")
@@ -40,52 +40,28 @@
}
-my $working_dir = "CONTRA_OUTPUT";
+
+my $working_dir = File::Spec->catfile($contra_dir, 'CONTRA_OUTPUT');
make_path($contra_dir);
#remove extension
-#run contra
-system(File::Spec->catfile($FindBin::Bin, 'contra.py') . " -o $working_dir $player_options > /dev/null 2>&1");
+my $cmd = "contra.py -o $working_dir $player_options";
+print "Command to be executed: $cmd\n";
+system($cmd);
#set html
#print "$contra_output - $working_dir\n";
open(HTML, ">$contra_output");
print HTML "Contra: Copy Number Analysis for Targeted ResequencingContra Output Files:
\n";
-move_files($working_dir);
+find({wanted => \&add_file, preprocess => sub {sort @_}}, $working_dir);
print HTML "
\n";
close(HTML);
-sub move_files
-{
- my $local_dir = $_[0];
- opendir(DIR, $local_dir);
- #print ("Openning: $local_dir\n");
- my @FILES= readdir(DIR);
- closedir(DIR);
- foreach my $file (@FILES)
- {
- if ($file eq "." || $file eq "..")
- {
- #print ("./ or ../ skipped\n");
- }
- elsif (-d "$local_dir/$file")
- {
- #print ("moving to: $local_dir/$file\n");
- move_files("$local_dir/$file");
- }
- elsif (-f "$local_dir/$file")
- {
- #print ("mv $local_dir/$file $contra_dir\n");
- print HTML "$file\n";
- system ("mv $local_dir/$file $contra_dir");
- }
- else
- {
- die("Unrecognized file generated: $file\n");
- }
-
-
- }
-
+sub add_file {
+ if (-f $File::Find::name) {
+ my $rel_path = File::Spec->abs2rel($File::Find::name, $working_dir);
+ print ("adding $rel_path\n");
+ print HTML "$rel_path\n";
+ }
}
diff -r 6bcf47cc272a -r c361b3fb806e tool_dependencies.xml
--- a/tool_dependencies.xml Mon May 19 20:00:44 2014 -0400
+++ b/tool_dependencies.xml Tue Jun 03 17:31:28 2014 +1000
@@ -1,44 +1,28 @@
+
+
+
+
+
-
-
- http://sourceforge.net/projects/samtools/files/samtools/0.1.18/samtools-0.1.18.tar.bz2
- sed -i.bak -e 's/-lcurses/-lncurses/g' Makefile
- make
-
-
- $INSTALL_DIR/bin
-
-
-
- $INSTALL_DIR/bin
-
-
- $INSTALL_DIR/bin
-
-
-
-
- Compiling SAMtools requires the ncurses and zlib development libraries.
-
+
-
-
- http://bedtools.googlecode.com/files/BEDTools.v2.17.0.tar.gz
- make all
- $INSTALL_DIR/bin
-
- bin
- $INSTALL_DIR/bin
-
-
- $INSTALL_DIR/bin
-
-
+
+ http://bedtools.googlecode.com/files/BEDTools.v2.17.0.tar.gz
+ make all
+ $INSTALL_DIR/bin
+
+ bin
+ $INSTALL_DIR/bin
+
+
+ $INSTALL_DIR/bin
+
+
GCC version 4.1 or greater is recommended. 3.x versions will typically not compile BEDTools. g++ required
@@ -48,13 +32,7 @@
http://downloads.sourceforge.net/project/contra-cnv/CONTRA.V2.0/CONTRA.v2.0.4.tar.gz
- rm -rf bedtools_installation_guide.txt
- rm -rf BEDTools-User-Manual.v4.pdf
- rm -rf BEDTools.v2.11.2.tar.gz
- rm -rf CONTRA_User_Guide.2.0.pdf
- $INSTALL_DIR/bin
- $INSTALL_DIR/bin/scripts
-
+
$INSTALL_DIR/bin
@@ -62,7 +40,7 @@
$INSTALL_DIR/bin
-
+
scripts
$INSTALL_DIR/bin/scripts