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

ConnectionTimeout when downloading gene templates from IMGT #9

Open
GabevandenHoeven opened this issue Apr 8, 2024 · 2 comments
Open

Comments

@GabevandenHoeven
Copy link

Hi,
I tried to install IGoR first but found that after some complications on the commandline it was probably easier to use this package. Anyway to be able to do anything I need the gene templates from IMGT, but I ran into a connection timeout when using the method described in the documentation for building a new model.
I tried
pygor imgt-get-genomes -t VDJ --imgt-species Homo+sapiens --imgt-chain TRB
I also tried to use the get_IgorRefGenome_VDJ_from_IMGT('Homo+sapiens', 'TRB') function but both gave me the same connection timeout:
requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='www.imgt.org', port=80): Max retries exceeded with url: /download/GENE-DB/IMGTGENEDB-GeneList (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x000002658930A050>, 'Connection to www.imgt.org timed out. (connect timeout=None)'))

I realise that this is probably not really an error in Pygor but since these retrieve files automatically and put them in a specific directory structure, idk how I'd have to go about it if I had to do this manually. Is there a fix for this problem? What would you suggest I'd do?

Kind regards,
Gabe van den Hoeven

@GabevandenHoeven
Copy link
Author

I found the issue although to make it work for me I had to make changes to the Python source code. The first issue was that I'm assuming IMGT changed their URL protocol's from http to https for the added security. Other's I ran into as I continued debugging until it worked.

List of changes I made in pygor3 python package source code to make it work:

imgt.py:

  • changed the url's in the global dictionary imgt_params from http to https
  • changed the path directory seperator in download_gene_template from '/' to '\' since I'm working in Pycharm on Windows (Think of making it more cross-platform compatible, these things should really not be an issue in my opinion)
  • copied the mkdir command from line 143 to after line 139 (if the ref_genes_path does not exist then you should still create it)

@GabevandenHoeven
Copy link
Author

I'll leave this here as an 'Open issue' for others running into the same issues, since when I closed it the issue disappeared

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

1 participant