liaoherui / StrainScan

High-resolution strain-level microbiome composition analysis tool based on reference genomes and k-mers
https://microbiomejournal.biomedcentral.com/articles/10.1186/s40168-023-01615-w
MIT License
32 stars 4 forks source link

Error in building a custom database #16

Closed sahilrishav2 closed 7 months ago

sahilrishav2 commented 7 months ago

Hi,

I am trying to build a custom database through your provided "Test_genomes" directory, but got an error. Here is the code:

(strainscan) [rishabh@localhost StrainScan]$ python StrainScan_build.py -i Test_genomes -o DB_Small /home/rishabh/StrainScan 2023-12-07 09:05:17,690 - Constructing matrix with dashing (jaccard index) 2023-12-07 09:05:17,769 - Hierarchical clustering Traceback (most recent call last): File "StrainScan_build.py", line 162, in <module> main() File "StrainScan_build.py", line 116, in main cls_file, cls_res) File "/home/rishabh/StrainScan/library/select_rep.py", line 68, in pick_rep index.append(dpi[t]) KeyError: 'GCA_005937645.1_ASM593764v1_genomic'

Any help would be appreciated.

liaoherui commented 7 months ago

Hi, thanks for using StrainScan!

I am sorry that this is a small bug due to previous updates. I have fixed it. Please try the latest version in the GitHub! Thanks!

sahilrishav2 commented 7 months ago

Hi, I am using the latest version installed through this command: `git clone https://github.com/liaoherui/StrainScan.git cd StrainScan

conda env create -f environment_candidate.yaml conda activate strainscan

chmod 755 library/jellyfish-linux chmod 755 library/dashing_s128`

Also, i installed it through other options, but still showing the same error.

sahilrishav2 commented 7 months ago

Please help me , its urgent or if you can share the updated files "StrainScan_build.py" and "select_rep.py", so, that i might be able to solve the issue

liaoherui commented 7 months ago

Hi,can you delete all previous files and re-install the tool via the GitHub install option now?I just tried it, and it worked well. If still failed, please let me know.

sahilrishav2 commented 7 months ago

Ok , i will try again

sahilrishav2 commented 7 months ago

Now, it is working. Thank you