murphycj / AGFusion

Python package to annotate and visualize gene fusions.

Home Page:https://www.agfusion.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build database for Ensembl 100

wenbostar opened this issue · comments

commented

I tried to build database for Ensembl 100 using the following command line.

pyensembl install --species homo_sapiens --release 100
agfusion build --dir . --species homo_sapiens --release 100 --pfam pfamA.txt.gz --server ensembldb.ensembl.org
Traceback (most recent call last):
  File "/data/user/software/anaconda3/bin/agfusion", line 5, in <module>
    cli.main()
  File "/data/user/software/anaconda3/lib/python3.7/site-packages/agfusion/cli.py", line 520, in main
    builddb(args)
  File "/data/user/software/anaconda3/lib/python3.7/site-packages/agfusion/cli.py", line 204, in builddb
    args.server
  File "/data/user/software/anaconda3/lib/python3.7/site-packages/agfusion/database.py", line 68, in __init__
    self.table = ENSEMBL_MYSQL_TABLES[self.species][self.release]
KeyError: 100

Does anyone know how to fix this problem?

Bo

I managed to get around the issue. Leaving information, hopefully, it will be useful for others

  • First download the release from pyensembl , currently it seems to support v100. See openvax/pyensembl#240
    pyensembl install --species homo_sapiens --release 100

  • Then edit file "python3.7/site-packages/agfusion/utils.py", line number 27
    From MAX_ENSEMBL_RELEASE = 92 to MAX_ENSEMBL_RELEASE = 100

  • Download the pfam file "pfamA.txt.gz" from here and unzip it with bgzip "ftp://ftp.ebi.ac.uk/pub/databases/Pfam/releases/Pfam33.1/database_files"
    bgzip -d pfamA.txt.gz

  • Build the database for agfusion
    agfusion build --dir . --species homo_sapiens --release 100 --pfam pfamA.txt

Additionally, if you see an error with MySQLdb import then install the below package
conda install -c bioconda mysqlclient

Best,

Thank you 😊

commented

@Admera2020 , it works, thanks.

commented

After modified the database.py it works for me to build Ensembl 98, hopefully, it will be useful for others:
image