Skip to content

Commit dd1d34b

Browse files
Merge branch 'papyrus_version' into 'dev'
Fix papyrus version inconsistently See merge request cdd/QSPRpred!193
2 parents 5c50f5f + d64d942 commit dd1d34b

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ From v3.2.0 to v4.0.0
44

55
## Fixes
66

7-
None.
7+
- Add variable version to papyrus_filter for consistent version use.
88

99
## Changes
1010

qsprpred/data/sources/papyrus/papyrus_class.py

+1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ def getData(
132132
raise ValueError(f"Output directory '{output_dir}' does not exist.")
133133
logger.debug(f"Filtering Papyrus for accession keys: {acc_keys}")
134134
data, path = papyrus_filter(
135+
version=self.version,
135136
acc_key=acc_keys,
136137
quality=quality,
137138
out_dir=output_dir,

qsprpred/data/sources/papyrus/papyrus_filter.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616

1717
def papyrus_filter(
18+
version: str,
1819
acc_key: list[str],
1920
quality: str,
2021
out_dir: str,
@@ -31,6 +32,7 @@ def papyrus_filter(
3132
and outputs a .tsv file of all compounds fulfilling these requirements.
3233
3334
Args:
35+
version (str): Papyrus database version
3436
acc_key (list): list of UniProt accession keys
3537
quality (str): str with minimum quality of dataset to keep
3638
out_dir (str): path to the location of Papyrus data
@@ -59,7 +61,7 @@ def papyrus_filter(
5961
# read data
6062
logger.info(f"Reading data from {papyrus_dir}...")
6163
sample_data = read_papyrus(
62-
is3d=stereo, chunksize=chunk_size, source_path=papyrus_dir, plusplus=plusplus
64+
is3d=stereo, version=version, chunksize=chunk_size, source_path=papyrus_dir, plusplus=plusplus
6365
)
6466
logger.info("Read all data.")
6567

0 commit comments

Comments
 (0)