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!
Is there any way to infer 'snp,scan' or 'scan,snp' format for a gds file?
You could see if an attribute has been set on the genotype node indicating the order:
Seeing
snp.order
here means the dimensions aresnp,scan
, whilesample.order
would indicatescan,snp
.