zhengxwen / SeqArray

Data management of large-scale whole-genome sequence variant calls (Development version only)
http://www.bioconductor.org/packages/SeqArray
43 stars 12 forks source link

Invalid position in C Index #84

Closed dylanHco closed 1 year ago

dylanHco commented 1 year ago

Hello -

I am trying to generate a PCA after already importing my vcf file and converting it to GDS file format.

pca.out = SNPRelate::snpgdsPCA(autosome.only = F, gdsin) After running this i get the following error:

Error in .DynamicForkCall(njobs, njobs, .fun = function(.jobidx, ...) { : Error in seqApply(f, nm, as.is = "none", FUN = .cfunction(cn), .useraw = NA, : Invalid position in CIndex.

My vcf file was generated with STACKS.

Any thoughts? Thanks!

zhengxwen commented 1 year ago

It is difficult to solve the problem based on the information here. But you could try SNPRelate::snpgdsVCF2GDS() to convert VCF to GDS.

dylanHco commented 1 year ago

Thanks Xiuwen, I think that did the trick! It seems to be working now, I will close the the issue and reopen if I run into any other issues!

I was using this to import the VCF:
SeqArray::seqVCF2GDS(vcf.fn = filename, out.fn = filename.gds, optimize = TRUE, scenario = "imputation",ignore.chr.prefix = "chr")