-GenericBackground needs to be downloaded from somewhere. (TODO).
+GenericBackground is currently downloaded using wget from a makefile. Can be changed later to be more general.
+Also, this has the GenericBackgound location hardcoded, and hosted at Stanford. This is not terrible, but we
+should identify a better and more permanenet way to distribute this file.
# ROOT_DIR is the location of all the programs used
# DATA_DIR is the base directory of the flowcells repoitory
#
-ROOT_DIR=/Users/ENCODE/svn_test/htsworkflow/htswanalysis
-DATA_DIR=/Users/Data/
-HTML_DIR=/Library/WebServer/Documents/SequencingSummaries/
+ROOT_DIR=/Users/ENCODE/htsworkflow/htswanalysis
+DATA_DIR=/Users/Data
+HTML_DIR=/Library/WebServer/Documents/SequencingSummaries
-FILES=$(shell ls -1d $(DATA_DIR)/Flowcells/**/*.align*.txt)
-QPCR_FILES=$(shell ls -1d $(DATA_DIR)/Flowcells/**/*.align*.txt | sed -e s/txt/txt.qPCR/)
-COUNT_FILES=$(shell ls -1d $(DATA_DIR)/Flowcells/**/*.align*.txt | sed -e s/txt/txt.count/)
-CMPLX_FILES=$(shell ls -1d $(DATA_DIR)/Flowcells/**/*.align*.txt | sed -e s/txt/txt.complexity/)
-PROFILE_FILES=$(shell ls -1d $(DATA_DIR)/Flowcells/**/*.align*.txt | sed -e s/txt/txt.profile/)
-LIBFILES=$(shell ls -1d $(DATA_DIR)/Libraries/.*.config | sed -e s/config/txt/ -e "s/\/./\//")
+# Error messages are collected so as not to bug the user. (if there are no matching files, ls errors.)
+FILES=$(shell ls -1d $(DATA_DIR)/Flowcells/**/*.align*.txt 2>> LibrariesMakefile.err)
+QPCR_FILES=$(shell ls -1d $(DATA_DIR)/Flowcells/**/*.align*.txt 2>> LibrariesMakefile.err | sed -e s/txt/txt.qPCR/)
+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/\/./\//")
all: $(QPCR_FILES) $(COUNT_FILES) $(FILES) qPCR_summary.txt qPCR_summary.html LibraryInfo.xml $(LIBFILES) SequencingLaneSummary.html SequencingSummary.html Distribute
grep -v contam $< | awk '{if(NF > 3) {print $$1} }' | wc -l > $@;
%.txt.qPCR: %.txt
- $(ROOT_DIR)/bin/qPCR $(subst .txt.qPCR,.txt,$@) $(ROOT_DIR)/reference_data/GenericBackground $(ROOT_DIR)/reference_data/qPCR_Tests/ | sort -k 2 -g -r | perl -e> $@
+ $(ROOT_DIR)/bin/qPCR $(subst .txt.qPCR,.txt,$@) $(ROOT_DIR)/reference_data/GenericBackground $(ROOT_DIR)/reference_data/qPCR_Tests/ | sort -k 2 -g -r > $@
%.txt.profile: %.txt
$(ROOT_DIR)/profile_reads/profile_reads_against_features `echo $@ | sed -e s/\.profile//` $(ROOT_DIR)/reference_data/`basename $@ | awk -F\. '{ print $$3 }'`_tx_start_sites > $@
//qsort(data, features.size(), sizeof(double), compare_double);
//double median = gsl_stats_median_from_sorted_data(data, 1, features.size());
//double var = gsl_stats_variance_m(data,1,features.size(),mean);
- size_t basename_start = tests[i].find_last_of('/',0);
- cout << tests[i].substr(basename_start,tests[i].length()-basename_start-1).c_str() << "\t" << enrichment << endl;
+ size_t basename_start = tests[i].find_last_of('/');
+ cout << tests[i].substr(basename_start,tests[i].length()-basename_start).c_str() << "\t" << enrichment << endl;
}
}