################################################################################ ## ## 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 ValidateAlignment.mk ## ## brief Rules that perform comparison of alignment data ## ## author Roman Petrovski ## ################################################################################ ifeq (,$(ALIGNED_ROOT)) $(error "ALIGNED_ROOT is required for Alignment validation to run") endif Alignment.list.ori: ALIGNED_ROOT:=$(ALIGNED_ROOT) Alignment.list.ori: Alignment.finished $(TEMP_DIR)/.sentinel ( $(CD) $(ALIGNED_ROOT) && $(FIND) ./ -type f \ $(foreach ign, $(ALIGNMENT_VALIDATE_IGNORE_FILES), -not -name '$(ign)') \ $(foreach nos, $(ALIGNMENT_VALIDATE_NOSIZE_FILES), -not -name '$(nos)') -printf '%p %s\n' \ $(foreach nos, $(ALIGNMENT_VALIDATE_NOSIZE_FILES), -name '$(nos)') -printf '%p\n') \ | $(SORT) | $(INTERSPERSE) >$(SAFEPIPETARGET) Alignment.list.local: Alignment.finished $(TEMP_DIR)/.sentinel ( $(CD) Aligned && $(FIND) ./ -type f \ $(foreach ign, $(ALIGNMENT_VALIDATE_IGNORE_FILES), -not -name '$(ign)') \ $(foreach nos, $(ALIGNMENT_VALIDATE_NOSIZE_FILES), -not -name '$(nos)') -printf '%p %s\n' \ $(foreach nos, $(ALIGNMENT_VALIDATE_NOSIZE_FILES), -name '$(nos)') -printf '%p\n') \ | $(SORT) | $(INTERSPERSE) >$(SAFEPIPETARGET) Alignment.diff: ALIGNED_ROOT:=$(ALIGNED_ROOT) Alignment.diff: Alignment.list.local Alignment.list.ori ( $(DIFF) Alignment.list.local Alignment.list.ori || ([[ 1 == $$? ]] && $(EXIT) 0)) \ |( $(GREP) -E '^<|^>' \ |$(GREP) -vE '^<\s*$$|^>\s*$$' || ([[ 1 == $$? ]] && $(EXIT) 0) ) \ |$(SED) 's/^<\s\(.*$$\)/< $(subst /,\/,$(CURDIR))\/Aligned\/\1/' \ |$(SED) 's/^>\s\(.*$$\)/> $(subst /,\/,$(ALIGNED_ROOT))\/\1/' \ >$(SAFEPIPETARGET)