chr1 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=1) chr2 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=2) chr3 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=3) chr4 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=4) chr5 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=5) chr6 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=6) chr7 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=7) chr8 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=8) chr9 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=9) chr10 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=10) chr11 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=11) chr12 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=12) chr13 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=13) chr14 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=14) chr15 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=15) chr16 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=16) chr17 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=17) chr18 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=18) chr19 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=19) chr20 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=20) chr21 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=21) chr22 = Segmentation(normalized=normalized.casechannel,samples=samples,force annotation=srFAnnot,chr=22) /* Combine segmentation results */ unionSegs = TableQuery(table1=chr1.segments, table2=chr2.segments, table3=chr3.segments, table4=chr4.segments, table5=chr5.segments, table6=chr6.segments, table7=chr7.segments, table8=chr8.segments, table9=chr9.segments, table10=chr10.segments, table11=chr11.segments, table12=chr12.segments, query = "SELECT * FROM table1 UNION "+ "SELECT * FROM table2 UNION "+ "SELECT * FROM table3 UNION "+ "SELECT * FROM table4 UNION "+ "SELECT * FROM table5 UNION "+ "SELECT * FROM table6 UNION "+ "SELECT * FROM table7 UNION "+ "SELECT * FROM table8 UNION "+ "SELECT * FROM table9 UNION "+ "SELECT * FROM table10 UNION "+ "SELECT * FROM table11 UNION "+ "SELECT * FROM table12 ") /* Combine segmentation results */ unionSegs2 = TableQuery(table1=chr13.segments, table2=chr14.segments, table3=chr15.segments, table4=chr16.segments, table5=chr17.segments, table6=chr18.segments, table7=chr19.segments, table8=chr20.segments, table9=chr21.segments, table10=chr22.segments, query = "SELECT * FROM table1 UNION "+ "SELECT * FROM table2 UNION "+ "SELECT * FROM table3 UNION "+ "SELECT * FROM table4 UNION "+ "SELECT * FROM table5 UNION "+ "SELECT * FROM table6 UNION "+ "SELECT * FROM table7 UNION "+ "SELECT * FROM table8 UNION "+ "SELECT * FROM table9 UNION "+ "SELECT * FROM table10 ") /* Combine segmentation results */ segmented = TableQuery(table1 = unionSegs, table2 = unionSegs2, query = "SELECT * FROM table1 UNION "+ "SELECT * FROM table2 ") ordered { /* Combine segmentation results */ unionSegsG = TableQuery(table1=chr1.GTSgain, table2=chr2.GTSgain, table3=chr3.GTSgain, table4=chr4.GTSgain, table5=chr5.GTSgain, table6=chr6.GTSgain, query = "SELECT * FROM table1 UNION "+ "SELECT * FROM table2 UNION "+ "SELECT * FROM table3 UNION "+ "SELECT * FROM table4 UNION "+ "SELECT * FROM table5 UNION "+ "SELECT * FROM table6 ") unionSegsG3 = TableQuery(table1=chr7.GTSgain, table2=chr8.GTSgain, table3=chr9.GTSgain, table4=chr10.GTSgain, table5=chr11.GTSgain, table6=chr12.GTSgain, query = "SELECT * FROM table1 UNION "+ "SELECT * FROM table2 UNION "+ "SELECT * FROM table3 UNION "+ "SELECT * FROM table4 UNION "+ "SELECT * FROM table5 UNION "+ "SELECT * FROM table6 ") /* Combine segmentation results */ unionSegsG2 = TableQuery(table1=chr13.GTSgain, table2=chr14.GTSgain, table3=chr15.GTSgain, table4=chr16.GTSgain, table5=chr17.GTSgain, table6=chr18.GTSgain, table7=chr19.GTSgain, table8=chr20.GTSgain, table9=chr21.GTSgain, table10=chr22.GTSgain, query = "SELECT * FROM table1 UNION "+ "SELECT * FROM table2 UNION "+ "SELECT * FROM table3 UNION "+ "SELECT * FROM table4 UNION "+ "SELECT * FROM table5 UNION "+ "SELECT * FROM table6 UNION "+ "SELECT * FROM table7 UNION "+ "SELECT * FROM table8 UNION "+ "SELECT * FROM table9 UNION "+ "SELECT * FROM table10 ") preSegmentedGTSgain = CSVListJoin(file1 = unionSegsG, file2 = unionSegsG3, file3 = unionSegsG2, fileCol = "") segmentedGTSgain = CSVFilter(csv = preSegmentedGTSgain, includeColumns = "gts.chr,gts.pos,gts.ARI.gain,gts.AFI.gain") loclist = CSVFilter(csv = segmentedGTSgain, includeColumns = "gts.chr,gts.pos") /* Combine segmentation results */ segmentedVals = StandardProcess(input = preSegmentedGTSgain, command = "cut -f 7-") } //segmentedGTSgain = TableQuery(table1 = unionSegsG, // table2 = unionSegsG2, // table3 = unionSegsG3, // query = "SELECT * FROM table1 UNION "+ // "SELECT * FROM table3 UNION "+ // "SELECT * FROM table2 ") /* Combine segmentation results */ unionSegsL = TableQuery(table1=chr1.GTSloss, table2=chr2.GTSloss, table3=chr3.GTSloss, table4=chr4.GTSloss, table5=chr5.GTSloss, table6=chr6.GTSloss, table7=chr7.GTSloss, table8=chr8.GTSloss, table9=chr9.GTSloss, table10=chr10.GTSloss, table11=chr11.GTSloss, table12=chr12.GTSloss, query = "SELECT * FROM table1 UNION "+ "SELECT * FROM table2 UNION "+ "SELECT * FROM table3 UNION "+ "SELECT * FROM table4 UNION "+ "SELECT * FROM table5 UNION "+ "SELECT * FROM table6 UNION "+ "SELECT * FROM table7 UNION "+ "SELECT * FROM table8 UNION "+ "SELECT * FROM table9 UNION "+ "SELECT * FROM table10 UNION "+ "SELECT * FROM table11 UNION "+ "SELECT * FROM table12 ") /* Combine segmentation results */ unionSegsL2 = TableQuery(table1=chr13.GTSloss, table2=chr14.GTSloss, table3=chr15.GTSloss, table4=chr16.GTSloss, table5=chr17.GTSloss, table6=chr18.GTSloss, table7=chr19.GTSloss, table8=chr20.GTSloss, table9=chr21.GTSloss, table10=chr22.GTSloss, query = "SELECT * FROM table1 UNION "+ "SELECT * FROM table2 UNION "+ "SELECT * FROM table3 UNION "+ "SELECT * FROM table4 UNION "+ "SELECT * FROM table5 UNION "+ "SELECT * FROM table6 UNION "+ "SELECT * FROM table7 UNION "+ "SELECT * FROM table8 UNION "+ "SELECT * FROM table9 UNION "+ "SELECT * FROM table10 ") /* Combine segmentation results */ segmentedGTSloss = TableQuery(table1 = unionSegsL, table2 = unionSegsL2, query = "SELECT \"gts.chr\",\"gts.pos\",\"gts.ARI.loss\",\"gts.AFI.loss\",\"gts.cnv\" FROM table1 UNION "+ "SELECT \"gts.chr\",\"gts.pos\",\"gts.ARI.loss\",\"gts.AFI.loss\",\"gts.cnv\" FROM table2 ") // Combine report outputs segmentedPart1 = LatexCombiner(chr1.report, chr2.report, chr3.report, chr4.report, chr5.report, chr6.report, chr7.report, chr8.report, chr9.report) segmentedPart2 = LatexCombiner(chr10.report, chr11.report, chr12.report, chr13.report, chr14.report, chr15.report, chr16.report, chr17.report, chr18.report) segmentedPart3 = LatexCombiner(chr19.report, chr20.report, chr21.report, chr22.report) segmentedReport = LatexCombiner(segmentedPart1, segmentedPart2, segmentedPart3)