[Patchwork-commits] r106 - in pkg/patchwork: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Mar 1 10:25:08 CET 2012
Author: sebastian_d
Date: 2012-03-01 10:25:08 +0100 (Thu, 01 Mar 2012)
New Revision: 106
Modified:
pkg/patchwork/R/patchwork.CNA.r
pkg/patchwork/README
Log:
update
Modified: pkg/patchwork/R/patchwork.CNA.r
===================================================================
--- pkg/patchwork/R/patchwork.CNA.r 2012-03-01 09:23:17 UTC (rev 105)
+++ pkg/patchwork/R/patchwork.CNA.r 2012-03-01 09:25:08 UTC (rev 106)
@@ -66,7 +66,7 @@
}
- # Smooth to the data.
+ # Smooth the data.
kbsegs = NULL
try( load("smoothed.Rdata"), silent=TRUE )
if(length(kbsegs) == 0)
Modified: pkg/patchwork/README
===================================================================
--- pkg/patchwork/README 2012-03-01 09:23:17 UTC (rev 105)
+++ pkg/patchwork/README 2012-03-01 09:25:08 UTC (rev 106)
@@ -30,44 +30,203 @@
Requirements:
/-------------------/
-Your samples BAM and BAI file:
+Your samples ,sorted, BAM and BAI file:
To get BAI run "samtools index <yourfile>.bam"
+ To sort a bamfile "samtools sort <yourfile>.bam <sortedfile>.bam"
A Pileup of your sample created with the 0.1.18 or older version of samtools.
"samtools pileup -vcf <reference.fasta> <yourfile>.bam > <yourpileup>"
-Either a normal.bam and normal.pileup or a reference file. More on this later.
+It should have this format:
+less pileup
+ chr1 10179 c W 0 0 60 5 ,,tna ##6!3
+ chr1 10180 t W 6 6 60 5 ,,,aa ##369
+ chr1 10377 a R 0 1 60 1 g @
+ chr1 11391 t A 0 3 60 1 a B
+ chr1 18592 C Y 0 3 60 1 t B
+ chr1 23359 c S 0 2 60 1 g A
+ chr1 24067 A R 0 2 60 1 G A
+ chr1 30315 G C 3 24 60 2 cC =;
+ chr1 92200 a W 0 3 60 1 t B
+ chr1 96592 T C 0 3 60 1 C B
+ chr1 100140 a M 0 1 60 1 C @
+ chr1 104697 g K 0 2 60 1 T A
+ chr1 127285 A R 0 3 60 1 g B
+
+
+A normal.bam or reference file or optional normal.pileup or all three. More on this later.
+
A working R installation.
+Below are some included heads of example files so you can compare and see that your files are the same format.
+
/-------------------/
Execution:
/-------------------/
It is recommended that you run patchwork from a "clean" working directory. In this way you do not run the risk of having files write over eachother. If you do not want to type paths into R you may also want to put the required files in this folder.
-Text with a ">" infront is R code.
+Start R
-> library(patchwork)
-> library(patchworkData)
-> patchwork.CNA(BamFile="patchwork.example.bam",Pileup="patchwork.example.pileup",reference="../HCC1954/datasolexa.RData")
+Text with a ">" infront is R executions.
+Load the patchwork and patchworkData libraries
+ > library(patchwork)
+ > library(patchworkData)
+Read the excellent documentation for patchwork.CNA
+ > ?patchwork.CNA
+Perform patchwork.CNA with desired parameters.
+ > patchwork.CNA(BamFile="patchwork.example.bam",Pileup="patchwork.example.pileup",reference="../HCC1954/datasolexa.RData")
+ Initiating Allele Data Generation
+ Initiating Read Chromosomal Coverage
+ Reading chr1
+ Reading chr2
+ Reading chr3
+ Reading chr4
+ Reading chr5
+ Reading chr6
+ Reading chr7
+ Reading chr8
+ Reading chr9
+ Reading chrX
+ Reading chrY
+ Reading chr10
+ Reading chr11
+ Reading chr12
+ Reading chr13
+ Reading chr14
+ Reading chr15
+ Reading chr16
+ Reading chr17
+ Reading chr18
+ Reading chr19
+ Reading chr20
+ Reading chr21
+ Reading chr22
+ Read Chromosomal Coverage Complete
+ Initiating GC Content Normalization
+ GC Content Normalization Complete
+ Initiating Smoothing
+ Smoothing Chromosome: chr1
+ Smoothing Chromosome: chr2
+ Smoothing Chromosome: chr3
+ Smoothing Chromosome: chr4
+ Smoothing Chromosome: chr5
+ Smoothing Chromosome: chr6
+ Smoothing Chromosome: chr7
+ Smoothing Chromosome: chr8
+ Smoothing Chromosome: chr9
+ Smoothing Chromosome: chrX
+ Smoothing Chromosome: chrY
+ Smoothing Chromosome: chr10
+ Smoothing Chromosome: chr11
+ Smoothing Chromosome: chr12
+ Smoothing Chromosome: chr13
+ Smoothing Chromosome: chr14
+ Smoothing Chromosome: chr15
+ Smoothing Chromosome: chr16
+ Smoothing Chromosome: chr17
+ Smoothing Chromosome: chr18
+ Smoothing Chromosome: chr19
+ Smoothing Chromosome: chr20
+ Smoothing Chromosome: chr21
+ Smoothing Chromosome: chr22
+ Smoothing Complete
+ Initiating Segmentation
+ Note: If segmentation fails to initiate the probable reason is that you have not installed the R package DNAcopy. See patchwork's README for installation instructions.
+ Analyzing: chr1.p
+ Analyzing: chr1.q
+ Analyzing: chr2.p
+ Analyzing: chr2.q
+ Analyzing: chr3.p
+ Analyzing: chr3.q
+ Analyzing: chr4.p
+ Analyzing: chr4.q
+ Analyzing: chr5.p
+ Analyzing: chr5.q
+ Analyzing: chr6.p
+ Analyzing: chr6.q
+ Analyzing: chr7.p
+ Analyzing: chr7.q
+ Analyzing: chr8.p
+ Analyzing: chr8.q
+ Analyzing: chr9.p
+ Analyzing: chr9.q
+ Analyzing: chrX.p
+ Analyzing: chrX.q
+ Analyzing: chrY.p
+ Analyzing: chrY.q
+ Analyzing: chr10.p
+ Analyzing: chr10.q
+ Analyzing: chr11.p
+ Analyzing: chr11.q
+ Analyzing: chr12.p
+ Analyzing: chr12.q
+ Analyzing: chr13.q
+ Analyzing: chr14.q
+ Analyzing: chr15.q
+ Analyzing: chr16.p
+ Analyzing: chr16.q
+ Analyzing: chr17.p
+ Analyzing: chr17.q
+ Analyzing: chr18.p
+ Analyzing: chr18.q
+ Analyzing: chr19.p
+ Analyzing: chr19.q
+ Analyzing: chr20.p
+ Analyzing: chr20.q
+ Analyzing: chr21.p
+ Analyzing: chr21.q
+ Analyzing: chr22.q
+ Segmentation Complete
+ Initiating Segment data extraction (Medians and AI)
+ Segment data extraction Complete
+
+
+ Saving information objects needed for patchwork.findCNs in findCNs.Rdata
+
+
+ Initiating Plotting
+ Plotting Complete
+ Shutting down.....
+ Warning messages:
+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 overhead plot and 24 chromosomal plots.
+The working directory should also hold the files
+ - findCNs.Rdata
+ - data.Rdata
+ - pile.alleles
+ - pile.alleles.Rdata
+ - Segments.Rdata
+ - smoothed.Rdata
+These were created for swifter re-runs of the function should something unforseen happen during execution.
+The only file you absolutely must have in your working for the next part of execution is findCNs.Rdata.
+Read the outstanding documentation for patchwork.findCNs
+ > ?patchwork.findCNs
+The cliffnotes are that you will need to look at the plots generated by patchwork.CNA
+
+
+
+
+
+
Execution may take quite a while depending on the size of your sample! So if possible run it on a dedicated computer.
/------------------------------------/
More information about the Patchwork-commits
mailing list