################################################################################ ## ## Copyright (c) 2007-2011 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 PairAux1.mk ## ## brief Partial makefile to build the pair xml files for a single dataset. ## ## Calls PairAux.mk for each $(dataset)_ELAND_SETS ## ## author Roman Petrovski ## ################################################################################ $(dataset)_ORPHAN_ALIGNER_ALL_ELAND_EXTENDED_PREREQS:= # Iterative generation of the partial temporary export files currentSetList := $($(dataset)_ELAND_SETS) include $(foreach set, $($(dataset)_ELAND_SETS), $(MAKEFILES_DIR)/PairAux.mk) # make-3.78 is not able to construct the correct list of prerequisites for # intermediate and secondary targets. For this reason the multi-target pattern # must be moved deepen in the makefiles, to a location where all the information # is available for both the prerequisites and the action. orphan_aligner_targets:=\ $(foreach set, $($(dataset)_ELAND_SETS), \ $(foreach r, $($(dataset)_READS), \ $($(dataset)_TEMP_PREFIX)_R$(r)_$(set)$(ELAND_RESULT_EXTENDED)$($(dataset)_OA_SUFFIX))) .SECONDARY: $(orphan_aligner_targets) orphan_aligner_pattern_targets:=\ $(foreach r, $($(dataset)_READS), \ $($(dataset)_TEMP_PREFIX)_R$(r)_%$(ELAND_RESULT_EXTENDED)$($(dataset)_OA_SUFFIX)) # Notice the commented-out dependency on the squashed genome. Since it is a .SECONDARY target, # it will break the pattern rule with qmake if uncommented. Luckily, we can avoid having it # in the prerequisites list because the alignment rule for eland_extended.txt files will # ensure it gets built anyways. $(orphan_aligner_pattern_targets): \ $($(dataset)_ORPHAN_ALIGNER_ALL_ELAND_EXTENDED_PREREQS)# $($(dataset)_ELAND_GENOME_SQUASHED_R$(word 1,$($(dataset)_READS))) $(CMDPREFIX) $(OA) \ $(foreach r, $($(dataset)_READS), $($(dataset)_TEMP_PREFIX)_R$(r)_$*$(ELAND_RESULT_EXTENDED)) \ $(dir $($(dataset)_ELAND_GENOME_SQUASHED_R$(word 1,$($(dataset)_READS)))) \ $($(dataset)_OA_SUFFIX).tmp \ $($(dataset)_ORPHAN_ALIGNER_PARAMS) \ $(foreach ifile, \ $(foreach r, $($(dataset)_READS), $($(dataset)_TEMP_PREFIX)_R$(r)_$*$(ELAND_RESULT_EXTENDED)), \ $(AND) $(MV) $(ifile)$($(dataset)_OA_SUFFIX).tmp $(ifile)$($(dataset)_OA_SUFFIX)) kagu_pattern_targets:=\ $($(dataset)_DESTINATION_PREFIX)_%$(PAIR_SUFFIX) \ $(foreach r, $($(dataset)_READS), $($(dataset)_DESTINATION_PREFIX)_R$(r)_%$(EXPORT_SUFFIX)) $(dataset)_kagu_oa_suffix := $(if $(call IS_BOOLEAN_TRUE, $($(dataset)_WITH_ORPHAN_ALIGNER)),$($(dataset)_OA_SUFFIX),'') kagu_eland_extended_pattern_prereqs:=\ $(foreach r, $($(dataset)_READS), \ $($(dataset)_TEMP_PREFIX)_R$(r)_%$(ELAND_RESULT_EXTENDED)$($(dataset)_kagu_oa_suffix)) $(dataset)_kagu_params:= $($(dataset)_KAGU_PARAMS) $($(dataset)_KAGU_PAIR_PARAMS) ifeq (contigName,$($(dataset)_CHROM_NAME_SOURCE)) $(dataset)_kagu_params += --ucn endif # NOTE: dependencies on fastq files require translation between % and fastq sets which is non-trivial # with qmake. Also, external dependencies tend to cause sudden rebuilds of everything... .PRECIOUS: $(kagu_pattern_targets) $(kagu_pattern_targets): \ $(kagu_eland_extended_pattern_prereqs) \ $($(dataset)_DESTINATION_PREFIX)$(GENOMESIZE_SUFFIX) $(CMDPREFIX) $(PICK_BEST_ALIGNMENT) \ $(foreach r, $($(dataset)_READS), \ --ie$(r) "$($(dataset)_TEMP_PREFIX)_R$(r)_$*$(ELAND_RESULT_EXTENDED)$($(dataset)_kagu_oa_suffix)" \ --sl$(r) "$($(dataset)_ELAND_SEED_LENGTH$(r))" \ --ub$(r) "$($(dataset)_USE_BASES$(r))" \ --oe$(r) "$($(dataset)_DESTINATION_PREFIX)_R$(r)_$*$(EXPORT_SUFFIX).tmp" \ $(foreach fastq_set, $($(dataset)_ELAND_SET_$*), \ --if$(r) "$(EXPT_DIR)/$($(dataset)_SOURCE_PREFIX)_R$(r)_$(fastq_set).fastq.gz") \ ) \ --irs "$($(dataset)_DESTINATION_PREFIX)$(GENOMESIZE_SUFFIX)" \ --os $($(dataset)_DESTINATION_PREFIX)_$*$(PAIR_SUFFIX).tmp \ $($(dataset)_kagu_params) 1>&2 \ $(AND) $(MV) $($(dataset)_DESTINATION_PREFIX)_$*$(PAIR_SUFFIX).tmp $($(dataset)_DESTINATION_PREFIX)_$*$(PAIR_SUFFIX) \ $(foreach r, $($(dataset)_READS), \ $(AND) $(MV) "$($(dataset)_DESTINATION_PREFIX)_R$(r)_$*$(EXPORT_SUFFIX).tmp.gz" \ "$($(dataset)_DESTINATION_PREFIX)_R$(r)_$*$(EXPORT_SUFFIX)")