Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError #10

Open
biostatShao opened this issue Sep 3, 2024 · 0 comments
Open

AttributeError #10

biostatShao opened this issue Sep 3, 2024 · 0 comments

Comments

@biostatShao
Copy link

Hi Shadi,

I hope this message finds you well. I am reaching out to address two distinct AttributeError issues I encountered while using VIPRS. Here are the details:

  1. First Error:

When I run the Command Line Script (viprs_fit) with the --sumstats-format custom option, I get the following error:

--------------------  Reading input data  --------------------

Reading the training dataset...
Reading LD metadata...
Reading summary statistics...
Traceback (most recent call last):
File "/home/zhshao/anaconda3/envs/py38/bin/viprs_fit", line 657, in <module>
main()
File "/home/zhshao/anaconda3/envs/py38/bin/viprs_fit", line 601, in main
data_loaders = init_data(args)
File "/home/zhshao/anaconda3/envs/py38/bin/viprs_fit", line 163, in init_data
gdl.read_summary_statistics(args.sumstats_path,
File "/home/zhshao/anaconda3/envs/py38/lib/python3.8/site-packages/magenpy/GWADataLoader.py", line 551, in read_summary_statistics
ss_tab = SumstatsTable.from_file(f,
File "/home/zhshao/anaconda3/envs/py38/lib/python3.8/site-packages/magenpy/SumstatsTable.py", line 737, in from_file
sumstats_format_l = sumstats_format.lower()
AttributeError: 'NoneType' object has no attribute 'lower'

If I change the summary statistic format to another predefined format, such as magenpy, and then run with --sumstats-format magenpy, this AttributeError: 'NoneType' object has no attribute 'lower' does not occur. However, I encounter the following error later:

  1. Second Error:
----------------------  Model fitting  -----------------------

Traceback (most recent call last):
File "/home/zhshao/anaconda3/envs/py38/bin/viprs_fit", line 657, in <module>
main()
File "/home/zhshao/anaconda3/envs/py38/bin/viprs_fit", line 609, in main
fit_results = Parallel(n_jobs=args.n_jobs)(
File "/home/zhshao/anaconda3/envs/py38/lib/python3.8/site-packages/joblib/parallel.py", line 1918, in call
return output if self.return_generator else list(output)
File "/home/zhshao/anaconda3/envs/py38/lib/python3.8/site-packages/joblib/parallel.py", line 1847, in _get_sequential_output
res = func(*args, **kwargs)
File "/home/zhshao/anaconda3/envs/py38/bin/viprs_fit", line 359, in fit_model
m = model(data_dict['train'])
File "/home/zhshao/anaconda3/envs/py38/lib/python3.8/site-packages/viprs/model/VIPRS.py", line 160, in init
self.ld_data[c], self.ld_indptr[c] = ld_mat.low_memory_load(dtype=dtype)
AttributeError: 'LDMatrix' object has no attribute 'low_memory_load'

Please note that the LD matrix is computed with the following command:

/home/zhshao/anaconda3/envs/py38/bin/magenpy_ld --estimator windowed --backend plink --ld-window-kb 1000 ......

How should I resolve these issues?

Thank you!

Zhonghe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant