################################################################################ ## ## Copyright (c) 2007-2009 Illumina, Inc. ## ## This software is covered by the "Illumina Genome Analyzer Software ## License Agreement" and the "Illumina Source Code License Agreement", ## and certain third party copyright/licenses, and any user of this ## source file is bound by the terms therein (see accompanying files ## Illumina_Genome_Analyzer_Software_License_Agreement.pdf and ## Illumina_Source_Code_License_Agreement.pdf and third party ## copyright/license notices). ## ## This file is part of the Consensus Assessment of Sequence And VAriation ## (CASAVA) software package. ## ## file Config.mk ## ## brief Common configuration file for all makefiles. ## ## Defines paths, file names, extensions, etc. ## ## author Come Raczy ## ################################################################################ # The shell pipefail option is required for accurate workflow control ifeq (,$(MAKESHELL)) SHELL = /bin/bash -o pipefail else SHELL = $(MAKESHELL) endif # CASAVA installation directories TOOLS_DIR:=/home/psgendb/local/pkg/CASAVA_v1.8.2-build/bin BIN_DIR:=/home/psgendb/local/pkg/CASAVA_v1.8.2-build/bin DATA_DIR:=/home/psgendb/local/pkg/CASAVA_v1.8.2-build/share/CASAVA-1.8.2 QCAL_TOOLS_DIR:=/home/psgendb/local/pkg/CASAVA_v1.8.2-build/bin ELAND_DIR:=/home/psgendb/local/pkg/CASAVA_v1.8.2-build/bin LIBEXEC_DIR:=/home/psgendb/local/pkg/CASAVA_v1.8.2-build/libexec/CASAVA-1.8.2 # Error codes ERROR_MISSING_QSEQ=1 ERROR_MISSING_QVAL=1 ERROR_MISSING_ELAND_GENOME=1 ERROR_NO_PIPEFAIL=2 ERROR_NO_QTABLE=3 ERROR_NO_PHAGE_ALIGN=4 ERROR_MISSING_PROGRAM=5 ERROR_MISSING_CONFIG=6 ERROR_MISSING_SUMMARY=7 ERROR_MISSING_TILES=8 # System tools ELAND_EXEC:=$(ELAND_DIR)/eland_ms LIBEXEC_CONFIGURE_ALIGNMENT := $(LIBEXEC_DIR)/Alignment/configureAlignment.pl CONFIGURE_DATASET := $(LIBEXEC_DIR)/Alignment/configureDataset.pl CONFIGURE_BCL_TO_FASTQ := $(BIN_DIR)/configureBclToFastq.pl CONFIGURE_ALIGNMENT := $(BIN_DIR)/configureAlignment.pl CONFIGURE_BUILD := $(BIN_DIR)/configureBuild.pl PICK_BEST_ALIGNMENT := $(LIBEXEC_DIR)/kagu COPY_CONFIG := $(LIBEXEC_DIR)/BaseCalls/copyConfig.pl PRINT_SS_XML := $(LIBEXEC_DIR)/Alignment/printSampleSheetXml.pl # System templates BUSTAD_SUMMARY_XSL := $(DATA_DIR)/BustardSummary.xsl AWK = awk CAT = cat CD = cd CHMOD = chmod # at the moment all usage of cp is replaced with cat (or tar). The problem with cp is that it # preserves the permissions of the source file. For example when copying a css from the # installation folder into the analysis folder, the copy ends up being read-only which is # not always what is intended. Please make sure you've considered this before uncommenting # the lines below. #CP = cp #CPDIR = cp -R CUT = cut DATE = date DIFF = diff ECHO = echo EGREP = egrep EXIT = exit FGREP = fgrep FIND = find GREP = grep GUNZIP = gunzip MKDIR = mkdir MV = mv PASTE = paste PRINTF = printf PWD = pwd RM = rm -f SED = sed SET=set SEQ=seq SORT = sort -T $(SORT_TMPDIR) TAR = tar TEE = tee TOUCH = touch UNIQ = uniq XARGS = xargs XSLTPROC = xsltproc WC = wc SLEEP=sleep AND=&& OR=|| # Logging # level 0 - no logging except for error messages. All recipe stderr is suppressed # level 1 - only text preffixed with known keywords such as (INFO, ERROR, WARNING and similar) is allowed # to escape recipes stderr # level 2 - unfiltered stderr CASAVA_LOG_LEVEL:=2 LOG_DATE_FORMAT:=%F %T LOG_DEBUG=[[ $(CASAVA_LOG_LEVEL) != 2 ]] $(OR) 1>&2 $(ECHO) LOG_WARNING=[[ $(CASAVA_LOG_LEVEL) == 0 ]] $(OR) 1>&2 $(ECHO) -e "WARNING:" LOG_INFO=[[ $(CASAVA_LOG_LEVEL) == 0 ]] $(OR) 1>&2 $(ECHO) -e "INFO:" #Condition checking BOOLEAN_TRUE_WORDS:=Y y yes YES Yes on ON On true TRUE True 1 ok OK Ok BOOLEAN_FALSE_WORDS:=N n no NO No off OFF Off false FALSE False 0 CHECK_VALID_BOOLEAN=$(if $(filter $(BOOLEAN_TRUE_WORDS) $(BOOLEAN_FALSE_WORDS), $(1)),$(1),\ $(error "Incorrect boolean value '$(1)'. Allowed values: $(BOOLEAN_TRUE_WORDS) $(BOOLEAN_FALSE_WORDS)")) IS_BOOLEAN_TRUE=$(if $(strip $(1)),$(filter $(BOOLEAN_TRUE_WORDS), $(call CHECK_VALID_BOOLEAN,$(1)))) # Global macros UNPROTECTED_TARGET=$@ SAFEPIPETARGET = $@.tmp && mv $@.tmp $@ SAFEPIPETARGET2=$(subst .,.tmp.,$@) && mv $(subst .,.tmp.,$@) $@ SAFEPIPETARGET3=$(CURDIR)/$@.tmp && mv $(CURDIR)/$@.tmp $(CURDIR)/$@ TOUCH_TARGET=$(TOUCH) $@ CHECK_TARGET=@if [ ! -e $@ ]; then echo "Error: $@ does not exist."; exit 1; fi # Structure of the analysis folder TEMP_DIR:=Temp STATS_DIR:=Stats SQUASHED_GENOME_EXTENSIONS := .2bpb .idx .vld SPLICE_DIR:=$(TEMP_DIR)/SpliceSites AUTOSQUASH_GENOME_DIR:=$(TEMP_DIR)/SquashGenome AUTOSQUASH_SPLICE_DIR:=$(TEMP_DIR)/SquashSplice AUTOSQUASH_CONTAM_DIR:=$(TEMP_DIR)/SquashContam AUTOSQUASH_DIR:=$(AUTOSQUASH_GENOME_DIR) PLOT_DIR:=Plots # Environment variables SORT_TMPDIR ?= $(TEMP_DIR) # Analysis files MISMATCH_THUMB:=Mismatch.htm PEC_THUMB:=Perfect.htm RUN_REPORT:=finished.txt # Analysis file name suffixes BCL_SUFFIX:=.bcl FILTER_SUFFIX:=.filter TILES_SUFFIX:=_tiles.txt FASTQ_SUFFIX:=.fastq EXPORT_SUFFIX:=_export.txt.gz CONTAM_EXPORT_SUFFIX:=_contam_export.txt.gz SCORE_SUFFIX:=_score.txt SCORE_PREFIX:=$(TEMP_DIR)/ RESCORE_SUFFIX:=_rescore.txt RESCORE_PREFIX:=$(TEMP_DIR)/ SCORE_FILES_SUFFIX:=_score_files.txt SCORE_XML:=score.xml RESCORE_XML:=rescore.xml RESCORE_IMG_SUFFIX:=_rescore.gif RESCORE_IMG_THUMB_SUFFIX:=_rescore_thumb.gif SMT_SUFFIX:=_all.txt SMT_PNG_SUFFIX:=_all.png SMT_PNGS_SUFFIX:=_all_pngs.txt SM_SUFFIX:=_Signal_Means.txt PEC_IMG_SUFFIX:=_errors.gif PEC_IMG_THUMB_SUFFIX:=_errors_thumb.gif PAIR_SUFFIX:=_pair.xml GENOMESIZE_SUFFIX:=_genomesize.xml CONTAM_GENOMESIZE_SUFFIX:=_genomesize_contam.xml DEMUX_SUMMARY_SUFFIX:=_demux_summary.xml DEMUX_SUMMARY_HTML_SUFFIX:=_demux_summary.htm # Definitions for ELAND ELAND_RESULT:=_eland_result.txt ELAND_RESULT_MULTI:=_eland_multi.txt ELAND_RESULT_EXTENDED:=_eland_extended.txt ELAND_RESULT_CONTAM:=_extended_contam.txt ELAND_RESULT_SPLICE:=_extended_splice.txt ELAND_QUERY:=_eland_query.txt SORTED_SUFFIX:=_sorted.txt # Definitions for ELAND RNA RNAQC_SUFFIX:=_rnaqc.txt RNAQC_DIR:=Stats # Definitions for ELAND_RNA RNASS_AUTO=splice_sites-auto.fa REF_FLAT_TXT=refFlat.txt ######################################################### # CASAVA Applications # coverage statistics BC:=${TOOLS_DIR}/buildCoverage.pl # produce BustardSummary.xml PIS:=$(LIBEXEC_DIR)/BaseCalls/produceIntensityStats.pl # ... score.pl (remove when fully replaced by PAS) PAS:=${TOOLS_DIR}/produceAlignStats #Compression format COMPRESSION:=gzip COMPRESSIONSUFFIX:=.gz # ... orphanAligner OA:=${TOOLS_DIR}/orphanAligner OA_PREREQS:= $(OA) # ... consolidatePairs CONS:=${LIBEXEC_DIR}/consolidatePairs.pl # ... kagu KAGU:=${TOOLS_DIR}/kagu KAGU_PREREQS:= $(KAGU) # ... spliceSites.pl SPLCSTS:=${TOOLS_DIR}/spliceSites.pl SPLCSTS_PREREQS= $(SPLCSTS) # ... seqGeneMd2RefFlat.pl SEQGENEMD2REFFLAT:=${LIBEXEC_DIR}/Conversion/seqGeneMd2RefFlat.pl SEQGENEMD2REFFLAT_PREREQS= $(SEQGENEMD2REFFLAT) # ... squashGenome SG:=${LIBEXEC_DIR}/squashGenome${EXE} # ... TOOLS:=$(PAS) $(BC) $(RA) $(HM) $(XL) $(PCL) \ $(CE) $(CI) $(RR) \ $(PEG) $(JER) \ $(LEQP) $(QLC) $(QLA) $(LQLA) $(LMQ) \ $(FQV) $(UNSQ) $(BEA) $(PBA) $(PBAR) $(PBP) $(CFS) $(SG) $(BE) $(MQ) $(KAGU)