// Andril Case Study - MAIN PROGRAM // authors: Marko Laakso, Erkka Valo, Riku Louhimo, Kristian Ovaska // Initialization... include "Settings.and" // Array CGH analysis... // --------------------- include "ACGHanalysis.and" include "ACGHexonIntegration.and" include "ACGHfrequencies.and" // Gene expression analysis... // --------------------------- include "GeneExpression.and" // Transcript expression analysis... // --------------------------------- include "TranscriptExpression.and" // Gene expression analysis with median exon expression values... // --------------------------------- include "MedianExonExpression.and" // Methylation analysis... // ----------------------- include "Methylation.and" // SNP survival analysis... // ------------------------ include "SNPSurvival.and" // Summary table... // ---------------- include "SummaryTable.and" // MicroRNA expression analysis... // ------------------------------- include "MiRNAAnalysis.and" /** SNP survival analysis */ snpSurvival = SNPSurvival() /** Pre-normalized matrix of gene expression data */ rawGeneExpression = INPUT(path=prenormalizedGeneExpression, @enabled = doGeneExpression) /** Transcript expression matrix */ transcriptExpression = INPUT(path=transcriptExpressionFileName, @enabled = doTranscriptExpression) /** Annotation file for transcript expression matrix */ transcriptAnnotation = INPUT(path=transcriptAnnotationFileName, @enabled = doTranscriptExpression) /** Median exon expression gene expression matrix */ medianExonExpressionMatrix = INPUT(path=genelevelExpressionFileName) /** Performes the whole analysis of the gene expression data. */ geneExpression = GeneExpressionAnalysis(rawGeneExpression) /** Performs copy number aberration analysis from array CGH data. */ arrayCGHanalysis = ACGHAnalysis(datadir=arrayCGHdatadir, @enabled=doArrayCGH) /** Integrates array CGH results with transcript expression intensities for amplified regions. */ arrayCGHexonIntGain = ACGHexonIntegration(force GTSsegm = arrayCGHanalysis.segmentedVals, gtsOutput = arrayCGHanalysis.loclist, tholds = arrayCGHanalysis.tholds, gain = true) /** Integrates array CGH results with transcript expression intensities for lossed regions. */ arrayCGHexonIntLoss = ACGHexonIntegration(force GTSsegm = arrayCGHanalysis.segmentedVals, gtsOutput = arrayCGHanalysis.loclist, tholds = arrayCGHanalysis.tholds, gain = false) /** Find differentially expressed transcripts. */ transcriptExpressionResults = TranscriptExpressionAnalysis(transcriptExpression, transcriptAnnotation) geneListFreqs = CSV2IDList(transcriptExpressionResults.allProbes, arrayCGHexonIntGain.exons, arrayCGHexonIntLoss.exons, columnIn="GeneID,Gene,Gene") /** Calculate copy number gain aberration frequencies for each gene individually over the sample set. */ ACGHabberGainFreqs = ACGHfrequencies(force genes=geneListFreqs, segments=arrayCGHanalysis.aberrations, gainOrLoss=1, miRNAs=false) /** Calculate copy number loss aberration frequencies for each gene individually over the sample set. */ ACGHabberLossFreqs = ACGHfrequencies(force genes=geneListFreqs, segments=arrayCGHanalysis.aberrations, gainOrLoss=-1, miRNAs=false) /** Find differentially expressed genes based on median exon expression. */ medianExonExpression = MedianExonExpressionAnalysis(medianExonExpressionMatrix) /** Find differentially expressed microRNAs. */ miRNAResults = MiRNAAnalysis(mExprNormalized = miRNAExprNormalized, probeAnnot = miRNAProbeAnnot, miRNANames = miRNANames, miRNATargets = miRNATargets, @enabled = doMiRNAExpression) /** Calculate copy number gain aberration frequencies for each microRNA individually over the sample set. */ ACGHmiRNAgainFreqs = ACGHfrequencies(genes=miRNAResults.dems, segments=arrayCGHanalysis.aberrations, gainOrLoss=1, miRNAs=true) /** Calculate copy number loss aberration frequencies for each microRNA individually over the sample set. */ ACGHmiRNAlossFreqs = ACGHfrequencies(genes=miRNAResults.dems, segments=arrayCGHanalysis.aberrations, gainOrLoss=-1, miRNAs=true) /** Performs methylome analysis. */ methylation = Methylation() // Final reporting... // ------------------ /** This function creates a result spread sheet and website from all analysis results. */ summaryTable = SummaryTable(exprProbes = geneExpression.allProbes, transcriptProbes = transcriptExpressionResults.allProbes, exonProbes = medianExonExpression.allProbes, miRNAProbes = miRNAResults.dems, miRNAgain = ACGHmiRNAgainFreqs.geneFreqs, miRNAloss = ACGHmiRNAlossFreqs.geneFreqs, force acghExonCorrLoss= arrayCGHexonIntLoss.exons, force acghExonCorrGain= arrayCGHexonIntGain.exons, acghGain = ACGHabberGainFreqs.geneFreqs, acghLoss = ACGHabberLossFreqs.geneFreqs, kaplanMeier = transcriptExpressionResults.kaplanMeier, kaplanMeierStatistics = transcriptExpressionResults.kaplanMeierStatistics, exonKaplanMeier = medianExonExpression.kaplanMeier, exonKaplanMeierStat = medianExonExpression.kaplanMeierStatistics, miRNAKaplanMeier = miRNAResults.kaplanMeier, miRNAKaplanMeierStat = miRNAResults.kaplanMeierStatistics, survBloodGenes = snpSurvival.annotResults, snpSurvImages = snpSurvival.kmReport, snpSurvAnnotation = snpSurvival.statistics, methylation = methylation.betaTable, @enabled = true) cfgReport = ConfigurationReport() rConfig = RConfigurationReport(packages = "base,csbl.go,DNAcopy,GTS", sectionType = "subsection") propertiesDoc = Properties2Latex(ensembl, snpdb, genotypeDB, geneExpression.biomart, section = "System configurations", hide = "database.password") cfgDoc = LatexCombiner(cfgReport.report, rConfig.report, propertiesDoc.report, pagebreak = true) arrayCGHsummary = LatexCombiner(arrayCGHanalysis.report, arrayCGHexonIntGain.reportTable, arrayCGHexonIntLoss.reportTable) expressionSummary = LatexCombiner(geneExpression.report, transcriptExpressionResults.report, medianExonExpression.report) summaryDoc = LatexCombiner(expressionSummary, arrayCGHsummary, miRNAResults.report, snpSurvival.report, summaryTable.report, cfgDoc) mainTemplate = LatexTemplate(abstract = abstract, bibtex1 = rConfig.citations, authors = authors, printTOC = true, title = "Analysis of Glioblastoma Samples") summaryReport = LatexPDF(document = summaryDoc, header = mainTemplate.header, footer = mainTemplate.footer, useRefs = true) /** Technical description of the complete analysis. */ OUTPUT(summaryReport.document) /** Differentially expressed genes with their annotations, fold change information and p-values. */ OUTPUT(geneExpression.degs) /** Summary table of the entire integrated glioblastoma analysis in Excel spreadsheet format. */ OUTPUT(summaryTable.table) //OUTPUT(summaryTable.resultSite)