################################################################################ ## ## 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 eland_rna.mk ## ## brief Top level makefile for the "eland_rna" analysis. ## ## For RNA, ELAND is used for three different alignments: the genome alignment, ## the alignment to the splice junctions and the alignment to the contaminants. ## ## author Roman Petrovski ## ################################################################################ ifeq (0,$(words $($(dataset)_READS))) $(error Dataset $(dataset): ANALYSIS eland_extended: no read specified) endif # Get the list of fastq files from the file system fastqFiles := $(wildcard $(EXPT_DIR)/$($(dataset)_SOURCE_PREFIX)_R$(word 1, $($(dataset)_READS))_*.fastq.gz) $(dataset)_FASTQ_SETS := $(fastqFiles:$(EXPT_DIR)/$($(dataset)_SOURCE_PREFIX)_R$(word 1, $($(dataset)_READS))_%.fastq.gz=%) # group the fastq into sets of the requested size $(dataset)_ELAND_SETS := currentFastqSets := $($(dataset)_FASTQ_SETS) setPrefix := 00 include $(MAKEFILES_DIR)/ElandSets.mk # Complete workflow # Saving the initial values of the variables controlling ELAND rules $(dataset)_ELAND_RESULT_EXTENDED_ORIG:=$(ELAND_RESULT_EXTENDED) $(dataset)_GENOMESIZE_SUFFIX_ORIG:=$(GENOMESIZE_SUFFIX) $(dataset)_EXPORT_SUFFIX_ORIG:=$(EXPORT_SUFFIX) # Alignment for the splice junctions ELAND_RESULT_EXTENDED:=$(ELAND_RESULT_SPLICE) read := $(word 1, $($(dataset)_READS)) include $(MAKEFILES_DIR)/SquashSplice.mk ifneq (1,$(words $($(dataset)_READS))) read := $(word 2, $($(dataset)_READS)) include $(MAKEFILES_DIR)/SquashSplice.mk endif include $(MAKEFILES_DIR)/ElandExtended.mk # Alignment for the contaminants ifeq (,$($(dataset)_ELAND_RNA_GENOME_CONTAM)) $(error "eland_rna analysis requested, but $(dataset)_ELAND_RNA_GENOME_CONTAM is undefined") endif GENOMESIZE_SUFFIX:=$(CONTAM_GENOMESIZE_SUFFIX) EXPORT_SUFFIX:=$(CONTAM_EXPORT_SUFFIX) ELAND_RESULT_EXTENDED:=$(ELAND_RESULT_CONTAM) include $(MAKEFILES_DIR)/SquashContam.mk include $(MAKEFILES_DIR)/ElandExtended.mk include $(MAKEFILES_DIR)/GenomeSize.mk include $(MAKEFILES_DIR)/Single.mk # Alignment for the genome GENOMESIZE_SUFFIX:=$($(dataset)_GENOMESIZE_SUFFIX_ORIG) EXPORT_SUFFIX:=$($(dataset)_EXPORT_SUFFIX_ORIG) ELAND_RESULT_EXTENDED:=$($(dataset)_ELAND_RESULT_EXTENDED_ORIG) include $(MAKEFILES_DIR)/SquashGenome.mk include $(MAKEFILES_DIR)/ElandExtended.mk include $(MAKEFILES_DIR)/GenomeSize.mk include $(MAKEFILES_DIR)/Rna.mk include $(MAKEFILES_DIR)/ScoreFiles.mk include $(MAKEFILES_DIR)/ErrorGraphs.mk $($(dataset)_TARGET): \ $(foreach set, $($(dataset)_ELAND_SETS), \ $(foreach r, $($(dataset)_READS), \ $($(dataset)_DESTINATION_PREFIX)_R$(r)_$(set)$(EXPORT_SUFFIX) \ $($(dataset)_STATS_DIR)/$($(dataset)_FILE_PREFIX)_R$(r)_$(set)$(RNAQC_SUFFIX))) $(TOUCH) $@ ; echo $^