patchwork.plot: Patchwork main function

Description Usage Arguments Details Author(s)

View source: R/patchwork.plot.r

Description

The main function of patchwork. In details there is some very important information, highly recommended!

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.

You should use either the reference parameter OR the Normal.bam and Normal.pileup parameters.

Usage

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 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 -bvcg - > raw.bcf

and then

bcftools view raw.bcf | vcfutils.pl varFilter -D100 > outfile.vcf

Where the -D100 option filters out SNPs with a read depth higher than 100. It should be changed depending on coverage, at 30x -D100 should be ok and at 120x -D500 might be more suitable for example.

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.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 created using patchwork.createreference() or downloaded from patchworks homepage when applicable.

Alpha

Default 0.0001, change if you want to try to get a better segmentation from patchwork.segment(). From DNAcopy (?segment): alpha: significance levels for the test to accept change-points.

SD

Default 1, change if you want to try to get a better segmentation from patchwork.segment(). From DNAcopy (?segment): undo.SD: the number of SDs between means to keep a split if undo.splits="sdundo".

Details

Make sure to only run one sample at a time in a single working directory as standard file names are created. If you do not heed this warning you 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 function you may receive some warning messages.

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 some of the saved .Rdata files in your working directory to avoid remaking these, should they already exist.

This also means that to make a completely clean run of patchwork.plot you need to delete <filename>_data.Rdata, <filename>_copynumbers.Rdata, <filename>_pile.alleles.Rdata, <filename>_smoothed.Rdata, <filename>_Segments.Rdata from your working directory!!

Author(s)

Markus Mayrhofer, markus.mayrhofer@medsci.uu.se
Sebastian DiLorenzo, sebastian.dilorenzo@medsci.uu.se


patchwork documentation built on May 2, 2019, 5:02 p.m.