On Thu, Jun 30, 2011 at 2:04 AM, rna seq <rna.seeker@gmail.com> wrote:

> Hello Bioconductor,
>
> I am having some difficulties using the "snpMatrix" package. I download the
> following file using:
>
> >chr1<-read.HapMap.data("
>
> http://hapmap.ncbi.nlm.nih.gov/downloads/genotypes/latest_phaseII+III_ncbi_b36/forward/non-redundant/genotypes_chr1_CEU_r27_nr.b36_fwd.txt.gz
> "
>
> Next, I would like to calculate the linkage disequilibrium between these
> snps. I then try to get the ld between these sample by typing
>
> >> ld.snp(chr1)
>
> and get the following error
> Error in ld.snp(chr1) :
>  snps argument must be of class snp.matrix/X.snp.matrix
>
>
read.HapMap.data returns a list that includes a snp.matrix and some metadata
support.  i believe
that ld.snp(chr1[[1]]) would work

use class(chr1), str(chr1) and str(chr1[[1]]) and so forth to diagnose such
situations, and read the
man page for read.* to understand fully the returned object

also please supply sessionInfo() result for all queries.


> This is confusing to me because the vignette tells me that read.HapMap.data
> will download and convert the genotype data into a snp.matrix class object
>
> Any help is greatly appreciated.
>
> Thanks,
>
> Pete
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

