1
1
import json
2
- import os
3
2
4
3
import dask .array as da
5
4
import pandas as pd
@@ -60,7 +59,7 @@ def sample_metadata(self):
60
59
One row per sample.
61
60
"""
62
61
if self ._cache_sample_metadata is None :
63
- path = os . path . join ( self ._path , self .CONF [" metadata_path" ])
62
+ path = f" { self ._path } / { self .CONF [' metadata_path' ] } "
64
63
with self ._fs .open (path ) as f :
65
64
self ._cache_sample_metadata = pd .read_csv (f , sep = "\t " , na_values = "" )
66
65
return self ._cache_sample_metadata
@@ -75,7 +74,7 @@ def _open_variant_calls_zarr(self):
75
74
76
75
"""
77
76
if self ._cache_variant_calls_zarr is None :
78
- path = os . path . join ( self ._path , self .CONF [" variant_calls_zarr_path" ])
77
+ path = f" { self ._path } / { self .CONF [' variant_calls_zarr_path' ] } "
79
78
store = init_zarr_store (fs = self ._fs , path = path )
80
79
self ._cache_variant_calls_zarr = zarr .open_consolidated (store = store )
81
80
return self ._cache_variant_calls_zarr
@@ -205,7 +204,7 @@ def open_genome(self):
205
204
206
205
"""
207
206
if self ._cache_genome is None :
208
- path = os . path . join ( self ._path , self .CONF [" reference_path" ])
207
+ path = f" { self ._path } / { self .CONF [' reference_path' ] } "
209
208
store = init_zarr_store (fs = self ._fs , path = path )
210
209
self ._cache_genome = zarr .open_consolidated (store = store )
211
210
return self ._cache_genome
@@ -317,7 +316,7 @@ def genome_features(self, attributes=("ID", "Parent", "Name")):
317
316
try :
318
317
df = self ._cache_genome_features [attributes ]
319
318
except KeyError :
320
- path = os . path . join ( self ._path , self .CONF [" annotations_path" ])
319
+ path = f" { self ._path } / { self .CONF [' annotations_path' ] } "
321
320
with self ._fs .open (path , mode = "rb" ) as f :
322
321
df = read_gff3 (f , compression = "gzip" )
323
322
if attributes is not None :
0 commit comments