diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/genotypes/preprocess_csv_collect_info.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/genotypes/preprocess_csv_collect_info.py b/scripts/genotypes/preprocess_csv_collect_info.py index f5d3418..a6671ff 100644 --- a/scripts/genotypes/preprocess_csv_collect_info.py +++ b/scripts/genotypes/preprocess_csv_collect_info.py @@ -17,6 +17,13 @@ from .types import FileStats, LineDetails, DotGenoFields, FieldsIdentity logger = logging.getLogger(__name__) +def filecontents(path: Path) -> Iterator[str]: + """Return an iterator to the file contents""" + with path.open("r") as fl: + for line in fl.readlines(): + yield line + + def identify_columns( fields: tuple[str, ...], settings: dict[str, str] |
