Fixed directories to be more general and easy to set via the environment variable:
authorTim Reddy Tim <treddy@hudsonalpha.org>
Thu, 14 Aug 2008 18:59:40 +0000 (18:59 +0000)
committerTim Reddy Tim <treddy@hudsonalpha.org>
Thu, 14 Aug 2008 18:59:40 +0000 (18:59 +0000)
HTSW_ANALYSIS_DIR

htswanalysis/scripts/CollectLibraries.pm
htswanalysis/scripts/LibrariesMakefile
htswanalysis/scripts/RecompileLibraries.pm

index 677c6e74917cf38a0a54d2d4c4d9a185062bab8b..84cf5f0a85a47bec91462f6ede7b6a42a5f2128e 100755 (executable)
@@ -3,7 +3,9 @@
 use strict;
 use warnings;
 
-my @libs = `ls -1d Flowcells/**/*.align*.txt`;
+my $data_dir = shift;
+
+my @libs = `ls -1d $data_dir/Flowcells/**/*.align*.txt`;
 
 my %libraries;
 
index 8b882e2448a75a6697a51e9545bb1aa910768fc1..c92678d68a9b03b1999c9bdae517e12b09a45695 100644 (file)
 # 
 
 #
-# ROOT_DIR is the location of all the programs used
+# HTSW_ANALYSIS_ROOT is the location of all the programs used and 
+#    should be defined in the environment
 # DATA_DIR is the base directory of the flowcells repoitory
 #
-ROOT_DIR=/Users/ENCODE/htsworkflow/htswanalysis
+ROOT_DIR=$(HTSW_ANALYSIS_ROOT)
 DATA_DIR=/Users/Data
 HTML_DIR=/Library/WebServer/Documents/SequencingSummaries
 
@@ -27,7 +28,7 @@ QPCR_FILES=$(shell ls -1d $(DATA_DIR)/Flowcells/**/*.align*.txt 2>> LibrariesMak
 COUNT_FILES=$(shell ls -1d $(DATA_DIR)/Flowcells/**/*.align*.txt 2>> LibrariesMakefile.err | sed -e s/txt/txt.count/)
 CMPLX_FILES=$(shell ls -1d $(DATA_DIR)/Flowcells/**/*.align*.txt 2>> LibrariesMakefile.err | sed -e s/txt/txt.complexity/)
 PROFILE_FILES=$(shell ls -1d $(DATA_DIR)/Flowcells/**/*.align*.txt 2>> LibrariesMakefile.err | sed -e s/txt/txt.profile/)
-LIBFILES=$(shell ls -1d $(DATA_DIR)/Libraries/.*.config 2>> LibrariesMakefile.err | sed -e s/config/txt/ -e "s/\/./\//")
+LIBFILES=$(shell ls -1d $(DATA_DIR)/Libraries/.*.config 2>> LibrariesMakefile.err | sed -e s/config/txt/ -e "s/\/\./\//")
 
 all: $(QPCR_FILES) $(COUNT_FILES) $(FILES) qPCR_summary.txt LibraryInfo.xml $(LIBFILES) SequencingSummary.html Distribute
 
@@ -53,8 +54,8 @@ qPCR_summary.txt: $(QPCR_FILES)
        cat qPCR_summary.txt | sort -k 2,1 -g -r > t; mv t qPCR_summary.txt;
 
 LibraryInfo.xml: $(COUNT_FILES) $(CMPLX_FILES)
-       $(ROOT_DIR)/scripts/CollectLibraries.pm > LibraryInfo.xml
-       $(ROOT_DIR)/scripts/RecompileLibraries.pm LibraryInfo.xml
+       $(ROOT_DIR)/scripts/CollectLibraries.pm $(DATA_DIR) > LibraryInfo.xml
+       $(ROOT_DIR)/scripts/RecompileLibraries.pm LibraryInfo.xml $(DATA_DIR)
 
 SequencingSummary.html: LibraryInfo.xml
        $(ROOT_DIR)/scripts/SummarizeLibrary.pm LibraryInfo.xml > SequencingSummary.html
index 3024162b232992d8a5e7b56c9be6e5f277607786..23d740ab08583181110dee537700024db6018dcd 100755 (executable)
@@ -5,11 +5,12 @@ use warnings;
 
 use XML::Simple;
 
-my $REPODIR = '/Users/Data/Libraries';
-
 my $xml_file = shift;
 my $xml = XMLin($xml_file, ForceArray => 1);
 
+my $data_dir = shift;
+my $REPODIR = $data_dir.'/Libraries';
+
 my @new_libraries;
 my @updated_libraries;