Closed mattgarner closed 2 years ago
Values in cells are truncated if the length of the URL falls within a specific range. This is not safe since it could change values
https://github.com/eastgenomics/eggd_generate_workbook/blob/208a2c01962d8894426edd5c2f2a4dc8b634ace8/resources/home/dnanexus/generate_workbook/utils/vcf.py#L478-L488
Modified snippet and output:
url="".join(["x"]*239) value="0.5" print("orig value", value) print("formula", f'=HYPERLINK("{url}", "{value}")') print("formula length", len(f'=HYPERLINK("{url}", "{value}")')) if len(f'=HYPERLINK("{url}", "{value}")') > 242: print("formula length > 242") max_len = 255 - len(f'=HYPERLINK("{url}", ') print("max_len", max_len) if max_len > 0: value = value[:max_len] else: value = value print("value", value) # Output orig value 0.5 formula =HYPERLINK("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "0.5") formula length 260 formula length > 242 max_len 1 value 0
Value of 0.5 would be presented as 0 in workbook
Values in cells are truncated if the length of the URL falls within a specific range. This is not safe since it could change values
https://github.com/eastgenomics/eggd_generate_workbook/blob/208a2c01962d8894426edd5c2f2a4dc8b634ace8/resources/home/dnanexus/generate_workbook/utils/vcf.py#L478-L488
Modified snippet and output:
Value of 0.5 would be presented as 0 in workbook