Entering edit mode
9.2 years ago
clear.choi
▴
30
I am trying to extract h5 file and filter sequence by myself (Another algorithm) and compress it to h5 file.
Anyone has best pratice to do extract and compress h5 file.
Thank you!
Could you precise what you're trying to do ? To read and write hdf5 files, you need access to the hdf5 library. There are wrappers for it in various programming languages (R, python, perl...) or maybe you're looking for this or something similar (see the pacbio page here) ?
Thank you for your information! I want to extract sequences and trimming those unexpected sequence and compress again. So main purpose try to trim unexpected sequence
Then I think you should be able to do this with the pbh5tools (link in my comment above).
Thank you for your reply, but it looks like able to exract but it's not able to compress data. Dose it?
Indeed, it seems pbh5tools is mostly aimed at reading PacBio's hdf5 files. However, in your case, it could be that cmph5tools.py from pbhtools may be what you're looking for, in particular the select option: select: Create a new file from a
cmp.h5
file by specifying which reads to include.Otherwise, you'll need to know how the files are structured then use you favorite language's hdf5 API to write them. But do you really need the data in hdf5? Your downstream application may also accept other formats as input.