Closed renzilin closed 4 years ago
Hey @renzilin
That is because get_channel_info
is a method bound to the read object (that is it's a function that you need to call):
>>> read.get_channel_info()
{'offset': -230.0, 'channel_number': 1106, 'range': 598.8641328090869, 'digitisation': 2048.0, 'sampling_rate': 4000.0}
It returns a Python dictionary with a few different values - you can access the channel number like so:
>>> read.get_channel_info()['channel_number']
1106
HTH,
Chris.
Hey @renzilin
That is because
get_channel_info
is a method bound to the read object (that is it's a function that you need to call):>>> read.get_channel_info() {'offset': -230.0, 'channel_number': 1106, 'range': 598.8641328090869, 'digitisation': 2048.0, 'sampling_rate': 4000.0}
It returns a Python dictionary with a few different values - you can access the channel number like so:
>>> read.get_channel_info()['channel_number'] 1106
HTH,
Chris.
Yes, I got it. Thank you. When I ran it in a for loop, it works. But it didn't not work if I ran a single line. Anyway, it solves my problem. Much appreciated!
I attached the error.
Hi, developers!
I've installed a ont_fast5_api package in my python. And I tried to use your code example to extract some information from fast5 file.
And then I ran
read.get_channel_info
and it returned<bound method Fast5Read.get_channel_info of <ont_fast5_api.fast5_read.Fast5Read object at 0x2aab61126ba8>>
So how can I extract the information from the object like channel_number?
Thanks for your help!
-Zilin