Skip to content

Commit

Permalink
Merge pull request #36 from mialam24/illumina/feature/support-more-cl…
Browse files Browse the repository at this point in the history
…usterfile-versions

support more clusterfile versions
  • Loading branch information
jzieve authored Dec 20, 2023
2 parents a3bf11f + 0e48ca8 commit e7c623f
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions module/ClusterFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ def read_cluster_file(handle):
result = ClusterFile(gencall_version, cluster_version, call_version,
normalization_version, date_created, manifest_name)
data_block_version = read_int(handle)
if data_block_version not in [8, 9]:
raise Exception("Data block version in cluster file " +
str(data_block_version) + " not supported")
# opa
_ = read_string(handle)

Expand Down Expand Up @@ -211,17 +208,26 @@ def read_record(handle, version):

if version == 9:
intensity_threshold = read_float(handle)
elif version == 8:
_ = read_float(handle)

# read through unused fields
for idx in range(14):
_ = read_float(handle)
elif version >= 6:
intensity_threshold = 0

# read through unused fields
for idx in range(15):
_ = read_float(handle)
elif version < 5:
intensity_threshold = 0

# read through unused fields
_ = read_float(handle)
_ = read_float(handle)
else:
raise Exception(
"Unsupported cluster record version " + str(version))

# read through unused fields
for idx in range(14):
_ = read_float(handle)

aa_cluster_stats = ClusterStats(
aa_theta_mean, aa_theta_dev, aa_r_mean, aa_r_dev, aa_n)
ab_cluster_stats = ClusterStats(
Expand Down

0 comments on commit e7c623f

Please sign in to comment.