Update deepbindweight.py
Browse files- deepbindweight.py +6 -4
deepbindweight.py
CHANGED
|
@@ -7,6 +7,7 @@ logger = datasets.logging.get_logger(__name__)
|
|
| 7 |
ID_POOL = ()
|
| 8 |
URL = "https://huggingface.co/datasets/thewall/DeepBindWeight/resolve/main"
|
| 9 |
|
|
|
|
| 10 |
class DeepBindWeightConfig(datasets.BuilderConfig):
|
| 11 |
pass
|
| 12 |
|
|
@@ -35,8 +36,9 @@ class DeepBindWeight(datasets.GeneratorBasedBuilder):
|
|
| 35 |
param_url = f"{URL}/params.tar.gz"
|
| 36 |
selex_url = f"{URL}/ERP001824-deepbind.xlsx"
|
| 37 |
tf_url = f"{URL}/ERP001824-UniprotKB.xlsx"
|
| 38 |
-
|
| 39 |
-
downloaded_files = [os.path.join(f"{dl_manager.download_and_extract(param_url)}", "params")
|
|
|
|
| 40 |
downloaded_files.extend(dl_manager.download([selex_url, tf_url]))
|
| 41 |
return [
|
| 42 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files}),
|
|
@@ -46,7 +48,8 @@ class DeepBindWeight(datasets.GeneratorBasedBuilder):
|
|
| 46 |
"""This function returns the examples in the raw (text) form."""
|
| 47 |
logger.info("generating examples from = %s", filepath)
|
| 48 |
yield 0, {"config": filepath[0],
|
| 49 |
-
"existed": os.path.exists(filepath[0]) and os.path.exists(filepath[1])
|
|
|
|
| 50 |
"selex": filepath[1],
|
| 51 |
'tf': filepath[2]}
|
| 52 |
|
|
@@ -55,4 +58,3 @@ if __name__=="__main__":
|
|
| 55 |
from datasets import load_dataset
|
| 56 |
dataset = load_dataset("thewall/deepbindweight", split="all")
|
| 57 |
# dataset.push_to_hub("thewall/DeepBindWeight")
|
| 58 |
-
|
|
|
|
| 7 |
ID_POOL = ()
|
| 8 |
URL = "https://huggingface.co/datasets/thewall/DeepBindWeight/resolve/main"
|
| 9 |
|
| 10 |
+
|
| 11 |
class DeepBindWeightConfig(datasets.BuilderConfig):
|
| 12 |
pass
|
| 13 |
|
|
|
|
| 36 |
param_url = f"{URL}/params.tar.gz"
|
| 37 |
selex_url = f"{URL}/ERP001824-deepbind.xlsx"
|
| 38 |
tf_url = f"{URL}/ERP001824-UniprotKB.xlsx"
|
| 39 |
+
aptani2_url = f"{URL}/aptani2_config.tar.gz"
|
| 40 |
+
downloaded_files = [os.path.join(f"{dl_manager.download_and_extract(param_url)}", "params"),
|
| 41 |
+
f"{dl_manager.download_and_extract(aptani2_url)}"]
|
| 42 |
downloaded_files.extend(dl_manager.download([selex_url, tf_url]))
|
| 43 |
return [
|
| 44 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files}),
|
|
|
|
| 48 |
"""This function returns the examples in the raw (text) form."""
|
| 49 |
logger.info("generating examples from = %s", filepath)
|
| 50 |
yield 0, {"config": filepath[0],
|
| 51 |
+
"existed": os.path.exists(filepath[0]) and os.path.exists(filepath[1])
|
| 52 |
+
and os.path.exists(filepath[2]) and os.path.exists(filepath[4]),
|
| 53 |
"selex": filepath[1],
|
| 54 |
'tf': filepath[2]}
|
| 55 |
|
|
|
|
| 58 |
from datasets import load_dataset
|
| 59 |
dataset = load_dataset("thewall/deepbindweight", split="all")
|
| 60 |
# dataset.push_to_hub("thewall/DeepBindWeight")
|
|
|