bulik / ldsc

LD Score Regression (LDSC)
GNU General Public License v3.0
644 stars 343 forks source link

Why do I keep reporting an error: Could not find SNP column? #374

Open ZyRose1 opened 1 year ago

ZyRose1 commented 1 year ago

(ldsc) python munge_sumstats.py \

--sumstats /mnt/ndisk1/Student/zhouyi/GWAS_tools/TWAS/data/wellbeing_sum/WBresults.txt \ --N 491455 \ --signed-sumstats beta,0 \ --snp snpid \ --out SWB \ --merge-alleles /mnt/ndisk1/Student/zhouyi/GWAS_tools/LDSC/baseline/baselinemodel/weights_hm3_no_hla


  • LD Score Regression (LDSC)
  • Version 1.0.1
  • (C) 2014-2019 Brendan Bulik-Sullivan and Hilary Finucane
  • Broad Institute of MIT and Harvard / MIT Department of Mathematics
  • GNU General Public License v3

    Call: ./munge_sumstats.py \ --signed-sumstats beta,0 \ --out SWB \ --merge-alleles /mnt/ndisk1/Student/zhouyi/GWAS_tools/LDSC/baseline/baselinemodel/weights_hm3_no_hla \ --N 491455.0 \ --snp snpid \ --sumstats /mnt/ndisk1/Student/zhouyi/GWAS_tools/TWAS/data/wellbeing_sum/WBresults.txt

ERROR converting summary statistics:

Traceback (most recent call last): File "munge_sumstats.py", line 627, in munge_sumstats raise ValueError('Could not find {C} column.'.format(C=c)) ValueError: Could not find SNP column.

Conversion finished at Fri Mar 24 11:30:21 2023 Total time elapsed: 0.0s Traceback (most recent call last): File "munge_sumstats.py", line 745, in munge_sumstats(parser.parse_args(), p=True) File "munge_sumstats.py", line 627, in munge_sumstats raise ValueError('Could not find {C} column.'.format(C=c)) ValueError: Could not find SNP column.

minmin4003 commented 9 months ago

I have the same problem, have you solved it?

zhowanu commented 6 months ago

SNP ,not “SNP”,No double quotation marks

731104 commented 4 months ago

I have the same problem, have you solved it? have you solved the problem?

731104 commented 4 months ago

SNP ,not “SNP”,No double quotation marks

I removed the double quotation marks, the error still existed. How to solve the problem? Many thanks.

aksarkar commented 4 months ago

@731104 You have specified --snp snpid. You need to ensure that the column header matches the argument.

731104 commented 4 months ago

@731104 You have specified --snp snpid. You need to ensure that the column header matches the argument. Many thanks again!

xzt199610 commented 4 months ago

ERROR converting summary statistics:

Traceback (most recent call last): File "./munge_sumstats.py", line 627, in munge_sumstats raise ValueError('Could not find {C} column.'.format(C=c)) ValueError: Could not find SNP column.

Conversion finished at Tue Jul 9 12:48:40 2024 Total time elapsed: 0.01s I also have met this problem even I have specified --snp rsid, What's the best way to fix this?

aksarkar commented 4 months ago

@xzt199610 It is not possible to answer your question without seeing the first line of the input file ./sample/lpa.txt

xzt199610 commented 4 months ago

@aksarkar This is several rows of my data. Many thanks.

rsid,bp,ref,alt,se,beta,pval,N rs1444281458,10485,G,A,0.0380333,-0.0296248,2.2E-01,174301 rs534229142,10511,G,A,0.0634967,-0.0156338,8.5E-01,174301 rs1387993806,10580,G,T,0.0512324,-0.0179897,9.7E-01,174301 rs1401057884,10705,A,G,0.0546404,0.0531506,2.2E-01,174301

xzt199610 commented 4 months ago

And I have tried an example of LDSC. I found this demo file coded by unix. I tried to convert my data file into this style. But the same error appeared again. I hope you can solve this problem. It is grateful for your help. @aksarkar

aksarkar commented 4 months ago

@xzt199610 The file needs to be whitespace delimited, not comma-delimited. Replace the commas by tabs or single spaces.

xzt199610 commented 4 months ago

@aksarkar Grateful for your help. I have solved the problem as you advised. Many thanks again.