R: Function to write an eps file directly to visualize LD
epsout.ld.snp
R Documentation
Function to write an eps file directly to visualize LD
Description
epsout.ld.snp takes an object of snp.matrix class and a given
snp range and depth, draw a eps file to visualize the LD in the same color scheme
as haploview's default view. It was the first prototype of
this bunch of software. Also, it does not keep any pair-wise data
in memory at all, and maybe more suitable where the actual pair-wise
LD data is not needed.
An object of snp.matrix class with M samples of N snps
filename
The file name of the output, preferably ending with
".eps", but this rule not enforced
start
The index of the start of the range of interest. Should
be between 1 and (N-1)
end
The index of the end of the range of interest. Should be
between 2 and N.
depth
The depth or lag of pair-wise calculation. Should be
between 1 and N-1
do.notes
Boolean for whether to generate pdf annotation-related
code
Details
The functinality of this routine has since been split into a two-stage
processes involving ld.snp which generates a
snp.dprime
object which contains the result of the
pairwise LD calculation, and plot.snp.dprime (or the
plot method of a snp.dprime object) which does the drawing.
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(chopsticks)
Loading required package: survival
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/chopsticks/epsout.ld.snp.Rd_%03d_medium.png", width=480, height=480)
> ### Name: epsout.ld.snp
> ### Title: Function to write an eps file directly to visualize LD
> ### Aliases: epsout.ld.snp
> ### Keywords: dplot hplot models htest
>
> ### ** Examples
>
> #
> data(testdata)
> epsout.ld.snp(Autosomes, start=1, end=500, depth=50, filename="test.eps")
Information: samples = 400, snps = 9445
Writing to test.eps ...... Done
>
>
>
>
>
> dev.off()
null device
1
>