Skip to content

Commit 0ed81fc

Browse files
committed
fix: parse field names correctly
1 parent a3f67cf commit 0ed81fc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/batch/eqtl_catalogue.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from spark_prep import SparkPrep
1010

1111
EQTL_CATALOGUE_IMPORTED_PATH = "https://raw.githubusercontent.com/eQTL-Catalogue/eQTL-Catalogue-resources/master/tabix/tabix_ftp_paths_imported.tsv"
12-
EQTL_CATALOGUE_OUPUT_BASE = (
12+
EQTL_CATALOGUE_OUTPUT_BASE = (
1313
"gs://genetics_etl_python_playground/1-smart-mirror/summary_stats"
1414
)
1515

@@ -30,7 +30,7 @@
3030
source_id="eQTL_Catalogue",
3131
project_id="GTEx_V8",
3232
study_id=record["qtl_group"],
33-
output_base_path=EQTL_CATALOGUE_OUPUT_BASE,
33+
output_base_path=EQTL_CATALOGUE_OUTPUT_BASE,
3434
)
3535
worker.process()
3636
else:

src/batch/spark_prep.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def cast_to_bytes(x: Any) -> typing.IO[bytes]:
177177
gzip_stream = cast_to_bytes(ResilientFetch(self.input_uri))
178178
bytes_stream = cast_to_bytes(gzip.GzipFile(fileobj=gzip_stream))
179179
self.text_stream = io.TextIOWrapper(bytes_stream)
180-
self.field_names = self.text_stream.readline().split("\t")
180+
self.field_names = self.text_stream.readline().rstrip().split("\t")
181181

182182
def _p1_fetch_data(self, q_out: Queue[str | None]) -> None:
183183
"""Fetch data from the URI in blocks.

0 commit comments

Comments
 (0)