From 2ee943581dc1e0d508a919eab8f8bdf3d73b2b5e Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 28 Sep 2026 12:29:24 -0500 Subject: Add format-specific CLI options for CSV files. --- scripts/genotypes/preprocess_csv_collect_info.py | 25 +++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/scripts/genotypes/preprocess_csv_collect_info.py b/scripts/genotypes/preprocess_csv_collect_info.py index eaad1d7..b4b627c 100644 --- a/scripts/genotypes/preprocess_csv_collect_info.py +++ b/scripts/genotypes/preprocess_csv_collect_info.py @@ -159,17 +159,40 @@ if __name__ == "__main__": "basic file information and statistics."))) parser.add_argument( - "csv-file", + "csv_file", metavar="CSV-FILE", type=Path, #file_exists, help="The CSV file to process.") + ## format-specific arguments parser.add_argument( "--is-transposed", action="store_true", default=False, help="Are the rows and columns in the CSV file flipped?") + parser.add_argument( + "--separator", + metavar="FIELDS-SEPARATOR", + type=str, + default=",", + help=( + "The character acting as the fields' separator in the CSV file.")) + + parser.add_argument( + "--comment_char", + metavar="COMMENTS-CHARACTER", + type=str, + default="#", + help="The character indicating a comment line.") + + parser.add_argument( + "--na_strings", + metavar="MISSING-VALUES-STRING", + action="append", + type=str, + default=["-", "NA", "N/A"], + help="The character indicating a comment line.") return parser.parse_args() -- cgit 1.4.1