[R] LDheatmap

David González dogrdc at gmail.com
Mon Oct 17 06:01:47 CEST 2016


Yes, I used LDheatmap just a moment... First you need to convert your 
matrix (ej. your geno file) to snp.matrix usin the package "chopsticks", 
web> https://bioconductor.org/packages/release/bioc/html/chopsticks.html.

This package is no in R library. You need use a sourse. Use this code>

## try http:// if https:// URLs are not supported
source("https://bioconductor.org/biocLite.R")
biocLite("chopsticks")

Then, a example to convert your matrix (geno file) to snp.matrix and use LDheatmap function

# Pass LDheatmap a snp.matrix object
set.seed(1)
#make an example matrix of genotypes, coded as 0, 1 2 copies of an index allele
gdat<-matrix(rbinom(n=500,size=2,prob=.5),ncol=5) 
require(chopsticks)
gdat<-as(gdat,"snp.matrix")
library(LDheatmap)
LDheatmap(gdat,genetic.distances=c(0,1000,3000,4000,10000))

I hope help you..




El miércoles, 3 de febrero de 2016, 18:08:46 (UTC-6), Val escribió:
>
> Thank you Bert, 
>
> Yes I looked a this one and I was looking for if any one has used it or 
> not 
> before?  My data set is different what they are showing in the paper 
>
>
>
>
>
> On Wed, Feb 3, 2016 at 4:00 PM, Bert Gunter <bgunte... at gmail.com 
> <javascript:>> wrote: 
>
> > Have you looked here (found immediately by an internet search!)? 
> > 
> > 
> https://cran.r-project.org/web/packages/LDheatmap/vignettes/LDheatmap.pdf 
> > 
> > Cheers, 
> > Bert 
> > 
> > 
> > 
> > Bert Gunter 
> > 
> > "The trouble with having an open mind is that people keep coming along 
> > and sticking things into it." 
> > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) 
> > 
> > 
> > On Wed, Feb 3, 2016 at 1:49 PM, Ashta <sew... at gmail.com <javascript:>> 
> wrote: 
> > > Hi all, 
> > > 
> > > I am  looking for an R package that calculates  a pair wise LD 
> > > (linkage disequilibrium) I came up with  library(LDheatmap).  has any 
> > > one used this library? I would appreciate if I get a help how to use 
> > > this library for my set of data.. 
> > > 
> > > 
> > > My data set look like 
> > > 
> > > Geno file 
> > > Name1 1 1 2 2 2 2 
> > > Name2 2 2 2 2 2 2 
> > > Name3 2 2 2 2 2 2 
> > > Name4  2 2 2 2 2 2 
> > > Name5 1 1 2 2 2 2 
> > > 
> > > 
> > > NameN  1   1 1 2 2 2 2 
> > > 
> > > 
> > > The other file is map file 
> > > Chromosome, SNP, Location (physical) 
> > > 
> > > 
> > > Thank you in advance 
> > > 
> > > ______________________________________________ 
> > > R-h... at r-project.org <javascript:> mailing list -- To UNSUBSCRIBE and 
> more, see 
> > > https://stat.ethz.ch/mailman/listinfo/r-help 
> > > PLEASE do read the posting guide 
> > http://www.R-project.org/posting-guide.html 
> > > and provide commented, minimal, self-contained, reproducible code. 
> > 
> > ______________________________________________ 
> > R-h... at r-project.org <javascript:> mailing list -- To UNSUBSCRIBE and 
> more, see 
> > https://stat.ethz.ch/mailman/listinfo/r-help 
> > PLEASE do read the posting guide 
> > http://www.R-project.org/posting-guide.html 
> > and provide commented, minimal, self-contained, reproducible code. 
> > 
>
>         [[alternative HTML version deleted]] 
>
> ______________________________________________ 
> R-h... at r-project.org <javascript:> mailing list -- To UNSUBSCRIBE and 
> more, see 
> https://stat.ethz.ch/mailman/listinfo/r-help 
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html 
> and provide commented, minimal, self-contained, reproducible code. 
>


More information about the R-help mailing list