#
#
-# 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
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
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