help to parse hdf5 (fast5) with h5dump under linux


#1

I finally found this community and installed the tols on my mac. I also found some primer on how to extract specific content from my data.
I would now like to extract the value of a single field but do not find my way further than the following command which returns a whole block of data.

h5dump -a UniqueGlobalKey/context_tags/sequencing_kit GXB01104_20181122_FAH86318_GA10000_mux_scan_metagenome925_34309_read_5_ch_477_strand.fast5
HDF5 "GXB01104_20181122_FAH86318_GA10000_mux_scan_metagenome925_34309_read_5_ch_477_strand.fast5" {
ATTRIBUTE "sequencing_kit" {
   DATATYPE  H5T_STRING {
      STRSIZE 11;
      STRPAD H5T_STR_NULLTERM;
      CSET H5T_CSET_ASCII;
      CTYPE H5T_C_S1;
   }
   DATASPACE  SCALAR
   DATA {
   (0): "sqk-rad004"
   }
}
}

What I would like to get returned is only the value: “sqk-rad004”
Could someone please point me to the right command for that (under terminal)
I will use this value and other similar ones in bash scripts

Thanks in advance
Stephane


#2

Try to add -b -o before -a. You should find the string in the file.

Elena