Question about GWASTools gdsSubset
2
0
Entering edit mode
SuperD • 0
@65c75c16
Last seen 21 months ago
United States

I used the command

GWASTools::gdsSubset(input, sub.input, sample.include=IDuse, snp.include=snpuse) to subset the gds file.

Then I checked the file using

GWASTools::gdsSubsetCheck(input, sub.input, sample.include=IDuse, snp.include=snpuse)

It returned "All variables match."

Finally, I used the command

GdsGenotypeReader("sub.input") to read the file.

It returned an error

Error in validObject(.Object) : invalid class “GdsGenotypeReader” object: genotype order is not specified: 'snp,scan' or 'scan,snp'

I would appreciate it if anyone could help me with the problem. Thanks!

GWASTools gdsSubset • 1.2k views
ADD COMMENT
1
Entering edit mode
@stephanie-m-gogarten-5121
Last seen 4 months ago
University of Washington

GdsGenotypeReader will attempt to determine the dimensions of your file automatically, but if it can't (e.g. if the number of snps and scans is the same), it will issue that error and require you provide the argument genotypeDim='snp,scan' or 'scan,snp'.

ADD COMMENT
0
Entering edit mode

Is there any way to infer 'snp,scan' or 'scan,snp' format for a gds file?

ADD REPLY
1
Entering edit mode

You could see if an attribute has been set on the genotype node indicating the order:

> library(gdsfmt)
> gdsfile <- system.file("extdata", "illumina_geno.gds", package="GWASdata")
> gds <- openfn.gds(gdsfile)
> get.attr.gdsn(index.gdsn(gds, "genotype"))
$snp.order
NULL

Seeing snp.order here means the dimensions are snp,scan, while sample.order would indicate scan,snp.

ADD REPLY

Login before adding your answer.

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