[Patchwork-commits] r137 - pkg/patchwork pkg/patchwork/R pkg/patchwork/man pkg/patchworkData/inst/extdata www

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 25 15:04:38 CEST 2012


Author: sebastian_d
Date: 2012-06-25 15:04:38 +0200 (Mon, 25 Jun 2012)
New Revision: 137

Added:
   pkg/patchworkData/inst/extdata/hg18.chr1.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr10.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr11.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr12.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr13.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr14.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr15.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr16.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr17.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr18.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr19.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr2.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr20.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr21.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr22.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr3.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr4.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr5.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr6.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr7.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr8.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chr9.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chrX.mark.rds
   pkg/patchworkData/inst/extdata/hg18.chrY.mark.rds
Modified:
   pkg/patchwork/NAMESPACE
   pkg/patchwork/R/patchwork.Medians_n_AI.r
   pkg/patchwork/R/patchwork.copynumbers.r
   pkg/patchwork/R/patchwork.plot.r
   pkg/patchwork/R/patchwork.readChroms.r
   pkg/patchwork/R/subfunctions_copynumbers.r
   pkg/patchwork/man/patchwork.copynumbers.Rd
   pkg/patchwork/man/patchwork.plot.Rd
   www/pw_demo.php
   www/pw_exec.php
   www/pw_inst.php
   www/pw_requ.php
Log:
Extensive changes, adding support for hg18, adding additional info regarding sex chromosomes, updateing homepage

Modified: pkg/patchwork/NAMESPACE
===================================================================
--- pkg/patchwork/NAMESPACE	2012-06-25 12:51:00 UTC (rev 136)
+++ pkg/patchwork/NAMESPACE	2012-06-25 13:04:38 UTC (rev 137)
@@ -19,4 +19,5 @@
 		weightedMean,
 		is.autosome,
 		deChrom_ucsc,
-		chrom_ucsc)
\ No newline at end of file
+		chrom_ucsc,
+		assignAI)
\ No newline at end of file

Modified: pkg/patchwork/R/patchwork.Medians_n_AI.r
===================================================================
--- pkg/patchwork/R/patchwork.Medians_n_AI.r	2012-06-25 12:51:00 UTC (rev 136)
+++ pkg/patchwork/R/patchwork.Medians_n_AI.r	2012-06-25 13:04:38 UTC (rev 137)
@@ -7,10 +7,13 @@
 		ix = kbsegs$chr==as.character(segs$chr[i]) & ( kbsegs$pos > segs$start[i] & kbsegs$pos < segs$end[i] )
 		segs$median[i] = median(kbsegs$ratio[ix])
 
-		ix = alf$achr==as.character(segs$chr[i]) & ( alf$apos > segs$start[i] & alf$apos < segs$end[i] )
-		segs$snvs[i] = sum(ix)
-		segs$ai[i] = 1 - sum(alf$amin[ix]) / sum(alf$amax[ix])
+		ix2 = alf$achr==as.character(segs$chr[i]) & ( alf$apos > segs$start[i] & alf$apos < segs$end[i] )
+		segs$snvs[i] = sum(ix2)
+		segs$ai[i] = 1 - sum(alf$amin[ix2]) / sum(alf$amax[ix2])
+		#This used for assignAI / updated AI calculation
+		#segs$ai[i]=median(kbsegs$ai[ix],na.rm=T)
 		}
 	segs$ai[is.nan(segs$ai)]=0
+	segs = segs[!is.na(segs$ai),]
 	return(segs)
 	}
\ No newline at end of file

Modified: pkg/patchwork/R/patchwork.copynumbers.r
===================================================================
--- pkg/patchwork/R/patchwork.copynumbers.r	2012-06-25 12:51:00 UTC (rev 136)
+++ pkg/patchwork/R/patchwork.copynumbers.r	2012-06-25 13:04:38 UTC (rev 137)
@@ -1,12 +1,18 @@
-patchwork.copynumbers = function(name = "copynumbers_",cn2,delta,het,hom,maxCn=8,ceiling=1,forcedelta=F,male.sample=F,male2femref=F)
+patchwork.copynumbers = function(CNfile,cn2,delta,het,hom,maxCn=8,ceiling=1,forcedelta=F,male.sample=F,male2femref=F)
 	{
 	
 	#packagepath = system.file(package="patchwork")
 	#load(paste(packagepath,"/data/commonSnps132.RData",sep=""))
 	#load(paste(packagepath,"/data/ideogram.RData",sep=""))
 	data(ideogram,package="patchworkData")
-	load("copynumbers.Rdata")
+	load(CNfile)
 
+    name = strsplit(tolower(CNfile),"_copynumbers.rdata")
+
+    name = strsplit(name[[1]],"/")
+
+    name = name[[1]][length(name[[1]])]
+
 	voidchrom <- c('chrX','chrY') # may add non-integer chroms here....
 
     tix=NULL     #temporary index
@@ -310,7 +316,7 @@
 
     regions$meanCn <- meanCn
     regions$tumor_percent <- tumor_percent
-    write.csv(regions,file='Copynumbers.csv')
+    write.csv(regions,file=paste(name,'_Copynumbers.csv',sep=""))
 
 
 	karyotype_check(regions$chr,regions$start,regions$end,regions$mean,regions$ai,

Modified: pkg/patchwork/R/patchwork.plot.r
===================================================================
--- pkg/patchwork/R/patchwork.plot.r	2012-06-25 12:51:00 UTC (rev 136)
+++ pkg/patchwork/R/patchwork.plot.r	2012-06-25 13:04:38 UTC (rev 137)
@@ -1,9 +1,15 @@
-patchwork.plot <- function(BamFile,Pileup,reference=NULL,normal.bam=NULL,normal.pileup=NULL,Alpha=0.0001,SD=1)
+patchwork.plot <- function(BamFile,Pileup,Reference=NULL,Normal.bam=NULL,Normal.pileup=NULL,Alpha=0.0001,SD=1)
 	{
 
+	name = strsplit(tolower(BamFile),".bam")
+
+	name = strsplit(name[[1]],"/")
+
+	name = name[[1]][length(name[[1]])]
+
 	#Attempt to read file pile.alleles, incase its already been created.
 	alf <- normalalf <- NULL
-	try( load("pile.alleles.Rdata"), silent=TRUE )
+	try( load(paste(name,"_pile.alleles.Rdata",sep="")), silent=TRUE )
 	
 	#If it wasnt created, create it using the perl script pile2alleles.pl
 	#which is included in the package. Creates pile.alleles in whichever folder
@@ -11,10 +17,10 @@
 	if(is.null(alf))
 		{
 		cat("Initiating Allele Data Generation \n")
-		if (!is.null(normal.pileup)) normalalf <- patchwork.alleledata(normal.pileup)
+		if (!is.null(Normal.pileup)) normalalf <- patchwork.alleledata(Normal.pileup)
 		alf = patchwork.alleledata(Pileup, normalalf=normalalf)
 		cat("Allele Data Generation Complete \n")
-		save(alf,file="pile.alleles.Rdata")
+		save(alf,file=paste(name,"_pile.alleles.Rdata",sep=""))
 		}
 	
 	#Generate chroms object depending on the naming in pileup (alf).
@@ -25,7 +31,7 @@
 	
 	## Read coverage data. If already done, will load "data.Rdata" instead.
 	data <- normaldata <- NULL
-	try ( load('data.Rdata'), silent=TRUE )
+	try ( load(paste(name,"_data.Rdata",sep="")), silent=TRUE )
 	
 	#If data object does not exist, IE it was not loaded in the previous line
 	#perform the function on the chromosomes to create the object.
@@ -33,7 +39,7 @@
 		cat("Initiating Read Chromosomal Coverage \n")
 		data = patchwork.readChroms(BamFile,chroms)
 		cat("Read Chromosomal Coverage Complete \n")
-		save(data,file='data.Rdata')
+		save(data,file=paste(name,"_data.Rdata",sep=""))
 	}
 	
 	#Perform GC normalization if the amount of columns indicate that gc normalization
@@ -42,17 +48,17 @@
 		cat("Initiating GC Content Normalization \n")
 		data = patchwork.GCNorm(data)
 		cat("GC Content Normalization Complete \n")
-		save(data,file='data.Rdata')
+		save(data,file=paste(name,"_data.Rdata",sep=""))
 	}
 	#after this, no further normalization was done on reference sequences.
 
 	#If matched normal bam file was defined, load and normalize it the same way.
-	if (!is.null(normal.bam) & is.null(reference)) {
+	if (!is.null(Normal.bam) & is.null(Reference)) {
 		normaldata=NULL
-		try ( load('normaldata.Rdata'), silent=TRUE )
+		try ( load(paste(name,"_normaldata.Rdata",sep="")), silent=TRUE )
 		if(is.null(normaldata)) {
 			cat("Initiating Read Chromosomal Coverage (matched normal) \n")
-			normaldata = patchwork.readChroms(normal.bam,chroms)
+			normaldata = patchwork.readChroms(Normal.bam,chroms)
 			cat("Read Chromosomal Coverage Complete (matched normal) \n")
 		}	
 		if(length(normaldata) != 3) {
@@ -60,7 +66,7 @@
 			normaldata = patchwork.GCNorm(normaldata[,1:6])
 			cat("GC Content Normalization Complete (matched normal) \n")
 			normaldata <- data.frame(chr=normaldata$chr,pos=normaldata$pos,normal=normaldata$norm)
-			save(normaldata,file='normaldata.Rdata')
+			save(normaldata,file=paste(name,"_normaldata.Rdata",sep=""))
 		}
 		#save(normaldata,file='normaldata.Rdata')
 	} 
@@ -68,19 +74,19 @@
 	
 	# Smooth the data.
 	kbsegs = NULL
-	try( load("smoothed.Rdata"), silent=TRUE )	
+	try( load(paste(name,"_smoothed.Rdata",sep="")), silent=TRUE )	
 	if(length(kbsegs) == 0)
 		{
 		cat("Initiating Smoothing \n")
-		kbsegs = patchwork.smoothing(data,normaldata,reference,chroms)
-		save(kbsegs,file="smoothed.Rdata")
+		kbsegs = patchwork.smoothing(data,normaldata,Reference,chroms)
+		save(kbsegs,file=paste(name,"_smoothed.Rdata",sep=""))
 		cat("Smoothing Complete \n")
 		}
 	
 	#Segment the data.
 	library(DNAcopy)
 	segs = NULL
-	try( load("Segments.Rdata"), silent=TRUE )
+	try( load(paste(name,"_Segments.Rdata",sep="")), silent=TRUE )
 	if(length(segs) == 0)
 		{
 		cat("Initiating Segmentation \n")
@@ -88,32 +94,39 @@
 		cat("installed the R package DNAcopy. See the homepage, http://patchwork.r-forge.r-project.org/ ,
 			or ?patchwork.readme for installation instructions. \n")
 		segs = patchwork.segment(kbsegs,chroms,Alpha,SD)
-		save(segs,file="Segments.Rdata")
+		save(segs,file=paste(name,"_Segments.Rdata",sep=""))
 		cat("Segmentation Complete \n")
 		}
+
+#Assign AI to kbsegs. (not in use atm)
+object = assignAI(alf$achr,alf$apos,alf$amin,alf$amax,
+	kbsegs$chr,(kbsegs$pos-5000),(kbsegs$pos+5000))
+
+kbsegs = cbind(kbsegs[,1:5],object[,4])
+colnames(kbsegs)=c("chr","pos","coverage","refcoverage","ratio","ai")
 		
 	if(length(segs) == 6)
 		{
 		#Get medians and AI for the segments.
 		cat("Initiating Segment data extraction (Medians and AI) \n")
 		segs = patchwork.Medians_n_AI(segs,kbsegs,alf)
-		save(segs,file="Segments.Rdata")
+		save(segs,file=paste(name,"_Segments.Rdata",sep=""))
 		cat("Segment data extraction Complete \n \n \n")
 		}
 	
-	cat("Saving information objects needed for patchwork.copynumbers in copynumbers.Rdata \n \n \n")
-	save(segs,alf,kbsegs,file="copynumbers.Rdata")
+	cat(paste("Saving information objects needed for patchwork.copynumbers() in ",name,"_copynumbers.Rdata \n \n \n",sep=""))
+	save(segs,alf,kbsegs,file=paste(name,"_copynumbers.Rdata",sep=""))
 	
 	#Plot it
 	cat("Initiating Plotting \n")
 	karyotype(segs$chr,segs$start,segs$end,segs$median,segs$ai,
-			name=as.character(BamFile),
+			name=as.character(name),
 			xlim=c(0,2.4),
 			ylim=c(0.1,1))
 	karyotype_chroms(segs$chr,segs$start,segs$end,segs$median,segs$ai,
 			kbsegs$chr,kbsegs$pos,kbsegs$ratio,
 			alf$achr,alf$apos,(1-alf$amin/alf$amax),
-			name=as.character(BamFile),
+			name=as.character(name),
 			xlim=c(0,2.4),
 			ylim=c(0.1,1))
 	cat("Plotting Complete \n")

Modified: pkg/patchwork/R/patchwork.readChroms.r
===================================================================
--- pkg/patchwork/R/patchwork.readChroms.r	2012-06-25 12:51:00 UTC (rev 136)
+++ pkg/patchwork/R/patchwork.readChroms.r	2012-06-25 13:04:38 UTC (rev 137)
@@ -55,7 +55,26 @@
 		system(paste("python .python/Pysamloader.py ",BamFile," ",c,sep =""))
 		# Load the newly created position file
 		unix = read.csv(".Tmp_chr_pos",sep='',header=F)$V1 + readlength/2
-		gc = readRDS(paste(datapath,"/extdata/",c,".mark.rds",sep=""))
+
+		#on chromosome 1, if the positions start below 10000 the hg18 has been
+		#used for mapping. Otherwise its probably the hg19.
+		if (c == chroms[1])
+			{
+			if (unix[1] <= 10000)
+				{
+				hg18 = TRUE
+				}
+			}
+
+		if (hg18==T)
+			{
+			gc = readRDS(paste(datapath,"/extdata/hg18.",c,".mark.rds",sep=""))
+			}
+		else
+			{
+			gc = readRDS(paste(datapath,"/extdata/",c,".mark.rds",sep=""))
+			}
+
 		xpos=gc[,1]
 		xgc=gc[,2]
 		xgck=gc[,3]

Modified: pkg/patchwork/R/subfunctions_copynumbers.r
===================================================================
--- pkg/patchwork/R/subfunctions_copynumbers.r	2012-06-25 12:51:00 UTC (rev 136)
+++ pkg/patchwork/R/subfunctions_copynumbers.r	2012-06-25 13:04:38 UTC (rev 137)
@@ -47,4 +47,48 @@
   return(out)
 }
 
+assignAI <- function(snp_chr,snp_pos,snp_min,snp_max,seg_chr,seg_start,seg_end) 
+{
+    nchr <- length(chrs <- unique(seg_chr))
+    ai <- NULL
+    if (nchr>1) 
+      {
+        for (c in 1:nchr) 
+          {
+            ix <- seg_chr==chrs[c]
+            ai <- rbind(ai,cbind(chrs[c],assignAI(snp_chr,snp_pos,snp_min,snp_max,seg_chr[ix],seg_start[ix],seg_end[ix])))
+          }
+        colnames(ai) <- c('chr','pos','end','ai')
+        return(ai)
+      } 
+      else 
+        {
+        ix <- snp_chr==seg_chr[1]
+        snp_pos <- snp_pos[ix]
+        snp_min <- snp_min[ix]
+        snp_max <- snp_max[ix]
+        
+        matrix <- rbind(cbind(snp_pos,snp_min,snp_max),cbind(seg_start,-1,-1),cbind(seg_end,-2,-2))
+        matrix <- matrix[order(matrix[,2]),]
+        matrix <- matrix[order(matrix[,1]),]
+        startix <- which(matrix[,2]==-1)
+        endix <- which(matrix[,2]==-2)
+        
+        pos <- matrix[,1]; min <- matrix[,2]; max <- matrix[,3]
+        nseg <- length(startix)
+        ai=rep(NA,nseg)
+        for (i in 1:nseg) 
+          {
+            if (endix[i]-startix[i] > 1) 
+              {
+                ai[i] <- 1 - sum(min[ (startix[i]+1):(endix[i]-1) ]) / sum(max[ (startix[i]+1):(endix[i]-1) ])
+                #if (ai[i]>1) {
+                #    cat(startix[i],endix[i],min[ (startix[i]+1):(endix[i]-1) ],max[ (startix[i]+1):(endix[i]-1) ],'\n')
+                #}
+              }
+          }
+        return(data.frame(begin=sort(seg_start),end=sort(seg_end),ai=ai))
+        }
+}
+
 ###################################
\ No newline at end of file

Modified: pkg/patchwork/man/patchwork.copynumbers.Rd
===================================================================
--- pkg/patchwork/man/patchwork.copynumbers.Rd	2012-06-25 12:51:00 UTC (rev 136)
+++ pkg/patchwork/man/patchwork.copynumbers.Rd	2012-06-25 13:04:38 UTC (rev 137)
@@ -13,17 +13,15 @@
 
 See argument details.
 
-\bold{Very important: For this function to work you must have the file copynumbers.Rdata,
-generated using patchwork.plot function, in your working directory!}
 }
 
 \usage{
-patchwork.copynumbers(name="copynumbers_",cn2,delta,het,hom,maxCn=8,ceiling=1,forcedelta=F)
+patchwork.copynumbers(CNfile,cn2,delta,het,hom,maxCn=8,ceiling=1,forcedelta=F)
 }
 
 \arguments{
-	\item{name}{
-	Default is "copynumbers_". First part of output name for plots generated from patchwork.copynumbers().
+	\item{CNfile}{
+	The name and path of your copynumbers file, generated from patchwork.plot(). Example Myfile_copynumbers.Rdata.
 	}
   \item{cn2}{
 	The approximate position of copy number 2,diploid, on total intensity axis.
@@ -50,9 +48,8 @@
 }
 
 \details{
-1. Run the patchwork.plot correctly. This will generate copynumbers.Rdata.
+1. Run the patchwork.plot correctly. This will generate <yourfile>_copynumbers.Rdata.
 2. View your plots and decide the correct parameters for the other arguments of this function.
-3. Make sure copynumbers.Rdata is in your working directory.
 4. Run the function.
 }
 

Modified: pkg/patchwork/man/patchwork.plot.Rd
===================================================================
--- pkg/patchwork/man/patchwork.plot.Rd	2012-06-25 12:51:00 UTC (rev 136)
+++ pkg/patchwork/man/patchwork.plot.Rd	2012-06-25 13:04:38 UTC (rev 137)
@@ -14,12 +14,12 @@
 For now the package is only able to run on unix based systems since it uses
 several system commands when executing such as cp and rm.
 
-\bold{You should use either the reference parameter OR the normal.bam and normal.pileup parameters.}
+\bold{You should use either the reference parameter OR the Normal.bam and Normal.pileup parameters.}
 
 }
 
 \usage{
-patchwork.plot(BamFile,Pileup,reference=NULL,normal.bam=NULL,normal.pileup=NULL,Alpha=0.0001,SD=1)
+patchwork.plot(BamFile,Pileup,Reference=NULL,Normal.bam=NULL,Normal.pileup=NULL,Alpha=0.0001,SD=1)
 }
 
 \arguments{
@@ -30,15 +30,15 @@
 	Pileup file generated through 
 	samtools -vcf reference.fasta bamfile > outfile.
 	}
-  \item{reference}{
+  \item{Reference}{
   	Default is NULL.
 	Path to a reference file that can be created using patchwork.createreference() or downloaded from patchworks homepage.
 	}
-	\item{normal.bam}{
+	\item{Normal.bam}{
 	Default is NULL.
 	The matched normal sample of the your BamFile.
 	}
-	\item{normal.pileup}{
+	\item{Normal.pileup}{
 	Default is NULL.
 	The pileup of your normal sample.
 	}
@@ -60,25 +60,14 @@
 will end up with a complete mess and probably runtime errors as patchwork
 tries to run simultaniously for multiple samples in the same working directory.}
 
-Upon completion of the the method you may receive the following kinds of warnings:
+Upon completion of the function you may receive some warning messages.
 
-Warning messages: \cr
-1: In readChar(con, 5L, useBytes = TRUE) : \cr
-  cannot open compressed file 'data.Rdata', probable reason 'No such file or directory' \cr
-2: In readChar(con, 5L, useBytes = TRUE) : \cr
-  cannot open compressed file 'pile.alleles.Rdata', probable reason 'No such file or directory' \cr
-  2: In readChar(con, 5L, useBytes = TRUE) : \cr
-  cannot open compressed file 'Segments.Rdata.Rdata', probable reason 'No such file or directory' \cr
-
-etc...  
-
 This is not unusal, it just means that it is the first time you've run the patchwork.plot function in this directory.
-The patchwork function will check if you have data.Rdata or pile.alleles.Rdata etc
+The patchwork function will check if you have some of the saved .Rdata files
 in your working directory to avoid remaking these, should they already exist.
 
 \bold{This also means that to make a completely clean run of patchwork.plot you need to
-delete data.Rdata, copynumbers.Rdata,pile.alleles.Rdata,smoothed.Rdata,Segments.Rdata from your
-working directory!!}
+delete <filename>_data.Rdata, <filename>_copynumbers.Rdata, <filename>_pile.alleles.Rdata, <filename>_smoothed.Rdata, <filename>_Segments.Rdata from your working directory!!}
 }
 
 %\value{

Added: pkg/patchworkData/inst/extdata/hg18.chr1.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr1.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr10.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr10.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr11.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr11.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr12.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr12.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr13.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr13.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr14.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr14.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr15.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr15.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr16.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr16.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr17.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr17.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr18.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr18.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr19.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr19.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr2.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr2.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr20.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr20.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr21.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr21.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr22.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr22.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr3.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr3.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr4.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr4.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr5.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr5.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr6.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr6.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr7.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr7.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr8.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr8.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chr9.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chr9.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chrX.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chrX.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: pkg/patchworkData/inst/extdata/hg18.chrY.mark.rds
===================================================================
(Binary files differ)


Property changes on: pkg/patchworkData/inst/extdata/hg18.chrY.mark.rds
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: www/pw_demo.php
===================================================================
--- www/pw_demo.php	2012-06-25 12:51:00 UTC (rev 136)
+++ www/pw_demo.php	2012-06-25 13:04:38 UTC (rev 137)
@@ -212,7 +212,7 @@
 Segment data extraction Complete 
  
  
-Saving information objects needed for patchwork.copynumbers in copynumbers.Rdata 
+Saving information objects needed for patchwork.copynumbers in tumor_copynumbers.Rdata 
  
  
 Initiating Plotting 
@@ -220,15 +220,15 @@
 Shutting down..... 
 Warning messages:
 1: In readChar(con, 5L, useBytes = TRUE) :
-  cannot open compressed file 'pile.alleles.Rdata', probable reason 'No such file or directory'
+  cannot open compressed file 'tumor_pile.alleles.Rdata', probable reason 'No such file or directory'
 2: In readChar(con, 5L, useBytes = TRUE) :
-  cannot open compressed file 'data.Rdata', probable reason 'No such file or directory'
+  cannot open compressed file 'tumor_data.Rdata', probable reason 'No such file or directory'
 3: In if (system(paste("python ", getwd(), "/.python/Check.py", sep = ""),  :
   the condition has length > 1 and only the first element will be used
 4: In readChar(con, 5L, useBytes = TRUE) :
-  cannot open compressed file 'smoothed.Rdata', probable reason 'No such file or directory'
+  cannot open compressed file 'tumor_smoothed.Rdata', probable reason 'No such file or directory'
 5: In readChar(con, 5L, useBytes = TRUE) :
-  cannot open compressed file 'Segments.Rdata', probable reason 'No such file or directory'
+  cannot open compressed file 'tumor_Segments.Rdata', probable reason 'No such file or directory'
 
 #Note that these warning messages are completely fine. See "execution tab" for more info.
 
@@ -243,10 +243,10 @@
 Save workspace image? [y/n/c]: n
 
 ➜  pw_demo ls
-copynumbers__karyotype_check.png    Segments.Rdata
+copynumbers__karyotype_check.png    tumor_Segments.Rdata
 copynumbers__karyotypeCN.chr10.png  tumor.bam.karyotype.png
 copynumbers__karyotypeCN.chr11.png  tumor_pileup
-copynumbers__karyotypeCN.chr12.png  smoothed.Rdata
+copynumbers__karyotypeCN.chr12.png  tumor_smoothed.Rdata
 copynumbers__karyotypeCN.chr13.png  tumor.bam
 copynumbers__karyotypeCN.chr14.png  tumor.bam.bai
 copynumbers__karyotypeCN.chr15.png  tumor.bam_karyotype.chr10.png
@@ -269,24 +269,30 @@
 copynumbers__karyotypeCN.chrX.png   tumor.bam_karyotype.chr5.png
 copynumbers__karyotypeCN.chrY.png   tumor.bam_karyotype.chr6.png
 Copynumbers.csv 		    tumor.bam_karyotype.chr7.png
-copynumbers.Rdata                   tumor.bam_karyotype.chr8.png
-data.Rdata                          tumor.bam_karyotype.chr9.png
-datasolexa.RData                    tumor.bam_karyotype.chrX.png
+tumor_copynumbers.Rdata                   tumor.bam_karyotype.chr8.png
+tumor_data.Rdata                          tumor.bam_karyotype.chr9.png
+tumor_datasolexa.RData                    tumor.bam_karyotype.chrX.png
 pile.alleles                        tumor.bam_karyotype.chrY.png
-pile.alleles.Rdata                  
+tumor_pile.alleles.Rdata                  
 </pre>
 
 If successfull your working directory should now contain:
 <ul class="checks">
 	<li>50 plots</li>
-	<li>copynumbers.Rdata</li>
-	<li>data.Rdata</li>
+	<li>tumor_copynumbers.Rdata</li>
+	<li>tumor_data.Rdata</li>
 	<li>pile.alleles</li>
-	<li>pile.alleles.Rdata</li>
-	<li>Segments.Rdata</li>
-	<li>smoothed.Rdata</li>
+	<li>tumor_pile.alleles.Rdata</li>
+	<li>tumor_Segments.Rdata</li>
+	<li>tumor_smoothed.Rdata</li>
 </ul>
 <br />
+
+Note, as explained in the execution tab, that the files are named "tumor_" because the input .bam is named
+tumor.bam.
+<br /><br />
+
+
 Here are three of the plots to validate your plots with.
 <br /><br />
 

Modified: www/pw_exec.php
===================================================================
--- www/pw_exec.php	2012-06-25 12:51:00 UTC (rev 136)
+++ www/pw_exec.php	2012-06-25 13:04:38 UTC (rev 137)
@@ -167,7 +167,7 @@
 		Segment data extraction Complete 
 		 
 		 
-		Saving information objects needed for patchwork.copynumbers in copynumbers.Rdata 
+		Saving information objects needed for patchwork.copynumbers in (prefix)_copynumbers.Rdata 
 		 
 		 
 		Initiating Plotting 
@@ -177,18 +177,18 @@
 		(Some warning messages about trying to load the files in the checklist below is not uncommon)
 </pre>
 
-If you did it correctly it should have generated similar output as can be seen above.
 Your working directory should now have the plots generated from the function, 1 overview
  plot and 24 chromosomal plots. <br /><br />
 
-The working directory should also contain these files: <br />
+The working directory should also contain these files, where (prefix) is the name of your BAM file
+ without the .bam file ending : <br />
 <ul class="checks">
-	<li>copynumbers.Rdata</li>
-	<li>data.Rdata</li>
+	<li>(prefix)_copynumbers.Rdata</li>
+	<li>(prefix)_data.Rdata</li>
+	<li>(prefix)_pile.alleles.Rdata</li>
+	<li>(prefix)_Segments.Rdata</li>
+	<li>(prefix)_smoothed.Rdata</li>
 	<li>pile.alleles</li>
-	<li>pile.alleles.Rdata</li>
-	<li>Segments.Rdata</li>
-	<li>smoothed.Rdata</li>
 </ul>
 
 These were created for swifter re-runs of the function should something unforseen happen during execution.
@@ -208,7 +208,7 @@
  patchwork.copynumbers() is a function that determines which relationship between coverage
   and allelic imbalance signifies what copy number and allele ratio for each segment. <br /><br />
 
-The only file you absolutely must have in your working for the next part of execution is copynumbers.Rdata. <br /><br />
+The only file you absolutely must have in your working for the next part of execution is (prefix)_copynumbers.Rdata. <br /><br />
 
 Read the outstanding documentation for patchwork.copynumbers():<br />
 
@@ -221,12 +221,12 @@
 <pre>
 	Usage:
 
-	     patchwork.copynumbers(cn2,delta,het,hom,maxCn=8,ceiling=1,forcedelta=F)
+	     patchwork.copynumbers(CNfile,cn2,delta,het,hom,maxCn=8,ceiling=1,forcedelta=F)
 	     
 	Arguments:
 
-	    name: Default is "copynumbers_". First part of output name for plots
-	          generated from patchwork.copynumbers().
+	    CNfile: The name and path of your copynumbers file, generated from patchwork.plot().
+	    		Example Myfile_copynumbers.Rdata.
 	     cn2: The approximate position of copy number 2,diploid, on total
 	          intensity axis.
 	   delta: The difference in total intensity between consecutive copy

Modified: www/pw_inst.php
===================================================================
--- www/pw_inst.php	2012-06-25 12:51:00 UTC (rev 136)
+++ www/pw_inst.php	2012-06-25 13:04:38 UTC (rev 137)
@@ -22,7 +22,7 @@
     install.packages("patchwork", repos="http://R-Forge.R-project.org",type="source")
 </pre>
 
-If something still does not work with installation, here are links to the locations of the source files: <br />
+If something still does not work with installation, here are links to the location of the source files: <br />
 
 <a href="http://r-forge.r-project.org/R/?group_id=1250" target="_blank" style="text-decoration:none;">
 	Patchwork</a><br />

Modified: www/pw_requ.php
===================================================================
--- www/pw_requ.php	2012-06-25 12:51:00 UTC (rev 136)
+++ www/pw_requ.php	2012-06-25 13:04:38 UTC (rev 137)
@@ -8,7 +8,7 @@
 
 <ul class="checks">
 	<!-- <li>A Human Genome fasta file</li> -->
-	<li>A Sorted BAM file of tumor content</li>
+	<li>A aligned and sorted BAM file of tumor content</li>
 	<li>A BAI of your BAM file</li>
 	<li>A Pileup of your BAM file</li>
 	<li>(optional) A matched normal sample to your tumor in BAM format</li>
@@ -16,10 +16,11 @@
 	<li>(optional) A standard Reference file. (Illumina/Solexa, SOLiD or your own)</li>
 </ul>
 
+<!--
 The Human Genome fasta files can be found in many places. Here is a link for 1000genomes hosted
 HG19 <a href="ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/technical/reference/"
   target="_blank" style="text-decoration:none;">(human_g1k_v37)</a>. <br />
-You probably also used such a file when aligning your tumor sequence.<br /><br />
+You probably also used such a file when aligning your tumor sequence.<br /><br /> -->
 
 There are several (optional) files in the list, what we mean by this is that you do not need to have all these
 files. There is really no point in using all of them.
@@ -31,15 +32,15 @@
 You can also run patchwork.plot() with only a reference file.<br />
 <br />
 
-Here are two standard reference files. It is very important that you choose a reference
-matching the sequencing technology used on your tumor sample. <br />
+Here are two standard reference files for HG19. It is very important that you choose a reference
+matching the sequencing technology and reference genome used on your tumor sample.<br />
 
 <a href="http://130.238.204.28/open/patchwork/references/datasolexa.RData" target="_blank" style="text-decoration:none;">
 	Solexa/Illumina reference</a> <br />
 <a href="http://130.238.204.28/open/patchwork/references/datasolid.RData" target="_blank" style="text-decoration:none;">
 	SOLiD reference</a> <br /><br />
 
-There is also the option to create your own reference file, using patchworks.createreference().
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/patchwork -r 137


More information about the Patchwork-commits mailing list