Closed jemunro closed 6 years ago
Could you please show me the file structure of gdsfile
?
print(gdsfile)
Object of class "SeqVarGDSClass"
File: /data/p1.gds (301.9M)
+ [ ] *
|--+ description [ ] *
|--+ sample.id { Str8 325 ZIP_ra(29.7%), 1.0K } *
|--+ variant.id { Int32 732229 ZIP_ra(34.6%), 989.1K } *
|--+ position { Int32 732229 ZIP_ra(39.2%), 1.1M } *
|--+ chromosome { Str8 732229 ZIP_ra(0.20%), 16.7K } *
|--+ allele { Str8 732229 ZIP_ra(20.5%), 1.9M } *
|--+ genotype [ ] *
| |--+ data { Bit2 1x325x792285 ZIP_ra(20.2%), 12.4M } *
| |--+ extra.index { Int32 3x0 ZIP_ra, 16B } *
| \--+ extra { Int16 0 ZIP_ra, 16B }
|--+ phase [ ]
|--+ annotation [ ]
| |--+ id { Str8 732229 ZIP_ra(0.10%), 749B } *
| |--+ qual { Float32 732229 ZIP_ra(85.6%), 2.4M } *
| |--+ filter { Int32,factor 732229 ZIP_ra(0.10%), 2.8K } *
| |--+ info [ ]
| | |--+ AC { Int32 998798 ZIP_ra(21.3%), 830.2K } *
| | |--+ AF { Float32 998798 ZIP_ra(33.0%), 1.3M } *
| | |--+ AN { Int32 732229 ZIP_ra(14.5%), 416.1K } *
| | |--+ BaseQRankSum { Float32 732229 ZIP_ra(44.2%), 1.2M } *
| | |--+ ClippingRankSum { Float32 732229 ZIP_ra(5.73%), 163.8K } *
| | |--+ DP { Int32 732229 ZIP_ra(55.4%), 1.5M } *
| | |--+ DS { Bit1 732229 ZIP_ra(0.13%), 128B } *
| | |--+ END { Int32 732229 ZIP_ra(0.10%), 2.8K } *
| | |--+ ExcessHet { Float32 732229 ZIP_ra(0.10%), 2.8K } *
| | |--+ FS { Float32 732229 ZIP_ra(35.1%), 1002.9K } *
| | |--+ InbreedingCoeff { Float32 732229 ZIP_ra(0.10%), 2.8K } *
| | |--+ MLEAC { Int32 998798 ZIP_ra(21.6%), 843.7K } *
| | |--+ MLEAF { Float32 998798 ZIP_ra(32.9%), 1.3M } *
| | |--+ MQ { Float32 732229 ZIP_ra(29.4%), 840.8K } *
| | |--+ MQRankSum { Float32 732229 ZIP_ra(15.9%), 454.2K } *
| | |--+ QD { Float32 732229 ZIP_ra(51.7%), 1.4M } *
| | |--+ RAW_MQ { Float32 732229 ZIP_ra(0.10%), 2.8K } *
| | |--+ ReadPosRankSum { Float32 732229 ZIP_ra(45.1%), 1.3M } *
| | \--+ SOR { Float32 732229 ZIP_ra(49.0%), 1.4M } *
| \--+ format [ ]
| |--+ AD [ ] *
| | \--+ data { VL_Int 325x1731027 ZIP_ra(13.2%), 79.0M } *
| |--+ DP [ ] *
| | \--+ data { VL_Int 325x732229 ZIP_ra(19.6%), 56.4M } *
| |--+ GQ [ ] *
| | \--+ data { VL_Int 325x732229 ZIP_ra(3.48%), 16.1M } *
| |--+ MIN_DP [ ] *
| | \--+ data { VL_Int 325x0 ZIP_ra, 16B } *
| |--+ PL [ ] *
| | \--+ data { VL_Int 325x1731027 ZIP_ra(14.0%), 116.8M } *
| |--+ RGQ [ ] *
| | \--+ data { VL_Int 325x0 ZIP_ra, 16B } *
| \--+ SB [ ] *
| \--+ data { VL_Int 325x0 ZIP_ra, 16B } *
\--+ sample.annotation [ ]
As a work-around, I have been using a modified version of seqExport() with the following block of code deleted:
sync.gds(outfile)
node <- addfolder.gdsn(outfile, "phase")
put.attr.gdsn(node, val = index.gdsn(gdsfile, "phase"))
cp.phase(node, S$sample.sel, S$variant.sel)
if (prod(objdesp.gdsn(index.gdsn(gdsfile, "phase/extra.index"))$dim) <=
0) {
copyto.gdsn(node, index.gdsn(gdsfile, "phase/extra.index"))
copyto.gdsn(node, index.gdsn(gdsfile, "phase/extra"))
}
else stop("Not implemented in 'phase/extra.index', please contact the author.")
Thanks! I will fix it.
Error message:
I have tested this on data with ploidy 2 and it works fine.
Session info: