GENESIS: Can not use GdsGenotypeReader to read a gds file
2
0
Entering edit mode
Mindy wang • 0
@87916463
Last seen 12 months ago
Hong Kong

Problem

Hello, I have trouble with GdsGenotypeReader. my gdsfile can successfully opened by "seqOpen" . However, when I used "GdsGenotypeReader" , I got some error waring. My code and waring error were pasted below. So, how to solve this problem. Thanks for your help.

R codeand warning error:

(R4.3.1)

library(SeqArray)

library(GWASTtools)

library(GENESIS)

gdsfile <- seqOpen("C:\Users\Desktop\chr8.gds")

geno <- GdsGenotypeReader(gdsfile) 
[Error in index.gdsn(object@handler, varname) : No such GDS node "snp.id"!]

or

geno <- GdsGenotypeReader(filename = "chr8.gds")
 [Error in openfn.gds(filename = filename, allow.fork = allow.fork) : The file 'C:\Users\Desktop\chr8.gds' has been created or opened.]

My variant id name changed like this:

head(seqGetData(gdsfile,"annotation/id"))

[1] "chr8_700009_ACCCGCACACGCGCACAGACCCTCACAGGCGCACAGG_A"

[2] "chr8_700114_C_G"

[3] "chr8_700138_C_CGCACAGGCGCACAGACCCGCACACGCGCACAGGCCCGCACACGCGCACAGGCCG"

[4] "chr8_700153_A_G"

[5] "chr8_700209_GCGCACACACCCGCACACGCGCACAGGCC_G"

[6] "chr8_700216_C_G"
GENESIS GWASTools GDSfile • 765 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 days ago
United States

If you can open the file using seqOpen you should not expect that you will be able to open using GdsGenotypeReader.

> library(SeqArray)
> library(GWASTools)
## SeqArray GDS format
> gds.fn <- seqExampleFileName("gds")
## open using GWAStools
> GdsGenotypeReader(gds.fn)
Error in index.gdsn(object@handler, varname) : No such GDS node "snp.id"!
## open using SeqArray
> gdsfile <- seqOpen(gds.fn)
##GWAStools GDS file
## open using SeqArray
> file <- system.file("extdata", "illumina_geno.gds", package="GWASdata")
> seqOpen(file)
Error in seqOpen(file) : 
  '/share/groups/edge/R/R-4.3.1/GWASdata/extdata/illumina_geno.gds' is not a SeqArray GDS file.
## open using GWAStools
> z <- GdsGenotypeReader(file)
>

SeqArray and GWAStools were developed by two different groups, and you should not expect interoperability.

ADD COMMENT
0
Entering edit mode
@stephanie-m-gogarten-5121
Last seen 5 months ago
University of Washington

SeqVarTools and GWASTools provide two alternate paths to working with files in GENESIS, depending on what type of GDS file you start with. See this vignette for an example of how to use SeqVarTools with GENESIS.

ADD COMMENT

Login before adding your answer.

Traffic: 511 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