nadavbra / pwas

Proteome-Wide Association Study
42 stars 4 forks source link

requirement about small example dataset #7

Closed jingali closed 2 years ago

jingali commented 2 years ago

I have installed PWAS. While it can't create a dataset and ran into the error.

[2022_11_02-10:03:46] Parsing the phenotype specifications... Traceback (most recent call last): File "/datalus/smcpp/bin/create_ukbb_phenotype_dataset", line 4, in import('pkg_resources').run_script('ukbb-parser==1.0.2', 'create_ukbb_phenotype_dataset') File "/datalus/smcpp/lib/python3.10/site-packages/pkg_resources/init.py", line 662, in run_script self.require(requires)[0].run_script(script_name, ns) File "/datalus/smcpp/lib/python3.10/site-packages/pkg_resources/init.py", line 1466, in run_script exec(script_code, namespace, namespace) File "/datalus/smcpp/lib/python3.10/site-packages/ukbb_parser-1.0.2-py3.10.egg/EGG-INFO/scripts/create_ukbb_phenotype_dataset", line 70, in File "/datalus/smcpp/lib/python3.10/site-packages/ukbb_parser-1.0.2-py3.10.egg/ukbb_parser/ukbb_phenotype_dataset.py", line 57, in create_phenotype_dataset File "/datalus/smcpp/lib/python3.10/site-packages/ukbb_parser-1.0.2-py3.10.egg/ukbb_parser/ukbb_parser.py", line 185, in create_ICD10_dataset File "/datalus/smcpp/lib/python3.10/site-packages/ukbb_parser-1.0.2-py3.10.egg/ukbb_parser/ukbb_parser.py", line 116, in create_dataset File "/datalus/smcpp/lib/python3.10/site-packages/ukbb_parser-1.0.2-py3.10.egg/ukbb_parser/ukbb_parser.py", line 340, in read_raw_dataset File "/datalus/smcpp/lib/python3.10/site-packages/pandas/util/_decorators.py", line 211, in wrapper return func(*args, *kwargs) File "/datalus/smcpp/lib/python3.10/site-packages/pandas/util/_decorators.py", line 331, in wrapper return func(args, kwargs) File "/datalus/smcpp/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 950, in read_csv return _read(filepath_or_buffer, kwds) File "/datalus/smcpp/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 605, in _read parser = TextFileReader(filepath_or_buffer, kwds) File "/datalus/smcpp/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1442, in init self._engine = self._make_engine(f, self.engine) File "/datalus/smcpp/lib/python3.10/site-packages/pandas/io/parsers/readers.py", line 1735, in _make_engine self.handles = get_handle( File "/datalus/smcpp/lib/python3.10/site-packages/pandas/io/common.py", line 856, in get_handle handle = open( FileNotFoundError: [Errno 2] No such file or directory: '/path/to/ukbiobank/files/on/your/filesystem/ukb12345.csv'

In my opinion, the reason for the error is that I don't have access to the relevant UKBB fields. Could you please show me how to get the file "ukb12345.csv" or provide the related input file directly? Thanks in advance.

nadavbra commented 2 years ago

@jingali Can you please provide the full command line you are trying to run?

jingali commented 2 years ago

Here it is. create_ukbb_phenotype_dataset --phenotype-specs-file=./phenotype_specs.py --output-dataset-file=./ukbb_dataset.csv --output-covariates-columns-file=./ukbb_covariate_columns.json

nadavbra commented 2 years ago

It looks like you haven't configured ukbb_parser after installing it (just follow the instructions within the settings file, as explained in the project's GitHub page). If you continue to have problems with ukbb_parser, please open a separate ticket on the ukbb_parser project's GitHub. If you don't have access to the UKB, you will have to provide your own phenotypic dataset. It's just a CSV file with each row corresponding to a different individual/sample, and each column indicating a phenotype variable or covariate (you don't have to use all columns anyway, so don't worry if there are spare columns).

jingali commented 2 years ago

I have created my own phenotypic data and fam file, while the file "ukbb_paths.py" needs more files except for csv and fam file, such as "EGAD00010001226/001" in CALL_DIR, "EGAD00010001474" in IMPUTATION_V3_DIR and few txt files, I have no idea if it's necessary, if it is, how to make it.

nadavbra commented 2 years ago

I see. That's a ukbb_parser issue than, not pwas. Would you mind opening a ticket there?