MCPcopy Create free account
hub / github.com/openai/plugins / parse_float

Function parse_float

plugins/ngs-analysis/scripts/run_fastq_assay_package.py:653–660  ·  view source on GitHub ↗
(value: str)

Source from the content-addressed store, hash-verified

651
652
653def parse_float(value: str) -> float:
654 text = str(value).strip().replace(",", "")
655 if not text or text in {"-", "NA", "nan"}:
656 return 0.0
657 try:
658 return float(text)
659 except ValueError:
660 return 0.0
661
662
663def write_tsv(path: Path, rows: list[dict[str, Any]], fieldnames: list[str] | None = None) -> None:

Callers 9

read_seqkit_stats_fileFunction · 0.70
read_feature_count_tableFunction · 0.70
parse_kraken_reportFunction · 0.70
read_bracken_tableFunction · 0.70
read_humann_tableFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected