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

EmptyDataError: No columns to parse from file #4

Open
LiuDingrui9 opened this issue Sep 6, 2024 · 1 comment
Open

EmptyDataError: No columns to parse from file #4

LiuDingrui9 opened this issue Sep 6, 2024 · 1 comment

Comments

@LiuDingrui9
Copy link

  • easy_finemap version:0.4.1
  • Python version:3.11.5
  • Operating System:

Description

Hi dear Dr.Wang, I come across a problem when I run easyfinemap, as you can see, When I run test data or LD-free with my input data, everything was perfect. However, when I try to run LD-based like finemap, it occurs mistakes. Test data showed that pipeline and reference panel should be fine, so i really want to know what happened, cheers

What I Did

(easyfinemap-dev) liudr@madeira:~/.pip/CAUSALdb-finemapping-pip$ easyfinemap fine-mapping -m all --ldref /media/dubai/home/liudr/.pip/CAUSALdb-finemapping-pip/ld/ld/vcf/ALL.valid.chr{chrom} --use-ref-eaf --credible-method finemap --credible-threshold 0.95 -n 1000  SLE.txt.gz SLE.loci.txt  SLE.leadsnp.txt SLE.all.txt
───────────────────────────────────────────────── EasyFinemap ─────────────────────────────────────────────────
                                                Version: 0.4.1
                                             Author: Jianhua Wang
                                         Email: [email protected]
[15:16:45] INFO     io - Loading summary statistics from SLE.txt.gz for 1:14402605-15402605
           INFO     io - Loading summary statistics from SLE.txt.gz for 1:113261186-114261186
     ..
           INFO     io - Loading summary statistics from SLE.txt.gz for 22:21130090-22130090
[15:16:59] INFO     LDRef - Making the LD matrix
[15:17:00] INFO     rpy2.situation - cffi mode is CFFI_MODE.ANY
           INFO     rpy2.situation - R home found: /media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/R
           INFO     rpy2.situation - R library path:
           INFO     rpy2.situation - LD_LIBRARY_PATH:
           INFO     rpy2.rinterface_lib.embedded - Default options to initialize R: rpy2, --quiet, --no-save
[15时17分00秒] INFO     rpy2.rinterface_lib.embedded - R is already initialized. No need to initialize.
[15时17分02秒] INFO     LDRef - Making the LD matrix
Perform Fine-mapping... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   1/183 0:00:04
[15时17分03秒] INFO     LDRef - Making the LD matrix
[15时17分04秒] INFO     LDRef - Making the LD matrix
[15时17分05秒] WARNING  LDRef - Error: No variants remaining after --extract.

            WARNING  LDRef - see log file: ./tmp/easyfinemap/tmpkn7lzbvp/intersc.log for details
            INFO     LDRef - Making the LD matrix
            ERROR    LDRef - Error: Failed to open ./tmp/easyfinemap/tmpkn7lzbvp/intersc.bed.

Perform Fine-mapping... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0/183 0:00:00_RemoteTraceback:
"""
Traceback (most recent call last):
  File "/media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/concurrent/futures/process.py",
line 256, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/concurrent/futures/process.py",
line 205, in _process_chunk
    return [fn(*args) for args in chunk]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/concurrent/futures/process.py",
line 205, in <listcomp>
    return [fn(*args) for args in chunk]
            ^^^^^^^^^
  File
"/media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/site-packages/easyfinemap/easyfinemap.py
", line 706, in finemap_locus_parallel
    return self.finemap_locus(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File
"/media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/site-packages/easyfinemap/utils.py",
line 119, in wrapper
    result = func(*args, temp_dir=temp_dir, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File
"/media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/site-packages/easyfinemap/easyfinemap.py
", line 668, in finemap_locus
    finemap_pp = self.run_finemap(sumstats=fm_input_ol, ld_matrix=ld_matrix, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File
"/media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/site-packages/easyfinemap/utils.py",
line 119, in wrapper
    result = func(*args, temp_dir=temp_dir, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File
"/media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/site-packages/easyfinemap/easyfinemap.py
", line 210, in run_finemap
    finemap_res = pd.read_csv(f"{temp_dir}/finemap.snp", sep=" ", usecols=["rsid", "prob"])
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File
"/media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/site-packages/pandas/util/_decorators.py
", line 211, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File
"/media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/site-packages/pandas/util/_decorators.py
", line 331, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File
"/media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/site-packages/pandas/io/parsers/readers.
py", line 950, in read_csv
    return _read(filepath_or_buffer, kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File
"/media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/site-packages/pandas/io/parsers/readers.
py", line 605, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File
"/media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/site-packages/pandas/io/parsers/readers.
py", line 1442, in __init__
    self._engine = self._make_engine(f, self.engine)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File
"/media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/site-packages/pandas/io/parsers/readers.
py", line 1753, in _make_engine
    return mapping[engine](f, **self.options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File
"/media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/site-packages/pandas/io/parsers/c_parser
_wrapper.py", line 79, in __init__
    self._reader = parsers.TextReader(src, **kwds)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "pandas/_libs/parsers.pyx", line 554, in pandas._libs.parsers.TextReader.__cinit__
pandas.errors.EmptyDataError: No columns to parse from file
"""

The above exception was the direct cause of the following exception:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/site-packages/easyfinemap/ │
│ cli.py:170 in fine_mapping                                                                       │
│                                                                                                  │
│   167 │   │   # sumstats = pd.read_csv(sumstats_path, sep="\t")                                  │
│   168 │   │   loci = pd.read_csv(loci_path, sep="\t")                                            │
│   169 │   │   lead_snps = pd.read_csv(lead_snps_path, sep="\t")                                  │
│ ❱ 170 │   │   EasyFinemap().finemap_all_loci(                                                    │
│   171 │   │   │   sumstats=sumstats_path,                                                        │
│   172 │   │   │   loci=loci,                                                                     │
│   173 │   │   │   lead_snps=lead_snps,                                                           │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │  cond_snps_wind_kb = 10000                                                                   │ │
│ │        conditional = False                                                                   │ │
│ │    credible_method = 'finemap'                                                               │ │
│ │ credible_threshold = 0.95                                                                    │ │
│ │              ldref = '/media/dubai/home/liudr/.pip/CAUSALdb-finemapping-pip/ld/ld/vcf/ALL.v… │ │
│ │          lead_snps = │   │   │   │   SNPID  CHR         BP        rsID EA NEA  EAF       MAF │ │
│ │                      BETA      SE              P                                             │ │
│ │                      0      6-32037490-C-T    6   32037490    rs431204  T   C  NaN  0.089524 │ │
│ │                      1.0006  0.0465  6.700000e-103                                           │ │
│ │                      1      6-31973120-A-G    6   31973120    rs389884  G   A  NaN  0.072381 │ │
│ │                      0.9282  0.0432  2.926000e-102                                           │ │
│ │                      2      6-31910656-A-G    6   31910656    rs519417  A   G  NaN  0.071429 │ │
│ │                      0.9203  0.0432  6.970000e-101                                           │ │
│ │                      3      6-32112414-C-G    6   32112414   rs1269852  C   G  NaN  0.073333 │ │
│ │                      0.9282  0.0435  6.990000e-101                                           │ │
│ │                      4      6-31842835-C-T    6   31842835   rs9267574  T   C  NaN  0.073333 │ │
│ │                      0.9203  0.0432  1.441000e-100                                           │ │
│ │                      ..                ...  ...        ...         ... ..  ..  ...       ... │ │
│ │                      ...     ...            ...                                              │ │
│ │                      0.1570  0.0286   4.039000e-08                                           │ │
│ │                      181   10-62065802-C-T   10   62065802   rs7899626  T   C  NaN  0.355238 │ │
│ │                      0.1823  0.0333   4.186000e-08                                           │ │
│ │                      182    6-35013168-A-G    6   35013168  rs57844307  A   G  NaN  0.080952 │ │
│ │                      0.2776  0.0509   4.974000e-08                                           │ │
│ │                                                                                              │ │
│ │                      [183 rows x 11 columns]                                                 │ │
│ │     lead_snps_path = 'SLE.leadsnp.txt'                                                       │ │
│ │               loci = │    CHR      START        END         LEAD_SNP    LEAD_SNP_P           │ │
│ │                      LEAD_SNP_BP                                                             │ │
│ │                      0      1   14402605   15402605   1-14902605-G-T  9.399000e-11           │ │
│ │                      14902605                                                                │ │
│ │                      1      1  113261186  114261186  1-113761186-A-C  4.546000e-13           │ │
│ │                      113761186                                                               │ │
│ │                      2      1  113334946  114334946  1-113834946-A-G  8.382000e-13           │ │
│ │                      113834946                                                               │ │
│ │                      3      1  161009020  162009020  1-161509020-A-G  6.640000e-12           │ │
│ │                      161509020                                                               │ │
│ │                      4      1  172722232  173722232  1-173222232-A-G  9.946000e-13           │ │
│ │                      173222232                                                               │ │
│ │                      ..   ...        ...        ...              ...           ...           │ │
│ │                      ...                                                                     │ │
│ │                      178   16   85433077   86433077  16-85933077-A-G  5.428000e-17           │ │
│ │                      85933077                                                                │ │
│ │                      179   16   85485910   86485910  16-85985910-C-G  2.216000e-08           │ │
│ │                      85985910                                                                │ │
│ │                      180   19    9849293   10849293  19-10349293-A-G  3.610000e-13           │ │
│ │                      10349293                                                                │ │
│ │                      181   22   21075277   22075277  22-21575277-A-T  9.846000e-14           │ │
│ │                      21575277                                                                │ │
│ │                      182   22   21130090   22130090  22-21630090-A-G  2.881000e-14           │ │
│ │                      21630090                                                                │ │
│ │                                                                                              │ │
│ │                      [183 rows x 6 columns]                                                  │ │
│ │          loci_path = 'SLE.loci.txt'                                                          │ │
│ │         max_causal = 1                                                                       │ │
│ │            methods = [<FinemapMethod.all: 'all'>]                                            │ │
│ │            outfile = 'SLE.all.txt'                                                           │ │
│ │         prior_file = None                                                                    │ │
│ │        sample_size = 1000                                                                    │ │
│ │      sumstats_path = 'SLE.txt.gz'                                                            │ │
│ │            threads = 1                                                                       │ │
│ │        use_ref_EAF = True                                                                    │ │
│ │          var_prior = 0.2                                                                     │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /media/dubai/home/liudr/anaconda3/envs/easyfinemap-dev/lib/python3.11/site-packages/easyfinemap/ │
│ easyfinemap.py:815 in finemap_all_loci                                                           │
│                                                                                                  │
│   812 │   │   │   │   auto_refresh=True,                                                         │
│   813 │   │   │   ) as progress:                                                                 │
│   814 │   │   │   │   task = progress.add_task("Perform Fine-mapping...", total=len(kwargs_lis   │
│ ❱ 815 │   │   │   │   for _ in executor.map(ef.finemap_locus_parallel, kwargs_list):             │
│   816 │   │   │   │   │   progress.update(task, advance=1)                                       │
│   817 │   │   │   │   │   progress.refresh()                                                     │
│   818 │   │   │   │   │   output.append(_)                                                       │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │                  _ = │   │   │   SNPID  CHR        BP        rsID  ... PP_SUSIE              │ │
│ │                      PP_POLYFUN_FINEMAP PP_POLYFUN_SUSIE        LEAD_SNP                     │ │
│ │                      0  1-14522592-C-T    1  14522592   rs3892594  ...      0.0              │ │
│ │                      0.170185              0.0  1-14902605-G-T                               │ │
│ │                      1  1-15283674-A-G    1  15283674   rs6674471  ...      0.0              │ │
│ │                      0.134740              0.0  1-14902605-G-T                               │ │
│ │                      2  1-15226066-A-G    1  15226066  rs12029833  ...      0.0              │ │
│ │                      0.128773              0.0  1-14902605-G-T                               │ │
│ │                      3  1-14573249-A-G    1  14573249  rs56370828  ...      0.0              │ │
│ │                      0.111792              0.0  1-14902605-G-T                               │ │
│ │                      4  1-14538084-C-T    1  14538084   rs2211180  ...      0.0              │ │
│ │                      0.100514              0.0  1-14902605-G-T                               │ │
│ │                      5  1-14425956-A-G    1  14425956  rs74724543  ...      0.0              │ │
│ │                      0.095161              0.0  1-14902605-G-T                               │ │
│ │                      6  1-15232209-A-G    1  15232209   rs6673448  ...      0.0              │ │
│ │                      0.090793              0.0  1-14902605-G-T                               │ │
│ │                      7  1-14671437-A-G    1  14671437   rs3820066  ...      0.0              │ │
│ │                      0.084021              0.0  1-14902605-G-T                               │ │
│ │                      8  1-14881716-G-T    1  14881716   rs2801178  ...      0.0              │ │
│ │                      0.084020              0.0  1-14902605-G-T                               │ │
│ │                                                                                              │ │
│ │                      [9 rows x 19 columns]                                                   │ │
│ │              chrom = 22                                                                      │ │
│ │  cond_snps_wind_kb = 10000                                                                   │ │
│ │        conditional = False                                                                   │ │
│ │    credible_method = 'finemap'                                                               │ │
│ │ credible_threshold = 0.95                                                                    │ │
│ │                 ef = <easyfinemap.easyfinemap.EasyFinemap object at 0x7f39ad9ec690>          │ │
│ │                end = 22130090                                                                │ │
│ │           executor = <concurrent.futures.process.ProcessPoolExecutor object at               │ │
│ │                      0x7f39ad8911d0>                                                         │ │
│ │             kwargs = {                                                                       │ │
│ │                      │   'sumstats':                 SNPID  CHR        BP       rsID EA NEA  │ │
│ │                      EAF       MAF    BETA      SE         P                                 │ │
│ │                      0     22-21444062-C-G   22  21444062   rs458361  C   G  None  0.286667  │ │
│ │                      -0.0862  0.0290  0.002958                                               │ │
│ │                      1     22-21444618-A-G   22  21444618   rs465500  G   A  None  0.286667  │ │
│ │                      -0.0862  0.0289  0.002899                                               │ │
│ │                      2     22-21447200-A-C   22  21447200   rs464694  A   C  None  0.400952  │ │
│ │                      -0.0862  0.0253  0.000658                                               │ │
│ │                      3     22-21448672-G-T   22  21448672  rs3747086  G   T  None  0.238095  │ │
│ │                      0.1044  0.0332  0.001677                                                │ │
│ │                      4     22-21452112-C-T   22  21452112   rs460106  C   T  None  0.282857  │ │
│ │                      -0.0770  0.0279  0.005792                                               │ │
│ │                      ...               ...  ...       ...        ... ..  ..   ...       ...  │ │
│ │                      ...     ...       ...                                                   │ │
│ │                      1098  22-22129174-A-T   22  22129174  rs6001052  T   A  None  0.271429  │ │
│ │                      -0.0305  0.0270  0.260000                                               │ │
│ │                      1099  22-22129236-C-T   22  22129236  rs5995548  C   T  None  0.271429  │ │
│ │                      -0.0305  0.0294  0.300000                                               │ │
│ │                      1100  22-22129237-G-T   22  22129237  rs5995549  T   G  None  0.271429  │ │
│ │                      -0.0305  0.0294  0.300000                                               │ │
│ │                      1101  22-22129816-C-T   22  22129816  rs5756977  C   T  None  0.029524  │ │
│ │                      -0.1744  0.0927  0.060000                                               │ │
│ │                      1102  22-22129955-A-C   22  22129955  rs4820327  A   C  None  0.250476  │ │
│ │                      -0.0513  0.0312  0.100000                                               │ │
│ │                                                                                              │ │
│ │                      [1103 rows x 11 columns],                                               │ │
│ │                      │   'lead_snp': '22-21630090-A-G',                                      │ │
│ │                      │   'lead_snps':                 SNPID  CHR         BP        rsID EA   │ │
│ │                      NEA  EAF       MAF    BETA      SE              P                       │ │
│ │                      0      6-32037490-C-T    6   32037490    rs431204  T   C  NaN  0.089524 │ │
│ │                      1.0006  0.0465  6.700000e-103                                           │ │
│ │                      1      6-31973120-A-G    6   31973120    rs389884  G   A  NaN  0.072381 │ │
│ │                      0.9282  0.0432  2.926000e-102                                           │ │
│ │                      2      6-31910656-A-G    6   31910656    rs519417  A   G  NaN  0.071429 │ │
│ │                      0.9203  0.0432  6.970000e-101                                           │ │
│ │                      3      6-32112414-C-G    6   32112414   rs1269852  C   G  NaN  0.073333 │ │
│ │                      0.9282  0.0435  6.990000e-101                                           │ │
│ │                      4      6-31842835-C-T    6   31842835   rs9267574  T   C  NaN  0.073333 │ │
│ │                      0.9203  0.0432  1.441000e-100                                           │ │
│ │                      ..                ...  ...        ...         ... ..  ..  ...       ... │ │
│ │                      ...     ...            ...                                              │ │
│ │                      178    6-35066077-A-G    6   35066077    rs820077  A   G  NaN  0.187619 │ │
│ │                      -0.1906  0.0345   3.299000e-08                                          │ │
│ │                      179  12-111535554-A-G   12  111535554    rs597808  G   A  NaN  0.464762 │ │
│ │                      -0.1625  0.0295   3.507000e-08                                          │ │
│ │                      180     11-686714-A-G   11     686714  rs10794330  A   G  NaN  0.460952 │ │
│ │                      0.1570  0.0286   4.039000e-08                                           │ │
│ │                      181   10-62065802-C-T   10   62065802   rs7899626  T   C  NaN  0.355238 │ │
│ │                      0.1823  0.0333   4.186000e-08                                           │ │
│ │                      182    6-35013168-A-G    6   35013168  rs57844307  A   G  NaN  0.080952 │ │
│ │                      0.2776  0.0509   4.974000e-08                                           │ │
│ │                                                                                              │ │
│ │                      [183 rows x 11 columns],                                                │ │
│ │                      │   'methods': [<FinemapMethod.all: 'all'>],                            │ │
│ │                      │   'var_prior': 0.2,                                                   │ │
│ │                      │   'conditional': False,                                               │ │
│ │                      │   'prior_file': None,                                                 │ │
│ │                      │   'sample_size': 1000,                                                │ │
│ │                      │   'ldref':                                                            │ │
│ │                      '/media/dubai/home/liudr/.pip/CAUSALdb-finemapping-pip/ld/ld/vcf/ALL.v… │ │
│ │                      │   'cond_snps_wind_kb': 10000,                                         │ │
│ │                      │   ... +4                                                              │ │
│ │                      }                                                                       │ │
│ │        kwargs_list = [                                                                       │ │
│ │                      │   {                                                                   │ │
│ │                      │   │   'sumstats':                SNPID  CHR        BP        rsID EA  │ │
│ │                      NEA   EAF       MAF      BETA        SE         P                       │ │
│ │                      0     1-14402822-A-G    1  14402822   rs6696419  A   G  None  0.129524  │ │
│ │                      -0.010100  0.067600  0.881800                                           │ │
│ │                      1     1-14403233-A-G    1  14403233   rs6696819  A   G  None  0.033465  │ │
│ │                      -0.000654  0.073726  0.992917                                           │ │
│ │                      2     1-14404229-C-T    1  14404229  rs12031559  T   C  None  0.165714  │ │
│ │                      0.039200  0.042300  0.353900                                            │ │
│ │                      3     1-14404304-A-G    1  14404304  rs78025940  A   G  None  0.022857  │ │
│ │                      0.039200  0.105500  0.710000                                            │ │
│ │                      4     1-14404372-A-G    1  14404372  rs12116695  G   A  None  0.133333  │ │
│ │                      -0.020200  0.055500  0.715900                                           │ │
│ │                      ...              ...  ...       ...         ... ..  ..   ...       ...  │ │
│ │                      ...       ...       ...                                                 │ │
│ │                      3071  1-15400852-A-G    1  15400852  rs12561771  G   A  None  0.144762  │ │
│ │                      -0.040800  0.045100  0.365300                                           │ │
│ │                      3072  1-15401521-C-T    1  15401521  rs72643655  C   T  None  0.017375  │ │
│ │                      -0.122366  0.087883  0.163809                                           │ │
│ │                      3073  1-15401643-G-T    1  15401643  rs12562864  T   G  None  0.252381  │ │
│ │                      -0.020200  0.028500  0.478200                                           │ │
│ │                      3074  1-15401793-C-T    1  15401793   rs2473344  C   T  None  0.266667  │ │
│ │                      0.010100  0.027900  0.718400                                            │ │
│ │                      3075  1-15402512-A-G    1  15402512   rs6429738  A   G  None  0.127619  │ │
│ │                      -0.020200  0.044200  0.647900                                           │ │
│ │                                                                                              │ │
│ │                      [3076 rows x 11 columns],                                               │ │
│ │                      │   │   'lead_snp': '1-14902605-G-T',                                   │ │
│ │                      │   │   'lead_snps':                 SNPID  CHR         BP        rsID  │ │
│ │                      EA NEA  EAF       MAF    BETA      SE              P                    │ │
│ │                      0      6-32037490-C-T    6   32037490    rs431204  T   C  NaN  0.089524 │ │
│ │                      1.0006  0.0465  6.700000e-103                                           │ │
│ │                      1      6-31973120-A-G    6   31973120    rs389884  G   A  NaN  0.072381 │ │
│ │                      0.9282  0.0432  2.926000e-102                                           │ │
│ │                      2      6-31910656-A-G    6   31910656    rs519417  A   G  NaN  0.071429 │ │
│ │                      0.9203  0.0432  6.970000e-101                                           │ │
│ │                      3      6-32112414-C-G    6   32112414   rs1269852  C   G  NaN  0.073333 │ │
│ │                      0.9282  0.0435  6.990000e-101                                           │ │
│ │                      4      6-31842835-C-T    6   31842835   rs9267574  T   C  NaN  0.073333 │ │
│ │                      0.9203  0.0432  1.441000e-100                                           │ │
│ │                      ..                ...  ...        ...         ... ..  ..  ...       ... │ │
│ │                      ...     ...            ...                                              │ │
│ │                      178    6-35066077-A-G    6   35066077    rs820077  A   G  NaN  0.187619 │ │
│ │                      -0.1906  0.0345   3.299000e-08                                          │ │
│ │                      179  12-111535554-A-G   12  111535554    rs597808  G   A  NaN  0.464762 │ │
│ │                      -0.1625  0.0295   3.507000e-08                                          │ │
│ │                      180     11-686714-A-G   11     686714  rs10794330  A   G  NaN  0.460952 │ │
│ │                      0.1570  0.0286   4.039000e-08                                           │ │
│ │                      181   10-62065802-C-T   10   62065802   rs7899626  T   C  NaN  0.355238 │ │
│ │                      0.1823  0.0333   4.186000e-08                                           │ │
│ │                      182    6-35013168-A-G    6   35013168  rs57844307  A   G  NaN  0.080952 │ │
│ │                      0.2776  0.0509   4.974000e-08                                           │ │
│ │                                                                                              │ │
│ │                      [183 rows x 11 columns],                                                │ │
│ │                      │   │   'methods': [<FinemapMethod.all: 'all'>],                        │ │
│ │                      │   │   'var_prior': 0.2,                                               │ │
│ │                      │   │   'conditional': False,                                           │ │
│ │                      │   │   'prior_file': None,                                             │ │
│ │                      │   │   'sample_size': 1000,                                            │ │
│ │                      │   │   'ldref':                                                        │ │
│ │                      '/media/dubai/home/liudr/.pip/CAUSALdb-finemapping-pip/ld/ld/vcf/ALL.v… │ │
│ │                      │   │   'cond_snps_wind_kb': 10000,                                     │ │
│ │                      │   │   ... +4                                                          │ │
│ │                      │   },                                                                  │ │
│ │                      │   {                                                                   │ │
│ │                      │   │   'sumstats':                 SNPID  CHR         BP        rsID   │ │
│ │                      EA NEA   EAF       MAF    BETA      SE        P                         │ │
│ │                      0     1-113261601-C-T    1  113261601    rs773611  C   T  None          │ │
│ │                      0.161905 -0.0198  0.0418  0.63570                                       │ │
│ │                      1     1-113262665-C-T    1  113262665  rs12138412  C   T  None          │ │
│ │                      0.454286 -0.0305  0.0326  0.35010                                       │ │
│ │                      2     1-113267461-A-G    1  113267461   rs7552539  G   A  None          │ │
│ │                      0.113333  0.0100  0.0369  0.78750                                       │ │
│ │                      3     1-113267767-C-T    1  113267767  rs11811051  C   T  None          │ │
│ │                      0.117143  0.0100  0.0315  0.75190                                       │ │
│ │                      4     1-113268309-C-T    1  113268309  rs12725447  T   C  None          │ │
│ │                      0.278095 -0.0408  0.0325  0.20870                                       │ │
│ │                      ...               ...  ...        ...         ... ..  ..   ...          │ │
│ │                      ...     ...     ...      ...                                            │ │
│ │                      1582  1-114257179-A-T    1  114257179  rs36004890  T   A  None          │ │
│ │                      0.056190  0.0100  0.0480  0.83590                                       │ │
│ │                      1583  1-114257248-A-G    1  114257248  rs12146102  G   A  None          │ │
│ │                      0.095238 -0.0202  0.0469  0.66700                                       │ │
│ │                      1584  1-114257485-C-T    1  114257485    rs382092  C   T  None          │ │
│ │                      0.359048  0.0513  0.0309  0.09644                                       │ │
│ │                      1585  1-114260903-G-T    1  114260903   rs6537821  T   G  None          │ │
│ │                      0.241905  0.0677  0.0351  0.05364                                       │ │
│ │                      1586  1-114261127-C-T    1  114261127  rs12562994  C   T  None          │ │
│ │                      0.130476 -0.0101  0.0903  0.91130                                       │ │
│ │                                                                                              │ │
│ │                      [1587 rows x 11 columns],                                               │ │
│ │                      │   │   'lead_snp': '1-113761186-A-C',                                  │ │
│ │                      │   │   'lead_snps':                 SNPID  CHR         BP        rsID  │ │
│ │                      EA NEA  EAF       MAF    BETA      SE              P                    │ │
│ │                      0      6-32037490-C-T    6   32037490    rs431204  T   C  NaN  0.089524 │ │
│ │                      1.0006  0.0465  6.700000e-103                                           │ │
│ │                      1      6-31973120-A-G    6   31973120    rs389884  G   A  NaN  0.072381 │ │
│ │                      0.9282  0.0432  2.926000e-102                                           │ │
│ │                      2      6-31910656-A-G    6   31910656    rs519417  A   G  NaN  0.071429 │ │
│ │                      0.9203  0.0432  6.970000e-101                                           │ │
│ │                      3      6-32112414-C-G    6   32112414   rs1269852  C   G  NaN  0.073333 │ │
│ │                      0.9282  0.0435  6.990000e-101                                           │ │
│ │                      4      6-31842835-C-T    6   31842835   rs9267574  T   C  NaN  0.073333 │ │
│ │                      0.9203  0.0432  1.441000e-100                                           │ │
│ │                      ..                ...  ...        ...         ... ..  ..  ...       ... │ │
│ │                      ...     ...            ...                                              │ │
│ │                      178    6-35066077-A-G    6   35066077    rs820077  A   G  NaN  0.187619 │ │
│ │                      -0.1906  0.0345   3.299000e-08                                          │ │
│ │                      179  12-111535554-A-G   12  111535554    rs597808  G   A  NaN  0.464762 │ │
│ │                      -0.1625  0.0295   3.507000e-08                                          │ │
│ │                      180     11-686714-A-G   11     686714  rs10794330  A   G  NaN  0.460952 │ │
│ │                      0.1570  0.0286   4.039000e-08                                           │ │
│ │                      181   10-62065802-C-T   10   62065802   rs7899626  T   C  NaN  0.355238 │ │
│ │                      0.1823  0.0333   4.186000e-08                                           │ │
│ │                      182    6-35013168-A-G    6   35013168  rs57844307  A   G  NaN  0.080952 │ │
│ │                      0.2776  0.0509   4.974000e-08                                           │ │
│ │                                                                                              │ │
│ │                      [183 rows x 11 columns],                                                │ │
│ │                      │   │   'methods': [<FinemapMethod.all: 'all'>],                        │ │
│ │                      │   │   'var_prior': 0.2,                                               │ │
│ │                      │   │   'conditional': False,                                           │ │
│ │                      │   │   'prior_file': None,                                             │ │
│ │                      │   │   'sample_size': 1000,                                            │ │
│ │                      │   │   'ldref':                                                        │ │
│ │                      '/media/dubai/home/liudr/.pip/CAUSALdb-finemapping-pip/ld/ld/vcf/ALL.v… │ │
│ │                      │   │   'cond_snps_wind_kb': 10000,                                     │ │
│ │                      │   │   ... +4                                                          │ │
│ │                      │   },                                                                  │ │
│ │                      │   {                                                                   │ │
│ │                      │   │   'sumstats':                 SNPID  CHR         BP        rsID   │ │
│ │                      EA NEA   EAF       MAF    BETA      SE        P                         │ │
│ │                      0     1-113334961-C-G    1  113334961  rs12732601  C   G  None          │ │
│ │                      0.120952 -0.0726  0.0479  0.13000                                       │ │
│ │                      1     1-113335324-A-T    1  113335324   rs4839313  A   T  None          │ │
│ │                      0.249524  0.0296  0.0364  0.41700                                       │ │
│ │                      2     1-113335689-C-T    1  113335689   rs2153894  T   C  None          │ │
│ │                      0.120952 -0.0726  0.0479  0.12960                                       │ │
│ │                      3     1-113335699-A-C    1  113335699  rs35475616  A   C  None          │ │
│ │                      0.190476  0.0198  0.0323  0.53930                                       │ │
│ │                      4     1-113335997-A-G    1  113335997  rs12049298  G   A  None          │ │
│ │                      0.120952 -0.0726  0.0479  0.12960                                       │ │
│ │                      ...               ...  ...        ...         ... ..  ..   ...          │ │
│ │                      ...     ...     ...      ...                                            │ │
│ │                      1572  1-114327516-A-C    1  114327516    rs738497  C   A  None          │ │
│ │                      0.387619  0.0101  0.0296  0.73420                                       │ │
│ │                      1573  1-114327685-C-G    1  114327685  rs11578062  C   G  None          │ │
│ │                      0.300952  0.0488  0.0295  0.09851                                       │ │
│ │                      1574  1-114332737-A-G    1  114332737    rs570419  A   G  None          │ │
│ │                      0.190476 -0.0202  0.0355  0.56930                                       │ │
│ │                      1575  1-114334762-A-G    1  114334762    rs582727  A   G  None          │ │
│ │                      0.364762  0.0100  0.0613  0.87110                                       │ │
│ │                      1576  1-114334813-A-G    1  114334813   rs4446967  A   G  None          │ │
│ │                      0.201905  0.0488  0.0374  0.19230                                       │ │
│ │                                             
EmptyDataError: No columns to parse from file

@Jianhua-Wang
Copy link
Owner

This may happen when no SNPs remain after merging the summary statistics with the LD reference, especially in less dense loci. Feel free to send me the input files, and I’ll take a look to see what’s going on.

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