Big steps on getting the library automation going. Small code changes in the qPCR...
authorTim Reddy Tim <treddy@hudsonalpha.org>
Wed, 13 Aug 2008 23:45:14 +0000 (23:45 +0000)
committerTim Reddy Tim <treddy@hudsonalpha.org>
Wed, 13 Aug 2008 23:45:14 +0000 (23:45 +0000)
htswanalysis/reference_data/Makefile [new file with mode: 0644]
htswanalysis/reference_data/README
htswanalysis/scripts/LibrariesMakefile
htswanalysis/src/qPCR.cpp

diff --git a/htswanalysis/reference_data/Makefile b/htswanalysis/reference_data/Makefile
new file mode 100644 (file)
index 0000000..0347ffe
--- /dev/null
@@ -0,0 +1,4 @@
+all: GenericBackground
+
+GenericBackground: 
+       wget http://m304-apple-server.stanford.edu/HTSW_Large_Files/$@
index 2b33374d48f7108b8ea31a2a18b789000489a8a4..be0dca276e63016724c31119ec3c33658ab2c29f 100644 (file)
@@ -1,2 +1,4 @@
-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.
 
index 5184d348c87edf8f1e1b0ce7240bce0e15ec8206..c7612dc25d884a948157e7a1cc8b6f46cb00ea35 100644 (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
 
@@ -37,7 +38,7 @@ all: $(QPCR_FILES) $(COUNT_FILES) $(FILES) qPCR_summary.txt qPCR_summary.html Li
        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 > $@
index 6471d564c5bfad3ae320e420ba82924f9d92ee55..a672df518d33f90346ea3477b9e446629d5b3faa 100755 (executable)
@@ -207,8 +207,8 @@ int main(int argc, char** argv) {
     //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;
   }
 }