dereneaton / ipyrad

Interactive assembly and analysis of RAD-seq data sets
http://ipyrad.readthedocs.io
GNU General Public License v3.0
72 stars 40 forks source link

v0.9 ipa.structure can't currently accept .str/.vcf files from other programs #361

Closed ksil91 closed 3 years ago

ksil91 commented 5 years ago

I wanted to use the ipyrad.analysis structure tool on a structure file that had been created by a different package (which I did successfully in a previous version notebook), but I see now that v0.9 only takes a .hdf5 created from a VCF. I tried to figure out how to convert my VCF to .hdf5 but it does not seem like vcf_to_hdf5.py is fully implemented yet?

For people who do further filtering on ipyrad outputs it might be handy to allow them to use the ipa.structure module on their own structure file, or make sure that the vcf_to_hdf5 implementation will work for VCFs not directly output by ipyrad.

isaacovercast commented 5 years ago

I couldn't agree with you more, thanks for creating the issue. I'll try to work on it, but am defending soon, so can't make any promises about timeliness....

dereneaton commented 5 years ago

There is an ipyrad.analysis tool (not yet documented, working on it!) for converting ANY vcf to our HDF5 format that is in the works for just this purpose. In fact I had it working recently but I just wanted to make it faster. I definitely want to get this online very soon.

eaton-lab commented 4 years ago

Oh, I misread before that you have a .str file already. If you also have your data in VCF format then you can now use the vcftohdf5 tool here: https://ipyrad.readthedocs.io/en/latest/API-analysis/cookbook-vcf2hdf5.

This is the best way to really take advantage of ipyrad's structure analysis tool, since it will be able to sample unlinked SNPs differently over many replicates. With a single input .str file it wouldn't be able to do this.

isaacovercast commented 4 years ago

IMHO the vcf2hdf5 conversion should be handled internally inside the analysis tools, in the view that it's better for us to offload the cognitive burden from the user, and that the conversion is pretty straightforward, if I'm not totally mistaken....

ksil91 commented 4 years ago

Will try out the vcftohdf5 tool and will close issue if it works!

isaacovercast commented 3 years ago

Fixed. Structure will now take a vcf file and autoconver to hdf5. d994f69f