bulik / ldsc

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

munge_sumstats.py_error "ValueError: No object to concatenate" #327

Open Nhasbani opened 3 years ago

Nhasbani commented 3 years ago

I am trying to to cross-trait LDSC for a multivariate analysis. In trying to use the munge_sumstats.py to format the statistics, I am getting this error on multiple files.

Any suggestions?


Interpreting column names as follows: MarkerName: Variant ID (e.g., rs number) P-value: p-Value Allele2: Allele 2, interpreted as non-ref allele for signed sumstat. Allele1: Allele 1, interpreted as ref allele for signed sumstat. Effect: Directional summary statistic as specified by --signed-sumstats. N: Sample size

Reading list of SNPs for allele merge from w_hm3.snplist Read 1217311 SNPs for allele merge. Reading sumstats from /home/nhasbani/projects/multipheno_cad/CIMT_PLAQ_CAC/IMT.meta_CHARGE_UKB1.TBL into memory 50000 SNPs at a time. ........................................................................................................................................................................................... done

ERROR converting summary statistics:

Traceback (most recent call last): File "./munge_sumstats.py", line 686, in munge_sumstats dat = parse_dat(dat_gen, cname_translation, merge_alleles, log, args) File "./munge_sumstats.py", line 301, in parse_dat dat = pd.concat(dat_list, axis=0).reset_index(drop=True) File "/home/nhasbani/anaconda3/envs/ldsc/lib/python2.7/site-packages/pandas/core/reshape/concat.py", line 206, in concat copy=copy) File "/home/nhasbani/anaconda3/envs/ldsc/lib/python2.7/site-packages/pandas/core/reshape/concat.py", line 239, in init raise ValueError('No objects to concatenate') ValueError: No objects to concatenate

Conversion finished at Wed Nov 3 14:09:45 2021 Total time elapsed: 37.59s Traceback (most recent call last): File "./munge_sumstats.py", line 745, in munge_sumstats(parser.parse_args(), p=True) File "./munge_sumstats.py", line 686, in munge_sumstats dat = parse_dat(dat_gen, cname_translation, merge_alleles, log, args) File "./munge_sumstats.py", line 301, in parse_dat dat = pd.concat(dat_list, axis=0).reset_index(drop=True) File "/home/nhasbani/anaconda3/envs/ldsc/lib/python2.7/site-packages/pandas/core/reshape/concat.py", line 206, in concat copy=copy) File "/home/nhasbani/anaconda3/envs/ldsc/lib/python2.7/site-packages/pandas/core/reshape/concat.py", line 239, in init raise ValueError('No objects to concatenate') ValueError: No objects to concatenate (ldsc) nhasbani@HGCNT92:~/projects/multipheno_cad/ldsc>

gkarakoc commented 2 years ago

I have the same problem. Is it solved???

zillurbmb51 commented 2 years ago

I am having the same issue. Any solution?

gkarakoc commented 2 years ago

Try to use --chunksize flag. If your data is big, it may cause this error. --chunksize 500000 I hope this helps.

iamyingzhou commented 2 years ago

--chunksize 500000 does not work

iamyingzhou commented 2 years ago

Selecting the columns I need and deleting extra columns works for me

uglymind commented 2 years ago

sad ,this doesn't work for me too,hope someone could help me out

pengs-group commented 1 year ago

In my experience, this problem was solved after removing a all "NA" column from the input file. Hope it helps.

hlnicholls commented 11 months ago

Switching my SNP id column from chrom:pos:ref:alt ids to rsIDs worked for me

minmin4003 commented 10 months ago

I am having the same issue. Any solution?