[BioC] snpStats/GWASTools conversion

Stephanie M. Gogarten sdmorris at u.washington.edu
Thu Oct 3 20:49:40 CEST 2013

Hi Shmuel,

There is currently no direct conversion from SnpMatrix to GenotypeData. 
  You can write your own script to create a NetCDF file from a SnpMatrix 
object using the ncdf package, or use one of the following workflows, 
which require creating an intermediate file:

1) write your SnpMatrix object to plain text using write.SnpMatrix, then 
import the text files to NetCDF using ncdfCreate and ncdfAddData (see 
the "Data Cleaning" vignette for an example).

2) write the SnpMatrix object to plink format using write.plink, use 
plink to convert bed/bim/fam to ped/map format, then read the ped/map 
files with plinkToNcdf.  (Unfortunately plinkToNcdf does not currently 
read bed files, only ped files.)

Please copy the Bioconductor mailing list (bioconductor at r-project.org) 
with any follow-up questions, and use an informative subject line.

best wishes,

On 10/2/13 5:05 AM, Shmuel Leavitt wrote:
> Stephanie M. Gogarten.
> My name is Shmuel Leavitt.  I am working on the GWAS data sets  of the
> I have the datasets now, as SnpMatrix objects.
> I  consider to use GWASTools to work on the data (as  I need a tool that
> will be memory efficient). I understand that there is a way to convert
> data from a GenotypeData object to snpStats object. Does the opposite
> way work ? meaning, can I convert  data stored as a snpStats object to
> GenotypeData, so that I can work on the data with Gwas Tools ?
> Thanks in advance.
> Shmuel Leavitt

More information about the Bioconductor mailing list