From eb072836a116cd0d288594e9f0d0f0771cb93ac0 Mon Sep 17 00:00:00 2001 From: coolneng Date: Thu, 6 May 2021 20:34:39 +0200 Subject: [PATCH] Parse a FASTQ file into a Tensor --- src/__init__.py | 0 src/constants.py | 1 + src/model.py | 6 ++++++ 3 files changed, 7 insertions(+) create mode 100644 src/__init__.py create mode 100644 src/constants.py create mode 100644 src/model.py diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/constants.py b/src/constants.py new file mode 100644 index 0000000..8da64ef --- /dev/null +++ b/src/constants.py @@ -0,0 +1 @@ +ALLOWED_BASES = "ACGT-" diff --git a/src/model.py b/src/model.py new file mode 100644 index 0000000..9a0aef8 --- /dev/null +++ b/src/model.py @@ -0,0 +1,6 @@ +from tensorflow_io import genome + + +def parse_data(filepath): + HVR = genome.read_fastq(filename=filepath) + return HVR.sequences, HVR.raw_quality