def min_window_qual_and_length(fast5_file, window_size):
try:
hdf5_file = h5py.File(fast5_file, 'r')
names = get_hdf5_names(hdf5_file)
basecall_location = get_best_fastq_hdf5_location(hdf5_file, names)
if basecall_location:
fastq_str = hdf5_file[basecall_location].value
try:
parts = fastq_str.split(b'\n')
seq, quals = parts[1], parts[3]
return get_min_window_qscore(quals, window_size), len(seq), fast5_file
except IndexError:
pass
except (IOError, RuntimeError):
pass
return 0.0, 0, fast5_file
评论列表
文章目录