error related to MetaXcan
0
0
Entering edit mode
3.5 years ago
rheab1230 ▴ 140

Hello everyone, I am getting an error while running SPrediXcan.py. I am using whole blood mashr model only. The command: python /work2/08259/i/MetaXcan/MetaXcan/software/SPrediXcan.py \

--gwas_file $OUTPUT/processed_summary_imputation/imputed_CARDIoGRAM_C4D_CAD_ADDITIVE.txt.gz \ --snp_column panel_variant_id \ --effect_allele_column effect_allele \ --non_effect_allele_column non_effect_allele \ --zscore_column zscore \ --model_db_path $DATA/models/eqtl/mashr/mashr_Whole_Blood.db \ --covariance $DATA/models/eqtl/mashr/mashr_Whole_Blood.txt.gz \ --keep_non_rsid \ --additional_output \ --model_db_snp_key varID \ --throw \ --output_file $OUTPUT/spredixcan/eqtl/CARDIoGRAM_C4D_CAD_ADDITIVE__PM__Whole_Blood.csv

The error: INFO - Processing GWAS command line parameters INFO - Building beta for /scratch/08259/Metaxcan/TestOut_2021v1/processed_summary_imputation/imputed_CARDIoGRAM_C4D_CAD_ADDITIVE.txt.gz and /work2/08259/stampede2/../common_work_files/MetaXcan/data/models/eqtl/mashr/mashr_Whole_Blood.db INFO - Reading input gwas with special handling: /scratch/08259/Metaxcan/TestOut_2021v1/processed_summary_imputation/imputed_CARDIoGRAM_C4D_CAD_ADDITIVE.txt.gz Traceback (most recent call last): File "/work2/08259/i/MetaXcan/MetaXcan/software/SPrediXcan.py", line 65, in <module> run(args) File "/work2/08259/i/MetaXcan/MetaXcan/software/SPrediXcan.py", line 29, in run g = M03_betas.run(M03_args) File "/work2/08259/i/MetaXcan/MetaXcan/software/M03_betas.py", line 132, in run b = build_betas(args, model, gwas_format, name, args.snp_map_file) File "/work2/08259i/MetaXcan/MetaXcan/software/M03_betas.py", line 40, in build_betas skip_until_header=args.skip_until_header, handle_empty_columns=args.handle_empty_columns, input_pvalue_fix=args.input_pvalue_fix, keep_non_rsid=args.keep_non_rsid) File "/work2/08259/i/MetaXcan/MetaXcan/software/metax/gwas/GWAS.py", line 97, in load_gwas d = GWASSpecialHandling.gwas_data_source(source, snps, snp_column_name, skip_until_header, separator, handle_empty_columns) File "/work2/08259/i/MetaXcan/MetaXcan/software/metax/gwas/GWASSpecialHandling.py", line 43, in gwas_data_source for i,line in enumerate(file): File "/home1/08259/miniconda3/envs/imlabtools/lib/python3.7/gzip.py", line 300, in read1 return self._buffer.read1(size) File "/home1/08259/miniconda3/envs/imlabtools/lib/python3.7/_compression.py", line 68, in readinto data = self.read(len(byte_view)) File "/home1/08259/miniconda3/envs/imlabtools/lib/python3.7/gzip.py", line 493, in read raise EOFError("Compressed file ended before the " EOFError: Compressed file ended before the end-of-stream marker was reached

Can anyone please help me out with this?

PrediXcan TWAS MetaXcan SNP • 1.4k views
ADD COMMENT
0
Entering edit mode

You may have problem in processed_summary_imputation/imputed_CARDIoGRAM_C4D_CAD_ADDITIVE.txt.gz from the error EOFError: Compressed file ended before the end-of-stream marker was reached

ADD REPLY
0
Entering edit mode

Okay, So should i repeat the earlier steps and prepare the file again?

ADD REPLY
0
Entering edit mode

First try to gunzip imputed_CARDIoGRAM_C4D_CAD_ADDITIVE.txt.gz (gzip -d). If error from your code is correct (i.e gz file is corrupt), gunzipping the file should fail.

  1. If gunzipping doesn't fail ( i.e gunzip's without fail), gzip the gunzipped file (text file from gunzipping) again. This time it is supposed to work.
  2. If gunzipping fails, then search for file named imputed_CARDIoGRAM_C4D_CAD_ADDITIVE.txt (if it exists) in results from earlier steps, then gzip it and run the OP function again.

If the file doesn't exist, then run the step that generates the imputed_CARDIoGRAM_C4D_CAD_ADDITIVE.txt. Then run step 2 above.

ADD REPLY
0
Entering edit mode

Hello, I gunzip the file and it didn't failed. then i use gzip function as you have mentioned. I am again running the command but its still showing the same error. raise EOFError("Compressed file ended before the " EOFError: Compressed file ended before the end-of-stream marker was reached

ADD REPLY
0
Entering edit mode

out of suggestions..sorry.

ADD REPLY

Login before adding your answer.

Traffic: 938 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6