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?
You may have problem in
processed_summary_imputation/imputed_CARDIoGRAM_C4D_CAD_ADDITIVE.txt.gz
from the errorEOFError: Compressed file ended before the end-of-stream marker was reached
Okay, So should i repeat the earlier steps and prepare the file again?
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.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.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
out of suggestions..sorry.