Skip to content

Commit

Permalink
converting vectorized operation to array comprehension to fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
adkinsrs committed Apr 12, 2021
1 parent 393d7e3 commit 54f2816
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions feature_counts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ function compute_mm_counts_by_em(feat_overlaps::Dict{String, FeatureOverlap}, mu
alignmenttype = alignment_type(first(templatealignments))

# I do not use "unique" for this because there may be a chance that the template aligns to the same feature multiple times
# Also, yay vectorized operations!
overlappingfeatures = featurename.(templatealignments)
overlappingfeatures = [featurename(a) for a in templatealignments]

template_feature_counter = Dict{String, UInt}(fn => zero(UInt) for fn in unique(overlappingfeatures))
template_feat_counts = Dict{String, Float32}(fn => zero(Float32) for fn in unique(overlappingfeatures))
Expand Down

0 comments on commit 54f2816

Please sign in to comment.