[BioC] convert GGtools object (generated by vcf2sm) to snpMatrix class or other class
stvjc at channing.harvard.edu
Sun Jun 12 17:08:47 CEST 2011
you didn't give sessionInfo() result. but see below
On Sun, Jun 12, 2011 at 6:33 AM, Mao Jianfeng <jianfeng.mao at gmail.com> wrote:
> Dear all,
> # (1) my problem:
> *I would like to get your helps on how to convert GGtools object (generated
> by vcf2sm) to snpMatrix class or other class (like classes used in R
> packages adegenet and genetics)*. Are there already anything functionalities
> implemented in R or bioconductor.
> # (2) background
> I am working on VCF format for population genomic studies. I would like to
> take advantage of R/bioconductor.
> Under helps from bioconductor, I have now can covert my VCF files to a
> SnpMatrix by using vcf2sm in GGtools package.
> # (3) my VCF data
> my VCF data are not normal genotypic data, they are haplotypic data (like
> SNP data from X or Y chromosomes of human).
> # (4) codes I have ever used
> A SnpMatrix with 20 rows and 1985 columns
> Row names: AL23C2_3 ... AL34C1-2
> Col names: chr1:69 ... chr1:83679
> Formal class 'SnpMatrix' [package "snpStats"] with 1 slots
> ..@ .Data: raw [1:20, 1:1985] 02 02 02 02 ...
> .. ..- attr(*, "dimnames")=List of 2
> .. .. ..$ : chr [1:20] "AL23C2_3" "AL23C2_1" "AL14C5P2-2" "AL10C3-P1-1"
> .. .. ..$ : chr [1:1985] "chr1:69" "chr1:87" "chr1:88" "chr1:116" ...
> Error in class(object) : 'object' is missing
that's because this is not a valid call to single.snp.tests -- read
the doc on that function
> Error in col.summary(vcf2sm.test) : not a snp.matrix object
this one is more difficult. we need to see your sessionInfo() result
-- col.summary should
not be asking for snp.matrix instance, but if you have chopsticks or
an old snpMatrix package
attached you could have such issues
> Thanks in advance.
> [[alternative HTML version deleted]]
> Bioconductor mailing list
> Bioconductor at r-project.org
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
More information about the Bioconductor