data frame with rows representing samples and column names
"sample_name", "bamfile". Columns should correspond to a sample name and a
bam file path.
genome
Object of class BSgenome specifying the genome.
target
Object of class data frame containing target locations in
1-base format and containing columns names "chr", "start", "end", "var",
"name". Columns should correspond to chromosome, start, end, variant allele,
name of location.
debug
Boolean specifying if test datasets should be used for
debugging.
mainLayer
Valid ggplot2 layer for altering the main plot.
covLayer
Valid ggplot2 layer for altering the coverage plot.
out
Character vector specifying the the object to output, one of
"data", "grob", or "plot", defaults to "plot" (see returns).
Details
compIdent is a function designed to comppare samples via variant allele
frequencies (VAF) at specific sites. By default these sites correspond to 24
identity snps originating from the hg19 assembly however the user can specify
alternate sites via the target paramter. To view the 24 identity snp
locations use GenVisR::SNPloci.
Samples from the same origin are expected to have similar VAF values however
results can skew based on copy number alterations (CNA). The user is expected
to ensure no CNA occur at the 24 identity snp sites.
For display and debugging purposes a debug parameter is available which will
use predefined data instead of reading in bam files. Note that data in the
debug parameter is only available at the afore mentioned 24 sites.
Value
One of the following, a list of dataframes containing data to be
plotted, a grob object, or a plot.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(GenVisR)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/GenVisR/compIdent.Rd_%03d_medium.png", width=480, height=480)
> ### Name: compIdent
> ### Title: Construct identity snp comparison plot
> ### Aliases: compIdent
>
> ### ** Examples
>
> # Read in BSgenome object (hg19)
> library(BSgenome.Hsapiens.UCSC.hg19)
Loading required package: BSgenome
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Loading required package: S4Vectors
Loading required package: stats4
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: GenomicRanges
Loading required package: Biostrings
Loading required package: XVector
Loading required package: rtracklayer
> hg19 <- BSgenome.Hsapiens.UCSC.hg19
>
> # Generate plot
> compIdent(genome=hg19, debug=TRUE)
Argument not supplied to target, defaulting to predefined identity SNPs from hg19 assembly!
NULL
>
>
>
>
>
> dev.off()
null device
1
>