WeiliWw / VirHostMatcher-Net

VirHostMatcher-Net: A network-based computational tool for predicting virus-host interactions.
18 stars 1 forks source link

Key Error in CRISPR prediction #23

Closed miczuppi closed 2 years ago

miczuppi commented 2 years ago

Hi, I have been running VirHostMatcher-net, but it stops when predicting CRISPR and gives me this error

    predictor = HostPredictor(query_virus_dir, args.short_contig, intermediate_dir, genome_list, args.num_Threads)
  File "/mnt/projects/miniconda2/envs/virhostmatchernet/VirHostMatcher-Net/predictor.py", line 48, in __init__
    self.crispr = src.crispr.uniGenus(self._crispr_signals, self._virus_index, self._host_index)
  File "/mnt/projects/miniconda2/envs/virhostmatchernet/VirHostMatcher-Net/src/crispr.py", line 103, in uniGenus
    df_full = df_full.loc[virus_index][host_index]
  File "/mnt/projects/miniconda2/envs/virhostmatchernet/lib/python3.9/site-packages/pandas/core/frame.py", line 3464, in __getitem__
    indexer = self.loc._get_listlike_indexer(key, axis=1)[1]
  File "/mnt/projects/miniconda2/envs/virhostmatchernet/lib/python3.9/site-packages/pandas/core/indexing.py", line 1314, in _get_listlike_indexer
    self._validate_read_indexer(keyarr, indexer, axis)
  File "/mnt/projects/miniconda2/envs/virhostmatchernet/lib/python3.9/site-packages/pandas/core/indexing.py", line 1374, in _validate_read_indexer
    raise KeyError(f"None of [{key}] are in the [{axis_name}]")
KeyError: "None of [Index(['GCF_900200065.1', 'GCF_900200375.1', 'GCF_900200465.1',\n       'GCF_900200855.1', 'GCF_900200885.1', 'GCF_900200895.1',\n       'GCF_900201095.1', 'GCF_900201595.1', 'GCF_900201725.1',\n       'GCF_900201745.1',\n       ...\n       'GCF_000338595.1', 'GCF_000338615.1', 'GCF_000338635.1',\n       'GCF_000340605.1', 'GCF_000340645.1', 'GCF_000340685.1',\n       'GCF_000340705.1', 'GCF_000340725.1', 'GCF_000163775.2',\n       'GCF_002951835.1'],\n      dtype='object', length=9097)] are in the [columns]"

Do you know what could be causing it?

Thank you for your time, Michele Zuppi

miczuppi commented 2 years ago

Hi, I solved it. Apparently my queries needed the extension .fasta