From noreply at r-forge.r-project.org Mon Sep 1 11:13:50 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 1 Sep 2014 11:13:50 +0200 (CEST) Subject: [Patchwork-commits] r213 - .git .git/logs .git/logs/refs/heads .git/logs/refs/remotes/origin .git/refs/heads .git/refs/remotes/origin pkg/TAPS/R Message-ID: <20140901091350.835A3184950@r-forge.r-project.org> Author: sebastian_d Date: 2014-09-01 11:13:50 +0200 (Mon, 01 Sep 2014) New Revision: 213 Modified: .git/index .git/logs/HEAD .git/logs/refs/heads/master .git/logs/refs/remotes/origin/master .git/refs/heads/master .git/refs/remotes/origin/master pkg/TAPS/R/TAPS.r pkg/TAPS/R/sysdata.rda Log: Added Y chrom to TAPS plots, bug fixes. Modified: .git/index =================================================================== (Binary files differ) Modified: .git/logs/HEAD =================================================================== --- .git/logs/HEAD 2014-05-28 09:42:38 UTC (rev 212) +++ .git/logs/HEAD 2014-09-01 09:13:50 UTC (rev 213) @@ -95,3 +95,4 @@ 9c0a6e3ae1d10f0d2e8e565600b7b86eb13b9518 e244c2ac30341cbf8f109cc96f7661258e9baa93 Sebastian DiLorenzo 1400058009 +0200 pull: Fast-forward e244c2ac30341cbf8f109cc96f7661258e9baa93 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 Sebastian DiLorenzo 1400059317 +0200 pull: Fast-forward 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 6734fab24795a8c823c6a97e0131fcfe5a235107 Sebastian DiLorenzo 1401270131 +0200 pull: Fast-forward +6734fab24795a8c823c6a97e0131fcfe5a235107 cefeee2662b45c7daf3b8916b967173f68b6ddcf Sebastian DiLorenzo 1409562736 +0200 pull: Fast-forward Modified: .git/logs/refs/heads/master =================================================================== --- .git/logs/refs/heads/master 2014-05-28 09:42:38 UTC (rev 212) +++ .git/logs/refs/heads/master 2014-09-01 09:13:50 UTC (rev 213) @@ -95,3 +95,4 @@ 9c0a6e3ae1d10f0d2e8e565600b7b86eb13b9518 e244c2ac30341cbf8f109cc96f7661258e9baa93 Sebastian DiLorenzo 1400058009 +0200 pull: Fast-forward e244c2ac30341cbf8f109cc96f7661258e9baa93 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 Sebastian DiLorenzo 1400059317 +0200 pull: Fast-forward 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 6734fab24795a8c823c6a97e0131fcfe5a235107 Sebastian DiLorenzo 1401270131 +0200 pull: Fast-forward +6734fab24795a8c823c6a97e0131fcfe5a235107 cefeee2662b45c7daf3b8916b967173f68b6ddcf Sebastian DiLorenzo 1409562736 +0200 pull: Fast-forward Modified: .git/logs/refs/remotes/origin/master =================================================================== --- .git/logs/refs/remotes/origin/master 2014-05-28 09:42:38 UTC (rev 212) +++ .git/logs/refs/remotes/origin/master 2014-09-01 09:13:50 UTC (rev 213) @@ -92,3 +92,4 @@ 9c0a6e3ae1d10f0d2e8e565600b7b86eb13b9518 e244c2ac30341cbf8f109cc96f7661258e9baa93 Sebastian DiLorenzo 1400058009 +0200 pull: fast-forward e244c2ac30341cbf8f109cc96f7661258e9baa93 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 Sebastian DiLorenzo 1400059317 +0200 pull: fast-forward 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 6734fab24795a8c823c6a97e0131fcfe5a235107 Sebastian DiLorenzo 1401270130 +0200 pull: fast-forward +6734fab24795a8c823c6a97e0131fcfe5a235107 cefeee2662b45c7daf3b8916b967173f68b6ddcf Sebastian DiLorenzo 1409562735 +0200 pull: fast-forward Modified: .git/refs/heads/master =================================================================== --- .git/refs/heads/master 2014-05-28 09:42:38 UTC (rev 212) +++ .git/refs/heads/master 2014-09-01 09:13:50 UTC (rev 213) @@ -1 +1 @@ -6734fab24795a8c823c6a97e0131fcfe5a235107 +cefeee2662b45c7daf3b8916b967173f68b6ddcf Modified: .git/refs/remotes/origin/master =================================================================== --- .git/refs/remotes/origin/master 2014-05-28 09:42:38 UTC (rev 212) +++ .git/refs/remotes/origin/master 2014-09-01 09:13:50 UTC (rev 213) @@ -1 +1 @@ -6734fab24795a8c823c6a97e0131fcfe5a235107 +cefeee2662b45c7daf3b8916b967173f68b6ddcf Modified: pkg/TAPS/R/TAPS.r =================================================================== --- pkg/TAPS/R/TAPS.r 2014-05-28 09:42:38 UTC (rev 212) +++ pkg/TAPS/R/TAPS.r 2014-09-01 09:13:50 UTC (rev 213) @@ -293,7 +293,7 @@ sampleData=load.txt('SampleData.csv') } - if (length(grep('SampleData.csv',dir()))==1) + if (length(grep('SampleData.csv$',dir()))==1) { sampleData=load.txt('SampleData.csv') } else @@ -1123,9 +1123,9 @@ ### ber?kna tumorcellshalt!! # Mha modellparameter - ## empirical delta for whole copy: 0.55 + ## empirical delta-R for ?one copy in diploid sample: 0.63 for Cyto/SNP6 and 0.48 for Illu model$k2=model$k*model$meanCn - model$tumorDNA_fromLogR=(model$k*model$meanCn)/0.55 + model$tumorDNA_fromLogR=model$k2/0.63 model$tumorCell_fromLogR=1/ (1+model$meanCn/2* (1/model$tumorDNA_fromLogR -1)) # Mha SNPs @@ -1932,8 +1932,8 @@ bottom=c(rep(2*(0.75/3)+0.15,8),rep((0.75/3)+0.15,8),rep(0.15,8)), top=c(rep(0.9,8),rep(2*(0.75/3)+0.15,8),rep((0.75/3)+0.15,8)))),1) #screen 1 becomes screen 3 - 26 - split.screen(as.matrix(data.frame(left=c(rep(0.05,3)), - right=c(rep(1,3)), + split.screen(as.matrix(data.frame(left=c(rep(0.015,3)), + right=c(rep(0.987,3)), bottom=c(0.15,0.5,0.55), top=c(0.5,0.55,1))),2) #screen 2 become screen 27-29 @@ -1959,7 +1959,7 @@ #nchr=24; if (sum(chr=='chrY')==0) nchr=23 #Loop over and plot the 24 chromosomes - for (c in 1:23) + for (c in 1:24) { #Pick a chromosome this <- chroms[chroms$c==c,] @@ -2053,12 +2053,13 @@ par(lend=1) #Remove chrY,M,XY - mval[mchr=='chrY'|mchr=='chrXY'|mchr=='chrM']=NA + mval[mchr=='chrXY'|mchr=='chrM']=NA + # mval[mchr=='chrY'|mchr=='chrXY'|mchr=='chrM']=NA #Calculate previous distance of whole genome so the next chromsome is added #at the correct coordinate - pre=rep(NA,23) - for (c in 1:23) + pre=rep(NA,24) + for (c in 1:24) { this <- chroms[chroms$c==c,] ix <- chr==as.character(this$chr) @@ -2118,7 +2119,7 @@ col = '#00000003', xaxt="n", axes=F, - ylim = c(ymin,ymax), + ylim = c(-2,2), xlim = c(0,max(mpos)) ) @@ -2135,7 +2136,7 @@ lwd=1) #Add colored segment information for each chromosome, red to blue gradient. - for(c in 1:23) + for(c in 1:24) { this <- chroms[chroms$c==c,] ix <- chr==as.character(this$chr) @@ -2210,7 +2211,7 @@ par(mgp =c(1,0.5,0)) #Remove chrY,M,XY - sval[mchr=='chrY'|mchr=='chrXY'|mchr=='chrM']=NA + sval[mchr=='chrXY'|mchr=='chrM']=NA #Index to avoid spos/sval values that are all the way at 0 or 1. ix = !(sval %in% c(0,1)) @@ -2232,7 +2233,7 @@ #Add axis to the left,right and below of AI. The below axis is the chromosome numbers 1-24. axis(side=2,tck=-0.04,at=seq(from=0,to=1,by=0.2),cex.axis=0.6,pos=0,las=1) - axis(side=1,at=pre,pos=0,labels=c(seq(from=1,to=22),"X"),cex.axis=0.55,lty=0)#,tck=0,col.ticks='#00000000') + axis(side=1,at=pre,pos=0,labels=c(seq(from=1,to=22),"X",'Y'),cex.axis=0.55,lty=0)#,tck=0,col.ticks='#00000000') axis(side=4,tck=-0.04,at=seq(from=0,to=1,by=0.2),cex.axis=0.6,pos=max(mpos),las=1) # mtext("Allele frequency",side=2,line=0) mtext("Chromosomes",side=1,line=1.5,adj=0.4) @@ -2304,7 +2305,7 @@ #size[length>10000000]=4 #Loop over each chromosome. (Not chromosomeY as of writing) - for (c in 1:23) + for (c in 1:24) { #Select the chromosome @@ -2375,8 +2376,7 @@ col = c(col[notix],col[ix]), xlim = xlim, ylim = ylim) - } - else + } else { plot(int[notix],ai[notix], pch=16, @@ -2394,8 +2394,7 @@ if(c!=23) { points(int[xix],ai[xix],pch=4,cex=0.5,col='#46464620') - } - else + } else { points(int[xix],ai[xix],pch=4,cex=0.5,col=col[ix]) } @@ -3804,7 +3803,7 @@ close <- F write.table(x=rbind(colnames(newSampleData)),file=paste(root,'backup.csv',sep='/'),sep='\t',row.names=F,col.names=F) - if(nrow(sampleDataOri[sampleDataOri$done==T]) > 0) { + if(nrow(sampleDataOri[sampleDataOri$done==T,]) > 0) { write.table(x=sampleDataOri[sampleDataOri$done==T,],file=paste(root,'backup.csv',sep='/'),sep='\t',row.names=F,col.names=F,append=T) } Modified: pkg/TAPS/R/sysdata.rda =================================================================== (Binary files differ) From noreply at r-forge.r-project.org Thu Sep 4 14:07:33 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Thu, 4 Sep 2014 14:07:33 +0200 (CEST) Subject: [Patchwork-commits] r214 - .git .git/logs .git/logs/refs/heads .git/logs/refs/remotes/origin .git/refs/heads .git/refs/remotes/origin pkg/patchwork/R Message-ID: <20140904120733.31F761876F3@r-forge.r-project.org> Author: sebastian_d Date: 2014-09-04 14:07:32 +0200 (Thu, 04 Sep 2014) New Revision: 214 Modified: .git/index .git/logs/HEAD .git/logs/refs/heads/master .git/logs/refs/remotes/origin/master .git/refs/heads/master .git/refs/remotes/origin/master pkg/patchwork/R/patchwork.smoothing.r Log: bugfix mean/median smoothing Modified: .git/index =================================================================== (Binary files differ) Modified: .git/logs/HEAD =================================================================== --- .git/logs/HEAD 2014-09-01 09:13:50 UTC (rev 213) +++ .git/logs/HEAD 2014-09-04 12:07:32 UTC (rev 214) @@ -96,3 +96,4 @@ e244c2ac30341cbf8f109cc96f7661258e9baa93 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 Sebastian DiLorenzo 1400059317 +0200 pull: Fast-forward 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 6734fab24795a8c823c6a97e0131fcfe5a235107 Sebastian DiLorenzo 1401270131 +0200 pull: Fast-forward 6734fab24795a8c823c6a97e0131fcfe5a235107 cefeee2662b45c7daf3b8916b967173f68b6ddcf Sebastian DiLorenzo 1409562736 +0200 pull: Fast-forward +cefeee2662b45c7daf3b8916b967173f68b6ddcf e8cc7370da527f1d46bb81720f663ceed281e07d Sebastian DiLorenzo 1409832387 +0200 pull: Fast-forward Modified: .git/logs/refs/heads/master =================================================================== --- .git/logs/refs/heads/master 2014-09-01 09:13:50 UTC (rev 213) +++ .git/logs/refs/heads/master 2014-09-04 12:07:32 UTC (rev 214) @@ -96,3 +96,4 @@ e244c2ac30341cbf8f109cc96f7661258e9baa93 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 Sebastian DiLorenzo 1400059317 +0200 pull: Fast-forward 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 6734fab24795a8c823c6a97e0131fcfe5a235107 Sebastian DiLorenzo 1401270131 +0200 pull: Fast-forward 6734fab24795a8c823c6a97e0131fcfe5a235107 cefeee2662b45c7daf3b8916b967173f68b6ddcf Sebastian DiLorenzo 1409562736 +0200 pull: Fast-forward +cefeee2662b45c7daf3b8916b967173f68b6ddcf e8cc7370da527f1d46bb81720f663ceed281e07d Sebastian DiLorenzo 1409832387 +0200 pull: Fast-forward Modified: .git/logs/refs/remotes/origin/master =================================================================== --- .git/logs/refs/remotes/origin/master 2014-09-01 09:13:50 UTC (rev 213) +++ .git/logs/refs/remotes/origin/master 2014-09-04 12:07:32 UTC (rev 214) @@ -93,3 +93,4 @@ e244c2ac30341cbf8f109cc96f7661258e9baa93 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 Sebastian DiLorenzo 1400059317 +0200 pull: fast-forward 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 6734fab24795a8c823c6a97e0131fcfe5a235107 Sebastian DiLorenzo 1401270130 +0200 pull: fast-forward 6734fab24795a8c823c6a97e0131fcfe5a235107 cefeee2662b45c7daf3b8916b967173f68b6ddcf Sebastian DiLorenzo 1409562735 +0200 pull: fast-forward +cefeee2662b45c7daf3b8916b967173f68b6ddcf e8cc7370da527f1d46bb81720f663ceed281e07d Sebastian DiLorenzo 1409832387 +0200 pull: fast-forward Modified: .git/refs/heads/master =================================================================== --- .git/refs/heads/master 2014-09-01 09:13:50 UTC (rev 213) +++ .git/refs/heads/master 2014-09-04 12:07:32 UTC (rev 214) @@ -1 +1 @@ -cefeee2662b45c7daf3b8916b967173f68b6ddcf +e8cc7370da527f1d46bb81720f663ceed281e07d Modified: .git/refs/remotes/origin/master =================================================================== --- .git/refs/remotes/origin/master 2014-09-01 09:13:50 UTC (rev 213) +++ .git/refs/remotes/origin/master 2014-09-04 12:07:32 UTC (rev 214) @@ -1 +1 @@ -cefeee2662b45c7daf3b8916b967173f68b6ddcf +e8cc7370da527f1d46bb81720f663ceed281e07d Modified: pkg/patchwork/R/patchwork.smoothing.r =================================================================== --- pkg/patchwork/R/patchwork.smoothing.r 2014-09-01 09:13:50 UTC (rev 213) +++ pkg/patchwork/R/patchwork.smoothing.r 2014-09-04 12:07:32 UTC (rev 214) @@ -47,8 +47,8 @@ j=kbposix[i] #Create 50 bp windows to take median coverage of for tumor and normal/reference ix <- (j-(window/2)):(j+(window/2)) - coverage[i] <- mean(norm[ix], na.rm=T) - refcoverage[i] <- mean(reference[ix], na.rm=T) + coverage[i] <- median(norm[ix], na.rm=T) + refcoverage[i] <- median(reference[ix], na.rm=T) } kbsegs <- rbind(kbsegs,data.frame('chr'=c,kbpos,coverage,refcoverage)) } From noreply at r-forge.r-project.org Mon Sep 29 10:35:22 2014 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 29 Sep 2014 10:35:22 +0200 (CEST) Subject: [Patchwork-commits] r215 - .git .git/logs .git/logs/refs/heads .git/logs/refs/remotes/origin .git/refs/heads .git/refs/remotes/origin pkg/TAPS/R Message-ID: <20140929083522.52D73187668@r-forge.r-project.org> Author: sebastian_d Date: 2014-09-29 10:35:21 +0200 (Mon, 29 Sep 2014) New Revision: 215 Modified: .git/index .git/logs/HEAD .git/logs/refs/heads/master .git/logs/refs/remotes/origin/master .git/refs/heads/master .git/refs/remotes/origin/master pkg/TAPS/R/TAPS.r Log: TAPS buggfix Modified: .git/index =================================================================== (Binary files differ) Modified: .git/logs/HEAD =================================================================== --- .git/logs/HEAD 2014-09-04 12:07:32 UTC (rev 214) +++ .git/logs/HEAD 2014-09-29 08:35:21 UTC (rev 215) @@ -97,3 +97,4 @@ 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 6734fab24795a8c823c6a97e0131fcfe5a235107 Sebastian DiLorenzo 1401270131 +0200 pull: Fast-forward 6734fab24795a8c823c6a97e0131fcfe5a235107 cefeee2662b45c7daf3b8916b967173f68b6ddcf Sebastian DiLorenzo 1409562736 +0200 pull: Fast-forward cefeee2662b45c7daf3b8916b967173f68b6ddcf e8cc7370da527f1d46bb81720f663ceed281e07d Sebastian DiLorenzo 1409832387 +0200 pull: Fast-forward +e8cc7370da527f1d46bb81720f663ceed281e07d b5798bb1874d9dc8e50fa5083961a8836d79f76c Sebastian DiLorenzo 1411979666 +0200 pull: Fast-forward Modified: .git/logs/refs/heads/master =================================================================== --- .git/logs/refs/heads/master 2014-09-04 12:07:32 UTC (rev 214) +++ .git/logs/refs/heads/master 2014-09-29 08:35:21 UTC (rev 215) @@ -97,3 +97,4 @@ 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 6734fab24795a8c823c6a97e0131fcfe5a235107 Sebastian DiLorenzo 1401270131 +0200 pull: Fast-forward 6734fab24795a8c823c6a97e0131fcfe5a235107 cefeee2662b45c7daf3b8916b967173f68b6ddcf Sebastian DiLorenzo 1409562736 +0200 pull: Fast-forward cefeee2662b45c7daf3b8916b967173f68b6ddcf e8cc7370da527f1d46bb81720f663ceed281e07d Sebastian DiLorenzo 1409832387 +0200 pull: Fast-forward +e8cc7370da527f1d46bb81720f663ceed281e07d b5798bb1874d9dc8e50fa5083961a8836d79f76c Sebastian DiLorenzo 1411979666 +0200 pull: Fast-forward Modified: .git/logs/refs/remotes/origin/master =================================================================== --- .git/logs/refs/remotes/origin/master 2014-09-04 12:07:32 UTC (rev 214) +++ .git/logs/refs/remotes/origin/master 2014-09-29 08:35:21 UTC (rev 215) @@ -94,3 +94,4 @@ 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 6734fab24795a8c823c6a97e0131fcfe5a235107 Sebastian DiLorenzo 1401270130 +0200 pull: fast-forward 6734fab24795a8c823c6a97e0131fcfe5a235107 cefeee2662b45c7daf3b8916b967173f68b6ddcf Sebastian DiLorenzo 1409562735 +0200 pull: fast-forward cefeee2662b45c7daf3b8916b967173f68b6ddcf e8cc7370da527f1d46bb81720f663ceed281e07d Sebastian DiLorenzo 1409832387 +0200 pull: fast-forward +e8cc7370da527f1d46bb81720f663ceed281e07d b5798bb1874d9dc8e50fa5083961a8836d79f76c Sebastian DiLorenzo 1411979666 +0200 pull: fast-forward Modified: .git/refs/heads/master =================================================================== --- .git/refs/heads/master 2014-09-04 12:07:32 UTC (rev 214) +++ .git/refs/heads/master 2014-09-29 08:35:21 UTC (rev 215) @@ -1 +1 @@ -e8cc7370da527f1d46bb81720f663ceed281e07d +b5798bb1874d9dc8e50fa5083961a8836d79f76c Modified: .git/refs/remotes/origin/master =================================================================== --- .git/refs/remotes/origin/master 2014-09-04 12:07:32 UTC (rev 214) +++ .git/refs/remotes/origin/master 2014-09-29 08:35:21 UTC (rev 215) @@ -1 +1 @@ -e8cc7370da527f1d46bb81720f663ceed281e07d +b5798bb1874d9dc8e50fa5083961a8836d79f76c Modified: pkg/TAPS/R/TAPS.r =================================================================== --- pkg/TAPS/R/TAPS.r 2014-09-04 12:07:32 UTC (rev 214) +++ pkg/TAPS/R/TAPS.r 2014-09-29 08:35:21 UTC (rev 215) @@ -2005,12 +2005,10 @@ if(c == 23) { mtext("X", side = 3, line = -1, adj = 0.8, cex = 1) - } - else if(c == 24) + } else if(c == 24) { mtext("Y", side = 3, line = -1, adj = 0.8, cex = 1) - } - else + } else { mtext(c, side = 3, line = -1, adj = 0.8, cex = 1) } @@ -2062,6 +2060,7 @@ for (c in 1:24) { this <- chroms[chroms$c==c,] + if(nrow(this) == 0) next ix <- chr==as.character(this$chr) mix <- mchr==as.character(this$chr) #& mval>=(-2) six <- schr==as.character(this$chr) @@ -2077,13 +2076,12 @@ { ymax = 1 } - seqminmax=seq(ymin,ymax,by=0.5) + seqminmax=seq(-2,2,by=0.5) if(c>1) { prelength=prelength+chroms$length[chroms$c==(c-1)] - } - else + } else { prelength=0 } @@ -2210,7 +2208,7 @@ par(oma = c(0,0,0,0)) par(mgp =c(1,0.5,0)) - #Remove chrY,M,XY + #Remove M,XY sval[mchr=='chrXY'|mchr=='chrM']=NA #Index to avoid spos/sval values that are all the way at 0 or 1. @@ -2310,6 +2308,7 @@ #Select the chromosome this <- chroms[chroms$c==c,] + if(nrow(this) == 0) next #Initialize jpeg jpeg(paste(name,'_karyotype.',this$chr,'.jpg',sep=''),width=11.7,height=8.3,units="in",res=300) @@ -2446,7 +2445,7 @@ #{ # ymax = 1 #} - seqminmax=seq(ymin,ymax,by=0.5) + seqminmax=seq(-2,2,by=0.5) #Create an index of colors relating to the positions and lengths on this chromosome col=rep('#000000',sum(ix)) @@ -2463,7 +2462,7 @@ axes=F, col = '#00000005', xlim = c(0,this$length), - ylim = c(ymin,ymax)) + ylim = c(-2,2)) #Add colored segments based on the log-ratio data segments(x0=start[ix],x1=end[ix], @@ -2481,8 +2480,8 @@ #labels=c("-1","-.5","0",".5","1","1.5"), cex.axis=0.6,las=1) # 1: below - axis(side=1,tck=0.926,col='#80808040',at=seq(5e6,this$length,by=5e6), - labels=FALSE,cex.axis=0.6,pos=ymin) + # axis(side=1,tck=1.041,col='#80808040',at=seq(5e6,this$length,by=5e6),labels=FALSE,cex.axis=0.6,pos=ymin) + segments(x0=seq(5e6,this$length,by=5e6),x1=seq(5e6,this$length,by=5e6),y0=-2,y1=2,col='#80808040') #axis(side=1,tck=0,pos=ymin, # cex.axis=0.6,las=1) # 3: top