ComparativeGenomicsToolkit / cactus

Official home of genome aligner based upon notion of Cactus graphs
Other
481 stars 106 forks source link

fix: handle scientific notation in awk output by converting to float … #1410

Closed thiagogenez closed 2 weeks ago

thiagogenez commented 2 weeks ago

Description

This pull request addresses an issue in redMasking.py where the conversion of awkres to an integer fails if the value is in scientific notation, resulting in a ValueError.

Details

Changes Made

  1. Modified the code to convert awkres to a float before converting it to an integer:
    
    try:
       pre_mask_size = int(float(awkres)) if awkres else 0
    except ValueError as e:
       print(f"Error converting awkres to int: {e}")
       pre_mask_size = 0
glennhickey commented 2 weeks ago

Closing this in favour of #1408 (which fixes both instances of the issue). Thanks, though!