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

Error when running SMultiXcan.py #177

Open
dym22 opened this issue Aug 12, 2023 · 2 comments
Open

Error when running SMultiXcan.py #177

dym22 opened this issue Aug 12, 2023 · 2 comments

Comments

@dym22
Copy link

dym22 commented Aug 12, 2023

Hi there,

I successfully ran SPrediXcan on my sumstats file, but am running into the following error when attempting to run SMultiXcan:

(...)
Level 9 - Processing Thyroid
Level 9 - Processing Uterus
Level 9 - Processing Vagina
Level 9 - Processing Whole_Blood
INFO - Loading genes
INFO - Context for snp covariance
INFO - Assessing GWAS-Models SNP intersection
INFO - Processing GWAS command line parameters
INFO - Reading input gwas: /indy/storage3/dym22/CLCLP_38_modified.txt
Traceback (most recent call last):
File "/indy/storage3/dym22/MetaXcan/software/SMulTiXcan.py", line 93, in
run(args)
File "/indy/storage3/dym22/MetaXcan/software/SMulTiXcan.py", line 22, in run
context = CrossModelUtilities.context_from_args(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/indy/storage3/dym22/MetaXcan/software/metax/cross_model/Utilities.py", line 186, in context_from_args
intersection = GWASAndModels.gwas_model_intersection(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/indy/storage3/dym22/MetaXcan/software/metax/misc/GWASAndModels.py", line 36, in gwas_model_intersection
gwas= GWASUtilities.load_plain_gwas_from_args(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/indy/storage3/dym22/MetaXcan/software/metax/gwas/Utilities.py", line 116, in load_plain_gwas_from_args
files = [_l(x) for x in files]
^^^^^^^^^^^^^^^^^^^^^^
File "/indy/storage3/dym22/MetaXcan/software/metax/gwas/Utilities.py", line 116, in
files = [_l(x) for x in files]
^^^^^
File "/indy/storage3/dym22/MetaXcan/software/metax/gwas/Utilities.py", line 109, in
_l = lambda x: GWAS.load_gwas(x, gwas_format, skip_until_header=args.skip_until_header,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/indy/storage3/dym22/MetaXcan/software/metax/gwas/GWAS.py", line 103, in load_gwas
d = pandas.read_table(source, separator)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: read_table() takes 1 positional argument but 2 were given

These are the flags I am using:
python ${PATH_TO_METAXCAN}/SMulTiXcan.py
--models_folder ${EQTL_DIR}
--models_name_pattern "mashr_(.).db"
--snp_covariance gtex_v8_expression_mashr_snp_smultixcan_covariance.txt.gz
--metaxcan_folder ${METAXCAN_OUTPUT_DIR}
--metaxcan_filter "SPrediXcan_(.
).csv"
--metaxcan_file_name_parse_pattern "SPrediXcan_(.*).csv"
--gwas_folder /indy/storage3/dym22
--gwas_file_pattern "CLCLP_38_modified.txt"
--snp_column VARIANT
--effect_allele_column A1
--non_effect_allele_column A2
--or_column OR
--pvalue_column P
--keep_non_rsid
--model_db_snp_key varID
--cutoff_condition_number 30
--verbosity 7
--throw
--output ${OUTPUT_DIR}/smultixcan_output.txt

I have been unable to find any similar issues reported on the GitHub or in Google Groups. If anyone is able to provide assistance/guidance, it would be much appreciated. Thank you!

@Hanuphant
Copy link

Is there any update on this issue? I have been facing it as well and was wondering what's going on with the positional arguments. Most suggest that being a class instance, we need to add self as an argument as well. But I feel that might unnecessarily break the code.

What would you all suggest?

@Hanuphant
Copy link

Implemented a fix that you can use or alternatively, it worked with Python v.3.6.8

#183 (comment)

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

2 participants