[Patchwork-commits] r164 - .git .git/logs .git/logs/refs/heads .git/logs/refs/remotes/origin .git/refs/heads .git/refs/remotes/origin pkg/patchwork/R pkg/patchworkCG/R www

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Mar 12 14:34:04 CET 2013


Author: sebastian_d
Date: 2013-03-12 14:34:03 +0100 (Tue, 12 Mar 2013)
New Revision: 164

Modified:
   .git/COMMIT_EDITMSG
   .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/karyotype.r
   pkg/patchwork/R/karyotype_check.r
   pkg/patchwork/R/karyotype_chroms.r
   pkg/patchwork/R/karyotype_chromsCN.r
   pkg/patchwork/R/patchwork.alleledata.r
   pkg/patchwork/R/patchwork.plot.r
   pkg/patchworkCG/R/patchwork.CG.plot.r
   www/changelog.php
   www/pw_exec.php
Log:
Changes by markus to filter out alf heterozygous snps when lacking normal sample. Also some changes to plotting (titles) by sebastian.

Modified: .git/COMMIT_EDITMSG
===================================================================
--- .git/COMMIT_EDITMSG	2013-02-22 08:57:15 UTC (rev 163)
+++ .git/COMMIT_EDITMSG	2013-03-12 13:34:03 UTC (rev 164)
@@ -1 +1 @@
-some homepage updates from alexeys feedback
+Add titles to patchwork plots among other things

Modified: .git/index
===================================================================
(Binary files differ)

Modified: .git/logs/HEAD
===================================================================
--- .git/logs/HEAD	2013-02-22 08:57:15 UTC (rev 163)
+++ .git/logs/HEAD	2013-03-12 13:34:03 UTC (rev 164)
@@ -32,3 +32,5 @@
 acd7e59391651e7076a021090d6020f57da24098 f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1360761388 +0100	commit: Updated error handling in pile2alleles
 f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0 ae581e53647259304439e470cd67db340b07cb35 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1360838155 +0100	commit: Added somatic.Rdata output, also started modifying changelog. Need to change homepage in the future (when we have worked out the kinks) to reflect that patchwork outputs this information
 ae581e53647259304439e470cd67db340b07cb35 2fdc7676c81d53b78e022a0f9d97b06c7133fc0d Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1361523526 +0100	commit: some homepage updates from alexeys feedback
+2fdc7676c81d53b78e022a0f9d97b06c7133fc0d 5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1363092610 +0100	commit: Add titles to patchwork plots among other things
+5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 6a55102231aa819f1e4616dde7c28ea32af8a06c Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1363095404 +0100	pull : Fast-forward

Modified: .git/logs/refs/heads/master
===================================================================
--- .git/logs/refs/heads/master	2013-02-22 08:57:15 UTC (rev 163)
+++ .git/logs/refs/heads/master	2013-03-12 13:34:03 UTC (rev 164)
@@ -32,3 +32,5 @@
 acd7e59391651e7076a021090d6020f57da24098 f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1360761388 +0100	commit: Updated error handling in pile2alleles
 f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0 ae581e53647259304439e470cd67db340b07cb35 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1360838155 +0100	commit: Added somatic.Rdata output, also started modifying changelog. Need to change homepage in the future (when we have worked out the kinks) to reflect that patchwork outputs this information
 ae581e53647259304439e470cd67db340b07cb35 2fdc7676c81d53b78e022a0f9d97b06c7133fc0d Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1361523526 +0100	commit: some homepage updates from alexeys feedback
+2fdc7676c81d53b78e022a0f9d97b06c7133fc0d 5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1363092610 +0100	commit: Add titles to patchwork plots among other things
+5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 6a55102231aa819f1e4616dde7c28ea32af8a06c Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1363095404 +0100	pull : Fast-forward

Modified: .git/logs/refs/remotes/origin/master
===================================================================
--- .git/logs/refs/remotes/origin/master	2013-02-22 08:57:15 UTC (rev 163)
+++ .git/logs/refs/remotes/origin/master	2013-03-12 13:34:03 UTC (rev 164)
@@ -32,3 +32,5 @@
 acd7e59391651e7076a021090d6020f57da24098 f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1360761405 +0100	update by push
 f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0 ae581e53647259304439e470cd67db340b07cb35 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1360838170 +0100	update by push
 ae581e53647259304439e470cd67db340b07cb35 2fdc7676c81d53b78e022a0f9d97b06c7133fc0d Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1361523599 +0100	update by push
+2fdc7676c81d53b78e022a0f9d97b06c7133fc0d 5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1363092633 +0100	update by push
+5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 6a55102231aa819f1e4616dde7c28ea32af8a06c Sebastian DiLorenzo <S_D at imv071.medsci.uu.se> 1363095404 +0100	pull : fast-forward

Modified: .git/refs/heads/master
===================================================================
--- .git/refs/heads/master	2013-02-22 08:57:15 UTC (rev 163)
+++ .git/refs/heads/master	2013-03-12 13:34:03 UTC (rev 164)
@@ -1 +1 @@
-2fdc7676c81d53b78e022a0f9d97b06c7133fc0d
+6a55102231aa819f1e4616dde7c28ea32af8a06c

Modified: .git/refs/remotes/origin/master
===================================================================
--- .git/refs/remotes/origin/master	2013-02-22 08:57:15 UTC (rev 163)
+++ .git/refs/remotes/origin/master	2013-03-12 13:34:03 UTC (rev 164)
@@ -1 +1 @@
-2fdc7676c81d53b78e022a0f9d97b06c7133fc0d
+6a55102231aa819f1e4616dde7c28ea32af8a06c

Modified: pkg/patchwork/R/karyotype.r
===================================================================
--- pkg/patchwork/R/karyotype.r	2013-02-22 08:57:15 UTC (rev 163)
+++ pkg/patchwork/R/karyotype.r	2013-03-12 13:34:03 UTC (rev 164)
@@ -90,6 +90,10 @@
         		xaxt="n")
         	axis(1,cex.axis=1.5)
         	axis(2,cex.axis=1.5)
+            if(c==1)
+                {
+                title(main=paste("Sample: ",name,sep=""),cex.main=2)
+                }
 			par(new=F)  
     		}
     dev.off()

Modified: pkg/patchwork/R/karyotype_check.r
===================================================================
--- pkg/patchwork/R/karyotype_check.r	2013-02-22 08:57:15 UTC (rev 163)
+++ pkg/patchwork/R/karyotype_check.r	2013-03-12 13:34:03 UTC (rev 164)
@@ -56,6 +56,7 @@
         	xaxt="n")
         	axis(1,cex.axis=2)
         	axis(2,cex.axis=2)
+            title(main=paste("Sample: ",name,sep=""),cex.main=2)
         	
 		text(variants_data[,1],variants_data[,2],
         	labels=variants,

Modified: pkg/patchwork/R/karyotype_chroms.r
===================================================================
--- pkg/patchwork/R/karyotype_chroms.r	2013-02-22 08:57:15 UTC (rev 163)
+++ pkg/patchwork/R/karyotype_chroms.r	2013-03-12 13:34:03 UTC (rev 164)
@@ -94,6 +94,10 @@
         	axis(2,at=seq(0,1,0.1),cex.axis=2)
         	mtext(text="Allelic imbalance",side=2,line=4,las=3,cex=2)
         	mtext(text="Coverage, all segments",side=1,line=4,cex=2,las=1)
+            if(c==1)
+                {
+                title(main=paste("Sample: ",name,sep=""),cex.main=2)
+                }
 		
         	par(new=F)
         	mix <- mchr==as.character(this$chr)

Modified: pkg/patchwork/R/karyotype_chromsCN.r
===================================================================
--- pkg/patchwork/R/karyotype_chromsCN.r	2013-02-22 08:57:15 UTC (rev 163)
+++ pkg/patchwork/R/karyotype_chromsCN.r	2013-03-12 13:34:03 UTC (rev 164)
@@ -95,6 +95,10 @@
         	axis(2,at=seq(0,1,0.1),cex.axis=2)
         	mtext(text="Allelic imbalance",side=2,line=4,las=3,cex=2)
         	mtext(text="Coverage, all segments",side=1,line=4,cex=2,las=1)
+            if(c==1)
+                {
+                title(main=paste("Sample: ",name,sep=""),cex.main=2)
+                }
 		    	
 			col=rep('#000000',sum(ix))
         	col[pos[ix] < this$mid] <- loc_p[ceiling(pos[ix][pos[ix] < this$mid]/100)]

Modified: pkg/patchwork/R/patchwork.alleledata.r
===================================================================
--- pkg/patchwork/R/patchwork.alleledata.r	2013-02-22 08:57:15 UTC (rev 163)
+++ pkg/patchwork/R/patchwork.alleledata.r	2013-03-12 13:34:03 UTC (rev 164)
@@ -80,7 +80,10 @@
 		data(commonSnps132,package="patchworkData")
 		}
 
+	# Annotate with dbSNP
+	dbSnp=dbSnp[,c(1,3)]; dbSnp$dbSnp=T
 	alf=merge(alf,dbSnp[,c(1,3)], all.x=T, all.y=F, by=1:2)
+	alf$dbSnp[is.na(alf$dbSnp)]=F
 
 	#Finally, if a matched normal was available, remove SNPs that were not (somewhat) heterozygous there.
 	#if (!is.null(normalalf)) {

Modified: pkg/patchwork/R/patchwork.plot.r
===================================================================
--- pkg/patchwork/R/patchwork.plot.r	2013-02-22 08:57:15 UTC (rev 163)
+++ pkg/patchwork/R/patchwork.plot.r	2013-03-12 13:34:03 UTC (rev 164)
@@ -39,9 +39,7 @@
 			#Create normalalf
 			if (!is.null(Normal.pileup)) normalalf <- patchwork.alleledata(Normal.pileup, vcf=Normal.vcf)
 
-			alf = patchwork.alleledata(Tumor.pileup, 
-												#normalalf=normalalf,
-												vcf=Tumor.vcf)
+			alf = patchwork.alleledata(Tumor.pileup, vcf=Tumor.vcf)
 
 			# if(!is.null(Normal.pileup) & !is.null(Reference))
 			# 	{
@@ -63,6 +61,7 @@
 			save(alf, normalalf,file=paste(name,"_pile.alleles.Rdata",sep=""))
 			}
 	
+		## If there is a pileup for matched normal
 		if (!is.null(normalalf)) 
 			{
 			## Extract somatic variants
@@ -73,6 +72,10 @@
 			## Remove all but the heterozygous SNPs
 			normalalf <- normalalf[normalalf$amin/normalalf$atot > 0.2,]
 			alf <- merge(normalalf[,1:2],alf,by=1:2,all=F)
+			} else 
+			{ ## If there is NO pileup for matched normal
+				alf <- alf[alf$dbSnp==T,]
+				alf <- alf[alf$min>1 & alf$ref>2,]
 			}
 
 
@@ -193,7 +196,7 @@
 			ylim=c(0.1,1))
 	cat("Plotting Complete \n")
 	cat("patchwork.plot Complete.\n")
-	cat("Below you may see some warning messages, you can read about these on our homepage. They are nothing to be worried about. \n")
+	cat("Below you may see some warning messages, you can read about these on our homepage. They are either nothing to be worry about (\"Tried to load file, it didn't exist.\") or something you should send us an email about. \n")
 	}
 	
 	
\ No newline at end of file

Modified: pkg/patchworkCG/R/patchwork.CG.plot.r
===================================================================
--- pkg/patchworkCG/R/patchwork.CG.plot.r	2013-02-22 08:57:15 UTC (rev 163)
+++ pkg/patchworkCG/R/patchwork.CG.plot.r	2013-03-12 13:34:03 UTC (rev 164)
@@ -19,6 +19,21 @@
 		cat("\n","Enter complete path AND filename to your depthOfCoverage file:","\n")
 		dc = scan(n=1,what=character())
 		
+
+		#Check if the files exists
+		if(file.exists(mv)==F)
+			{
+			stop("The required file,masterVarBeta, could not be found. Did you input the correct path? See ?patchwork.CG.plot")
+			}
+		if(file.exists(sm)==F)
+			{
+			stop("The required file,somaticCnvSegmentsNondiploidBeta, could not be found. Did you input the correct path? See ?patchwork.CG.plot")
+			}
+		if(file.exists(dc)==F)
+			{
+			stop("The required file,depthOfCoverage, could not be found. Did you input the correct path? See ?patchwork.CG.plot")
+			}
+
 		skip_mv = scan(file=mv,n=1,what=character(),quiet=T)
 		i = 1
 		j = grep(">locus",skip_mv)
@@ -72,7 +87,21 @@
 		}
 	else if(length(masterVarBeta) == 1 & length(somaticCnvSegments) == 1 & length(depthOfCoverage) == 1)
 		{
-		
+
+		#Check if the files exists
+		if(file.exists(masterVarBeta)==F)
+			{
+			stop("The required file,masterVarBeta, could not be found. Did you input the correct path? See ?patchwork.CG.plot")
+			}
+		if(file.exists(masterVarBeta)==F)
+			{
+			stop("The required file,somaticCnvSegmentsNondiploidBeta, could not be found. Did you input the correct path? See ?patchwork.CG.plot")
+			}
+		if(file.exists(masterVarBeta)==F)
+			{
+			stop("The required file,depthOfCoverage, could not be found. Did you input the correct path? See ?patchwork.CG.plot")
+			}
+
 		mv_ = strsplit(masterVarBeta,"/")
 		sm_ = strsplit(somaticCnvSegments,"/")
 		dc_ = strsplit(depthOfCoverage,"/")
@@ -134,6 +163,7 @@
 		}
 	else
 		{
+		#Check that path is given
 		if(length(path)==0)
 			{
 			stop("You must input the required files, either by the path parameter, manual_file_input parameter or individual pointer parameters to the files in question. See ?patchwork.CG.plot")
@@ -143,6 +173,20 @@
 		segm_ = list.files(path=path_segm,pattern="somaticCnvSegmentsNondiploid")
 		depcov_ = list.files(path=path_segm,pattern="depthOfCoverage")
 		
+		#If the files were not found.
+		if(length(mastervar_)==0)
+			{
+			stop("The required file,masterVarBeta, could not be found. Did you input the correct path? See ?patchwork.CG.plot")
+			}
+		if(length(segm_)==0)
+			{
+			stop("The required file,somaticCnvSegmentsNondiploidBeta, could not be found. Did you input the correct path? See ?patchwork.CG.plot")
+			}
+		if(length(depcov_)==0)
+			{
+			stop("The required file,depthOfCoverage, could not be found. Did you input the correct path? See ?patchwork.CG.plot")
+			}
+
 		skip_mv = scan(file=paste(path,"/",mastervar_,sep=""),n=1,what=character(),quiet=T)
 		i = 1
 		j = grep(">locus",skip_mv)

Modified: www/changelog.php
===================================================================
--- www/changelog.php	2013-02-22 08:57:15 UTC (rev 163)
+++ www/changelog.php	2013-03-12 13:34:03 UTC (rev 164)
@@ -11,6 +11,8 @@
 <h6 style="display:inline-block;">2013</h6>
 <ul>
 	<li>Patchwork now gives you an additional file, <sample_name>_somatic.Rdata, which contains possible, unfiltered, somatic variants.</li>
+	<li>PatchworkCG now has better file handling to avoid an error where it would not start reading files but not give an error either.</li>
+	<li>Patchwork now includes sample filename as title in plot output.</li>
 </ul> -->
 
 <hr class="alt1" />

Modified: www/pw_exec.php
===================================================================
--- www/pw_exec.php	2013-02-22 08:57:15 UTC (rev 163)
+++ www/pw_exec.php	2013-03-12 13:34:03 UTC (rev 164)
@@ -17,7 +17,7 @@
 and used 10GB (out of 24GB available) RAM. However
 there are many factors that influence runtime so be generous with time/RAM allocation!)<br /><br />
 
-Initiate the R environment and load the patchwork and patchworkData libraries: <br />
+Start by initiate the R environment and loading the patchwork and patchworkData libraries: <br />
 
 <pre>
 	library(patchwork)
@@ -210,6 +210,8 @@
 		(Some warning messages about trying to load the files in the checklist below is not uncommon)
 </pre>
 
+If you get any errors not mentioned on the homepage please send us an <a onmouseover="popup('sebastian.dilorenzo(at)medsci.uu.se <br /> markus.mayrhofer(at)medsci.uu.se <br /> anders.isaksson(at)medsci.uu.se');">email</a>, and we will get back to you as soon as possible!<br /><br />
+
 Your working directory should now have the plots generated from the function, 1 overview
  plot and 24 chromosomal plots. <br /><br />
 



More information about the Patchwork-commits mailing list