[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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Sep 1 11:13:50 CEST 2014


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 <dilorenzo.sebastian at gmail.com> 1400058009 +0200	pull: Fast-forward
 e244c2ac30341cbf8f109cc96f7661258e9baa93 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1400059317 +0200	pull: Fast-forward
 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 6734fab24795a8c823c6a97e0131fcfe5a235107 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1401270131 +0200	pull: Fast-forward
+6734fab24795a8c823c6a97e0131fcfe5a235107 cefeee2662b45c7daf3b8916b967173f68b6ddcf Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 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 <dilorenzo.sebastian at gmail.com> 1400058009 +0200	pull: Fast-forward
 e244c2ac30341cbf8f109cc96f7661258e9baa93 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1400059317 +0200	pull: Fast-forward
 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 6734fab24795a8c823c6a97e0131fcfe5a235107 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1401270131 +0200	pull: Fast-forward
+6734fab24795a8c823c6a97e0131fcfe5a235107 cefeee2662b45c7daf3b8916b967173f68b6ddcf Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 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 <S_D at array-47-13.medsci.uu.se> 1400058009 +0200	pull: fast-forward
 e244c2ac30341cbf8f109cc96f7661258e9baa93 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 Sebastian DiLorenzo <S_D at array-47-13.medsci.uu.se> 1400059317 +0200	pull: fast-forward
 90e8ee38aac7ead43935bd7034bd4f11f91d19c4 6734fab24795a8c823c6a97e0131fcfe5a235107 Sebastian DiLorenzo <S_D at array-47-13.medsci.uu.se> 1401270130 +0200	pull: fast-forward
+6734fab24795a8c823c6a97e0131fcfe5a235107 cefeee2662b45c7daf3b8916b967173f68b6ddcf Sebastian DiLorenzo <S_D at Sebastians-iMac.local> 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)



More information about the Patchwork-commits mailing list