[Patchwork-commits] r148 - .git .git/logs .git/logs/refs/heads .git/logs/refs/remotes/origin .git/refs/heads .git/refs/remotes/origin pkg/patchwork/man www

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 11 15:32:36 CEST 2012


Author: sebastian_d
Date: 2012-09-11 15:32:36 +0200 (Tue, 11 Sep 2012)
New Revision: 148

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/man/patchwork.plot.Rd
   www/AI_Cov.php
   www/changelog.php
   www/index.php
   www/pw_exec.php
   www/pw_inst.php
   www/pw_requ.php
   www/pw_resu.php
Log:
Updated homepage mpileup and other patchwork parts.

Modified: .git/COMMIT_EDITMSG
===================================================================
--- .git/COMMIT_EDITMSG	2012-08-31 14:06:07 UTC (rev 147)
+++ .git/COMMIT_EDITMSG	2012-09-11 13:32:36 UTC (rev 148)
@@ -1 +1 @@
-updated changelog and description
+Updated homepage info

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

Modified: .git/logs/HEAD
===================================================================
--- .git/logs/HEAD	2012-08-31 14:06:07 UTC (rev 147)
+++ .git/logs/HEAD	2012-09-11 13:32:36 UTC (rev 148)
@@ -16,3 +16,4 @@
 35f1886365a9d8657fba40e6e1e535b07a8d3968 dce9edf1dd01665c7e266395f3ad217738315c02 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1346418135 +0200	commit: kommented line 42 pw.alleledata
 dce9edf1dd01665c7e266395f3ad217738315c02 d5df007a35dcbf109f45dd0c15d100996ee41b9b Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1346420997 +0200	commit: update homepage info slightly
 d5df007a35dcbf109f45dd0c15d100996ee41b9b 0ea92759a953e9e176617cf22b4050ce2fed0bef Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1346421578 +0200	commit: updated changelog and description
+0ea92759a953e9e176617cf22b4050ce2fed0bef 0de5cb34cc64ebefb98b257d93c88bfd65c7f640 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1347370308 +0200	commit: Updated homepage info

Modified: .git/logs/refs/heads/master
===================================================================
--- .git/logs/refs/heads/master	2012-08-31 14:06:07 UTC (rev 147)
+++ .git/logs/refs/heads/master	2012-09-11 13:32:36 UTC (rev 148)
@@ -16,3 +16,4 @@
 35f1886365a9d8657fba40e6e1e535b07a8d3968 dce9edf1dd01665c7e266395f3ad217738315c02 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1346418135 +0200	commit: kommented line 42 pw.alleledata
 dce9edf1dd01665c7e266395f3ad217738315c02 d5df007a35dcbf109f45dd0c15d100996ee41b9b Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1346420997 +0200	commit: update homepage info slightly
 d5df007a35dcbf109f45dd0c15d100996ee41b9b 0ea92759a953e9e176617cf22b4050ce2fed0bef Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1346421578 +0200	commit: updated changelog and description
+0ea92759a953e9e176617cf22b4050ce2fed0bef 0de5cb34cc64ebefb98b257d93c88bfd65c7f640 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1347370308 +0200	commit: Updated homepage info

Modified: .git/logs/refs/remotes/origin/master
===================================================================
--- .git/logs/refs/remotes/origin/master	2012-08-31 14:06:07 UTC (rev 147)
+++ .git/logs/refs/remotes/origin/master	2012-09-11 13:32:36 UTC (rev 148)
@@ -16,3 +16,4 @@
 35f1886365a9d8657fba40e6e1e535b07a8d3968 dce9edf1dd01665c7e266395f3ad217738315c02 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1346418153 +0200	update by push
 dce9edf1dd01665c7e266395f3ad217738315c02 d5df007a35dcbf109f45dd0c15d100996ee41b9b Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1346421012 +0200	update by push
 d5df007a35dcbf109f45dd0c15d100996ee41b9b 0ea92759a953e9e176617cf22b4050ce2fed0bef Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1346421591 +0200	update by push
+0ea92759a953e9e176617cf22b4050ce2fed0bef 0de5cb34cc64ebefb98b257d93c88bfd65c7f640 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1347370323 +0200	update by push

Modified: .git/refs/heads/master
===================================================================
--- .git/refs/heads/master	2012-08-31 14:06:07 UTC (rev 147)
+++ .git/refs/heads/master	2012-09-11 13:32:36 UTC (rev 148)
@@ -1 +1 @@
-0ea92759a953e9e176617cf22b4050ce2fed0bef
+0de5cb34cc64ebefb98b257d93c88bfd65c7f640

Modified: .git/refs/remotes/origin/master
===================================================================
--- .git/refs/remotes/origin/master	2012-08-31 14:06:07 UTC (rev 147)
+++ .git/refs/remotes/origin/master	2012-09-11 13:32:36 UTC (rev 148)
@@ -1 +1 @@
-0ea92759a953e9e176617cf22b4050ce2fed0bef
+0de5cb34cc64ebefb98b257d93c88bfd65c7f640

Modified: pkg/patchwork/man/patchwork.plot.Rd
===================================================================
--- pkg/patchwork/man/patchwork.plot.Rd	2012-08-31 14:06:07 UTC (rev 147)
+++ pkg/patchwork/man/patchwork.plot.Rd	2012-09-11 13:32:36 UTC (rev 148)
@@ -27,10 +27,11 @@
   	Path to an aligned and sorted Tumor Bam-file.
 	}
   	\item{Tumor.pileup}{
-	Pileup file generated through 
-	samtools -vcf reference.fasta tumor.bam > outfile (SAMtools v0.1.16 or older)
-	or through
-	samtools mpileup -f reference.fasta tumor.bam > outfile (SAMtools v0.1.17 or newer).
+	Pileup file generated by either 
+	(SAMtools v 0.1.16 or older)
+	samtools -vcf reference.fasta tumor.bam > outfile
+	or (SAMtools v 0.1.17 or newer)
+	samtools mpileup -f reference.fasta tumor.bam > outfile
 	}
 	\item{Tumor.vcf}{
 	Default is NULL. 
@@ -56,7 +57,7 @@
 	\item{Reference}{
   	Default is NULL.
 	Path to a reference file that can be created using patchwork.createreference() or downloaded from patchworks homepage
-	where applicable.
+	when applicable.
 	}
 	\item{Alpha}{
 	Default 0.0001, change if you want to try to get a better segmentation from patchwork.segment().

Modified: www/AI_Cov.php
===================================================================
--- www/AI_Cov.php	2012-08-31 14:06:07 UTC (rev 147)
+++ www/AI_Cov.php	2012-09-11 13:32:36 UTC (rev 148)
@@ -35,11 +35,11 @@
 
 
 		What this basically does is separate chromosomal regions by their allele constitution. -->
-		Allelic-imbalance basically separates chromosomal regions by their allele constitution.
-		A normal diploid person will have one maternal and one paternal copy of a chromosome.
+		Allelic-imbalance separates chromosomal regions by their allele constitution.
+		A diploid cell, which is the norm, will have one maternal and one paternal copy of a chromosome.
 		For each copy number there can be losses of segments to either of the
-		chromosomes as well as copies/gains. It is this allele-specific information that our
-		allelic imbalance captures. It does not, however, distinguish the origin of a segment,
+		chromosomes as well as copies/gains. It is this allele-specific information that
+		allelic imbalance captures. It does not, however, discern the origin of a segment,
 		that is to say that two paternal copies have the same allelic imbalance ratio as two
 		 maternal copies. Below is an attempt to explain the different possible allelic combinations
 		 for a few copy numbers,
@@ -67,7 +67,7 @@
 
 		<tr style="height:66px">
 			<th style="border-bottom:1px solid black;">Copy Number</th>
-			<th colspan=3 style="border-bottom:1px solid black;">Possible segment combinations</th>
+			<th colspan=3 style="border-bottom:1px solid black;">Possible chromosomal segment combinations</th>
 		</tr>
 
 		<tr>
@@ -172,7 +172,7 @@
 
 		</table><br />
 
-		Here is a an example of a plot generated using patchworks where I have added the possible
+		Here is a an example of a plot generated using patchwork where I have added the possible
 		allele combinations next to the clusters. <br />
 
 		<img src="css/img/Allelic_plot.png" alt="Allele-specific tutorial" title="Allele-specific graphic guide"

Modified: www/changelog.php
===================================================================
--- www/changelog.php	2012-08-31 14:06:07 UTC (rev 147)
+++ www/changelog.php	2012-09-11 13:32:36 UTC (rev 148)
@@ -7,6 +7,14 @@
 
 <hr class="alt1" />
 
+<h5 style="display:inline-block;">Homepage - </h5><div style="display:inline-block; width:1px;"></div>
+<h6 style="display:inline-block;">11/09/2012</h6>
+<ul>
+	<li>Changes and updates to all information in tabs under Patchwork</li>
+</ul>
+
+<hr class="alt1" />
+
 <h5 style="display:inline-block;">patchwork v2.2 - </h5><div style="display:inline-block; width:1px;"></div>
 <h6 style="display:inline-block;">31/08/2012</h6>
 <ul>

Modified: www/index.php
===================================================================
--- www/index.php	2012-08-31 14:06:07 UTC (rev 147)
+++ www/index.php	2012-09-11 13:32:36 UTC (rev 148)
@@ -232,7 +232,7 @@
 			<!-- End of StatCounter Code for Default Guide -->
 			<div style="display:inline-block; width:2px; height:1px;"></div>
 			<!-- LAST MODIFIED -->
-			Last modified: 2012-08-31
+			Last modified: 2012-09-11
 
 
 		</div>
@@ -242,7 +242,7 @@
 		    <a href="http://www.completegenomics.com" target="_blank" style="text-decoration:none;">
 		    	CompleteGenomics</a> <br />
 		    <a href="http://www.scilifelab.se/index.php?content=home" target="_blank" style="text-decoration:none;">
-		    	SciLifeLab</a><br />
+		    	SciLifeLab</a> <br />
 		    <a href="http://www.akademiska.se/" target="_blank" style="text-decoration:none;">
 		    	Akademiska Sjukhuset</a> <br />
 		    <a href="http://www.medsci.uu.se" target="_blank" style="text-decoration:none;">

Modified: www/pw_exec.php
===================================================================
--- www/pw_exec.php	2012-08-31 14:06:07 UTC (rev 147)
+++ www/pw_exec.php	2012-09-11 13:32:36 UTC (rev 148)
@@ -12,8 +12,8 @@
 It is recommended that you run patchwork from a "clean" working directory to avoid the risk
  of having files write over eachother if you run multiple different samples.<br /><br />
 
-Execution may take quite a while depending on the size of your sample!
-So if possible run it on a dedicated computer.<br /><br />
+Execution may take quite a while depending on the size of your sample,
+if possible run it on a dedicated computer.<br /><br />
 
 Initiate the R environment and load the patchwork and patchworkData libraries: <br />
 
@@ -22,7 +22,7 @@
 	library(patchworkData)
 </pre>
 
-Read the excellent documentation for patchwork.plot(): <br />
+Read the documentation for patchwork.plot(): <br />
 
 <pre>
 	?patchwork.plot
@@ -33,39 +33,40 @@
 <pre>
 Usage:
 
-     patchwork.plot(Tumor.bam,Tumor.pileup,Tumor.vcf=NULL,Normal.bam=NULL,Normal.pileup=NULL,Normal.vcf=NULL,Reference=NULL,Alpha=0.0001,SD=1)
+     	patchwork.plot(Tumor.bam,Tumor.pileup,Tumor.vcf=NULL,Normal.bam=NULL,Normal.pileup=NULL,Normal.vcf=NULL,
+     	Reference=NULL,Alpha=0.0001,SD=1)
      
 Arguments:
 
 	Tumor.bam: Path to an aligned and sorted Tumor Bam-file.
 
-	Tumor.pileup: Pileup file generated through samtools -vcf
-	          reference.fasta tumor.bam > outfile (SAMtools v0.1.16 or
-	          older) or through samtools mpileup -f reference.fasta
-	          tumor.bam > outfile (SAMtools v0.1.17 or newer).
+	Tumor.pileup: Pileup file generated by either 
+		  (SAMtools v 0.1.16 or older)
+		  samtools -vcf reference.fasta tumor.bam > outfile
+		  or (SAMtools v 0.1.17 or newer)
+		  samtools mpileup -f reference.fasta tumor.bam > outfile
 
-	Tumor.vcf: Default is NULL.  If samtools mpileup command has been used
-	          you will need to generate a vcf file using samtools mpileup
-	          -uf reference.fasta tumor.bam | bcftools view -vcg - >
-	          outfile.vcf
+	Tumor.vcf: Default is NULL. If samtools mpileup command has been used
+	          you will need to generate a vcf file using 
+	      	  samtools mpileup -uf reference.fasta tumor.bam | bcftools view -vcg - > outfile.vcf
 
-	Normal.bam: Default is NULL.  The matched normal sample of the your
+	Normal.bam: Default is NULL. The matched normal sample of the your
 	          Tumor.bam.
 
-	Normal.pileup: Default is NULL.  The pileup of your normal sample
-	          generated through samtools -vcf reference.fasta normal.bam >
-	          outfile (SAMtools v0.1.16 or older) or through samtools
-	          mpileup -f reference.fasta normal.bam > outfile (SAMtools
-	          v0.1.17 or newer).
+	Normal.pileup: Default is NULL. The pileup of your normal sample
+	          generated through
+	          (SAMtools v 0.1.16 or older)
+	          samtools -vcf reference.fasta normal.bam > outfile
+	          or (SAMtools v 0.1.17 or newer)
+	          samtools mpileup -f reference.fasta normal.bam > outfile
 
-	Normal.vcf: Default is NULL.  If samtools mpileup command has been used
-	          you will need to generate a vcf file using samtools mpileup
-	          -uf reference.fasta normal.bam | bcftools view -vcg - >
-	          outfile.vcf
+	Normal.vcf: Default is NULL. If samtools mpileup command has been used
+	          you will need to generate a vcf file using 
+	          samtools mpileup -uf reference.fasta normal.bam | bcftools view -vcg - > outfile.vcf
 
-	Reference: Default is NULL.  Path to a reference file that can be
+	Reference: Default is NULL. Path to a reference file that can be
 	          created using patchwork.createreference() or downloaded from
-	          patchworks homepage where applicable.
+	          patchworks homepage when applicable.
 
 	   Alpha: Default 0.0001, change if you want to try to get a better
 	          segmentation from patchwork.segment().  From DNAcopy
@@ -203,7 +204,7 @@
  plot and 24 chromosomal plots. <br /><br />
 
 The working directory should also contain these files, where (prefix) is the name of your BAM file
- without the .bam file ending : <br />
+ without the .bam file ending: <br />
 <ul class="checks">
 	<li>(prefix)_copynumbers.Rdata</li>
 	<li>(prefix)_data.Rdata</li>
@@ -227,12 +228,12 @@
  <h4>patchwork.copynumbers()</h4>
 
 
- patchwork.copynumbers() is a function that determines which relationship between coverage
+ The function patchwork.copynumbers() 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 (prefix)_copynumbers.Rdata. <br /><br />
 
-Read the outstanding documentation for patchwork.copynumbers():<br />
+Read the documentation for patchwork.copynumbers():<br />
 
 <pre>
 	?patchwork.copynumbers
@@ -241,37 +242,66 @@
 Excerpt from ?patchwork.copynumbers regarding usage and arguments: <br />
 
 <pre>
-	Usage:
+Usage:
 
-	     patchwork.copynumbers(CNfile,cn2,delta,het,hom,maxCn=8,ceiling=1,forcedelta=F)
+	patchwork.copynumbers(CNfile,cn2,delta,het,hom,maxCn=8,ceiling=1,forcedelta=F,male.sample=F,male2femref=F)
 	     
-	Arguments:
+Arguments:
 
-	    CNfile: The name and path of your copynumbers file, generated from patchwork.plot().
-	    		Example Myfile_copynumbers.Rdata.
+	  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.
+	          intensity / coverage axis.
+
 	   delta: The difference in total intensity between consecutive copy
 	          numbers. For example 1 and 2 or 2 and 3.  If copy number 2
 	          has total intensity ~0.6 and copy number 3 har total
 	          intensity ~0.8 then delta would be 0.2.
+
 	     het: Allelic imbalance ratio of heterozygous copy number 2.
+
 	     hom: Allelic imbalance ratio of Loss-of-heterozygosity copy number
 	          2.
+
 	   maxCn: Highest copy number to calculate for. Default is 8.
-	 ceiling: Default is 1.
-	 forcedelta: Default is FALSE. If TRUE the delta value will not be
-	             subject to small adjustment changes.
 
+	male.sample: Default is FALSE. If it is a male sample put TRUE here and
+	          it will handle the XY chromosomes better.
+
+	male2femref: Default is FALSE. If TRUE the sample is male but the
+	          reference you used is female. This will correct for this.
+
 </pre>
 
-
 To infer the arguments for patchwork.copynumbers() you will need to look at one of the chromosomal
- plots generated using patchwork.plot(). Here is the topmost section of one such plot with some added bars
-  and text for tutorial purposes. The plot shows the whole genome in grey and the chosen chromosome, not
-  important in this guide, in red to blue gradient. From this whole genome picture you can then use the
-  arrangement of the clustered areas to estimate copy numbers and allele-specific information. <br /><br />
+plots generated using patchwork.plot(). The structure and relationships in the plot can be interpreted
+to figure out the most probable location the allele-specific copynumbers. <br /><br />
 
+
+For information to help you understand the axis, allelic imbalance and coverage, and layout of the plot click <a href="AI_Cov.php" target="_blank" style="text-decoration:none;">here</a>.
+<br />
+<br />
+
+What do we expect a hypothetical plots arrangement of clusters to look like? We know that the average ploidy of the sample will
+be 1 on coverage axis as it is normalized. The sample may be highly rearranged but quite often this is a starting point for
+finding copynumber 2 or copynumber 3. As there will be less reads
+covering copynumber 1 in the sample than higher copynumbers and copynumber 1 cannot have different allele constitutions, by
+its very nature of being one allele, copynumber 1 will be represented by a single cluster farthest to the left on coverage
+axis when compared to the other clusters.<br />
+So what if we do not have any copynumber 1 in the sample? Then perhaps the far left
+of the plot will be occupied by two clusters, indicating the LoH and diploid state of copynumber 2. It then stands to reason
+that the next cluster we will encounter, again; moving from left to right on coverage axis, will be of copynumber 3. In the
+same way we would expect copynumber 2 to follow copynumber 1 in the previous scenario. <br />
+
+It is with reasoning such as this, looking at the plot and how the clusters are arranged and what cluster constitutions are
+physically possible, that we can determine the allele-specific copynumbers in our sample.<br /><br />
+
+Here is the topmost section of one such plot with some added bars and text for tutorial purposes. The plot
+shows the whole genome in grey and the chosen chromosome, not important in this guide, in red to blue gradient.
+From this whole genome picture you can then use the arrangement of the clustered areas to estimate copynumbers
+and allele-specific information. <br /><br />
+
 <img id="fig1pw" src="css/img/Fig1pw_tut.png" alt="Input arguments patchwork.copynumbers" title="Figure 1 patchwork"
  style="width:880px"><br /><br />
 
@@ -285,7 +315,7 @@
 The <b>hom</b> argument is the position of homozygous, loss-of-heterozygosity, copy number 2 on the allelic imbalance
 axis. In this example hom is ~0.79. <br /><br />
 
-Usually you do not need to bother with <b>maxCn</b> and <b>ceiling</b> arguments. <br /><br />
+<!-- Usually you do not need to bother with <b>maxCn</b> and <b>ceiling</b> arguments. <br /><br /> -->
 
 An example run of patchwork.copynumbers(): <br />
 

Modified: www/pw_inst.php
===================================================================
--- www/pw_inst.php	2012-08-31 14:06:07 UTC (rev 147)
+++ www/pw_inst.php	2012-09-11 13:32:36 UTC (rev 148)
@@ -33,7 +33,7 @@
 
 <h4>Python and Pysam</h4>
 
-Patchwork uses a python mod called pysam for chromosome reading. The package already checks if you have
+Patchwork uses a python mod called pysam for "reading" the chromosomes. The package already checks if you have
 it installed and otherwise installs it for you the first time you run patchwork however if you lack python
 or python development on your system the installation fails. It seems to already be included in MAC OS X but
 on other systems you should install/update it. Here is a 

Modified: www/pw_requ.php
===================================================================
--- www/pw_requ.php	2012-08-31 14:06:07 UTC (rev 147)
+++ www/pw_requ.php	2012-09-11 13:32:36 UTC (rev 148)
@@ -4,11 +4,12 @@
 alt="Flowchart of requirements for patchwork" title="Flowchart of requirements">
 </div><br /> -->
 
+Here is information on what files you need and how to get them.<br /><br />
 To successfully run patchwork you will need to obtain/create these items:<br />
 
 <ul class="checks">
 	<!-- <li>A Human Genome fasta file</li> -->
-	<li>A aligned and sorted BAM file of tumor content</li>
+	<li>An aligned and sorted BAM file of tumor content</li>
 	<li>A BAI index 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>
@@ -33,8 +34,9 @@
 You can also run patchwork.plot() with only a reference file.<br />
 <br />
 
-Here are two standard reference files for HG19. It is very important that you choose a reference
-which matches the sequencing technology and reference genome used on your tumor sample.<br />
+Here are two standard reference files created for patchwork for samples where alignment used the UCSC HG19 reference.
+It is very important that you choose a reference which matches the sequencing technology and reference genome used on
+ your tumor sample.<br />
 
 <a href="http://130.238.204.28/patchwork/references/datasolexa.RData" target="_blank" style="text-decoration:none;">
 	Solexa/Illumina reference</a> <br />
@@ -42,8 +44,8 @@
 	SOLiD reference</a> <br /><br />
 
 If you wish to create your own reference file, for example one that works for HG18, use patchworks.createreference().
-For this you should use a pool of non-tumor BAM files, preferably no less than three, where the same sequencing
-technology was applied as to your tumor sample. <br /><br />
+<!--For this you should use a pool of non-tumor BAM files, preferably no less than three, where the same sequencing
+technology was applied as to your tumor sample. --> <br /><br />
 
 <h4>patchwork.createreference()</h4> <br />
 
@@ -55,9 +57,13 @@
  	<li>They should be sequenced using the same technique</li>
  	<li>They should be from the same organism</li>
  	<li>They should be non-tumerous</li>
+ 	<li>They should be same sex</li>
  </ul>
 
 It is recommended that you use atleast 3 BAM files to create your reference.
+Note also that if your tumor sample is from a different sex than your reference samples you may not get optimal results.
+There is a paramter in the second part of analysis, patchwork.copynumbers(), to correct for this however if you are interested
+specifically in the sex chromosomes we would definitely recommend using the same sex in reference as in tumor sample.
 <br /><br />
 
 Initiate R and load the patchwork and patchworkData libraries: <br />
@@ -67,20 +73,19 @@
 	library(patchworkData)
 </pre>
 
-Read the amazing documentation for patchwork.createreference():<br />
+Read the documentation for patchwork.createreference():<br />
 
 <pre>
 	?patchwork.createreference
 </pre>
 
-The function takes a series of files with respective paths if they are not in your working directory, which is
-where you started your R session by default. It also has a "output" parameter for customizing
-output name. <br /><br />
+The function takes a series of BAM files as input and outputs a single reference file. 
+It also has a "output" parameter for customizing output name. <br /><br />
 
 Execute the function, pointing to your desired files: <br />
 
 <pre>
-	patchwork.createreference("file1","path/to/file2","../file3","~/heres/file4",output="REFOUT")
+	patchwork.createreference("file1","path/to/file2","../file3","~/here_is/file4",output="REFOUT")
 </pre>
 
 This will generate REFOUT.Rdata, or whichever prefix you chose, in your working directory.
@@ -91,14 +96,11 @@
 Many of the tasks that you will need to perform can be achieved using 
 <a href="http://sourceforge.net/projects/samtools/files/" target="_blank" style="text-decoration:none;">
 	SAMtools</a>. </br>
-It is of special importance that you install SAMtools version 0.1.16 or older or the pileup generated will
-have an incorrect format.<br />
-An example of the correct format of your pileup file is included below. <br /><br />
+If you wish to save space and computation time you should install SAMtools version 0.1.16 or older or the pileup generated will
+have an incorrect format. Instructions for using the newest version of SAMtools or older version is below.<br /><br />
 
-
 To sort your BAM file: <br />
 
-
 <pre>
 	samtools sort <tumorfile>.bam <sortedtumorfile>.bam
 </pre>
@@ -106,7 +108,7 @@
 To create an index, BAI file, of either your normal sample or tumor sample BAM files: <br />
 
 <pre>
-	samtools index <tumor/normalfile>.bam
+	samtools index <tumor_or_normalfile>.bam
 </pre>
 
 The BAI file should always have the same name as your tumor file, for example "tumor.bam"
@@ -115,11 +117,12 @@
 <a onmouseover="popup('Traceback (most recent call last): <br /> File ".python/Pysamloader.py", line 20, in < module > <p><dd> for read in infile.fetch(a[1]): </dd></p> File "csamtools.pyx", line 745, in csamtools.Samfile.fetch (pysam/csamtools.c:8332)<br />File "csamtools.pyx", line 684, in csamtools.Samfile._parseRegion (pysam/csamtools.c:7615) <br />ValueError: invalid reference ‘1‘<br />Error in read.table(file = file, header = header, sep = sep, quote = quote,  : <p><dd> no lines available in input </p></dd> Calls: patchwork.plot -> patchwork.readChroms -> read.csv -> read.table');">
 error</a> is displayed.<br /><br />
 
+<h5>Instructions for SAMtools <= 0.1.16 </h5>
 
 To pileup either your normal sample or tumor sample BAM files: <br />
 
 <pre>
-	samtools pileup -vcf <humangenome>.fasta <tumor/normalfile>.bam > pileup
+	samtools pileup -vcf <humangenome>.fasta <tumor_or_normalfile>.bam > pileup
 </pre>
 
 Your pileup file should have this format: <br />
@@ -141,6 +144,23 @@
 		chr1    127285  A       R       0       3       60      1       g       B
 </pre>
 
+<h5>Instructions for SAMtools > 0.1.16 </h5>
+
+To mpileup either your normal sample or tumor sample BAM files: <br />
+
+<pre>
+	samtools mpileup -f <humangenome>.fasta <tumor_or_normalfile>.bam > mpileup
+</pre>
+
+For consensus calling: <br />
+
+<pre>
+	samtools mpileup -uf <humangenome>.fasta <tumor_or_normalfile>.bam | bcftools view -vcg - > <output>.vcf
+</pre>
+
+Remember to use both of these files when running patchwork.plot() with the vcf file in the Tumor.vcf/Normal.vcf parameter
+ and the mpileup in Tumor.pileup/Normal.pileup parameter. <br /><br />
+
 You should now have all the components needed for execution!
 
 <br /><br /><div style="text-align:center;"><a href="#top" style="text-decoration:none;">Top</a></div>

Modified: www/pw_resu.php
===================================================================
--- www/pw_resu.php	2012-08-31 14:06:07 UTC (rev 147)
+++ www/pw_resu.php	2012-09-11 13:32:36 UTC (rev 148)
@@ -17,12 +17,28 @@
  The circles are semi-transparent so a darker hue, both for colored and grey,
  indicate a greater amount of genomic content in that region.<br /><br />
 
-We know that each cluster has a certain copy number and allele content and we know that
-a human is usually diploid (copy number 2, heterozygous). Finally we know that the average
-copy number of the genome in question is at position 1 on the Coverage axis.
-We can use this information to determine the clusters probable copy number
-and allele content.<br /><br />
+The structure and relationships in the plot can be interpreted
+to figure out the most probable location the allele-specific copynumbers.
+Each cluster has a certain copy number and allele content.<br /><br />
 
+Quote from Execution tab: <br />
+<adress><p>
+	What do we expect a hypothetical plots arrangement of clusters to look like? We know that the average ploidy of the sample will
+	be 1 on coverage axis as it is normalized. The sample may be highly rearranged but quite often this is a starting point for
+	finding copynumber 2 or copynumber 3. As there will be less reads
+	covering copynumber 1 in the sample than higher copynumbers and copynumber 1 cannot have different allele constitutions, by
+	its very nature of being one allele, copynumber 1 will be represented by a single cluster farthest to the left on coverage
+	axis when compared to the other clusters.<br />
+	So what if we do not have any copynumber 1 in the sample? Then perhaps the far left
+	of the plot will be occupied by two clusters, indicating the LoH and diploid state of copynumber 2. It then stands to reason
+	that the next cluster we will encounter, again; moving from left to right on coverage axis, will be of copynumber 3. In the
+	same way we would expect copynumber 2 to follow copynumber 1 in the previous scenario. <br />
+
+	It is with reasoning such as this, looking at the plot and how the clusters are arranged and what cluster constitutions are
+	physically possible, that we can determine the allele-specific copynumbers in our sample.<br />
+</p></adress>
+<br />
+
 The far left tiny cluster, on Coverage axis, is the deletions, copy number 1.
 Moving to the right the next two clusters, lower cluster is quite small,
 are the allelic states of copy number 2. Following this reasoning the next set of clusters
@@ -81,8 +97,10 @@
 Another example; if a segments total copy number is 2 and minor copy number is 0 then
 that segment of the chromosome has 2 paternal OR 2 maternal copies.
 
-<br /><br />For more background information please read our submitted article!
+<!-- <br /><br />For more background information please read our submitted article! -->
 
+<br /><br />For more background information please contact us!
+
 <br /><br /><div style="text-align:center;"><a href="#top" style="text-decoration:none;">Top</a></div>
 
 



More information about the Patchwork-commits mailing list