snpMatrix trouble with read.HapMap.data() and ld.snp()
2
0
Entering edit mode
rna seq ▴ 90
@rna-seq-4145
Last seen 7.6 years ago
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 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]]
SNP convert SNP convert • 1.3k views
ADD COMMENT
0
Entering edit mode
@vincent-j-carey-jr-4
Last seen 5 weeks ago
United States
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+II I_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]]
ADD COMMENT
0
Entering edit mode
@david-clayton-4729
Last seen 9.6 years ago
read.HapMap.data() does not return an object of class "snp.matrix". It returns a list whose first element is the snp.matrix object. See the online help page On 30/06/11 01:04, rna seq 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+II I_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 > > 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 at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Professor David Clayton Wellcome Trust/Juvenile Diabetes Research Foundation Principal Research Fellow Diabetes and Inflammation Laboratory Cambridge University, Department of Medical Genetics Cambridge Institute for Medical Research Wellcome Trust/MRC Building Addenbrooke's Hospital Hills Road Cambridge CB2 0XY Tel: (44) 1223 762669 Email: david.clayton at cimr.cam.ac.uk
ADD COMMENT

Login before adding your answer.

Traffic: 513 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6