Skip to content

Commit 4b1e958

Browse files
Mike LeeMike Lee
authored andcommitted
other location to adjust for gtdb cert failure (in my currently grossly redundant code)
1 parent 4c356c6 commit 4b1e958

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

bin/gtt-check-or-setup-GTDB-files

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22

33
"""
4-
This is a helper program of GToTree (https://github.com/AstrobioMike/GToTree/wiki)
4+
This is a helper program of GToTree (https://github.com/AstrobioMike/GToTree/wiki)
55
for setting up reference files for the glorious Genome Taxonomy Database (gtdb.ecogenomic.org/).
66
77
For examples, please visit the GToTree wiki here: https://github.com/AstrobioMike/GToTree/wiki/example-usage
@@ -13,6 +13,12 @@ import urllib.request
1313
import pandas as pd
1414
import textwrap
1515
import argparse
16+
import ssl
17+
###########
18+
# temp fix for certificate failure: https://github.com/AstrobioMike/GToTree/issues/107
19+
ssl._create_default_https_context = ssl._create_unverified_context
20+
###########
21+
1622

1723
parser = argparse.ArgumentParser(description="This is a helper program to facilitate setting up the reference files for the \
1824
glorious Genome Taxonomy Database (gtdb.ecogenomic.org). It's really meant for internal \
@@ -50,7 +56,7 @@ def color_text(text, color='green'):
5056

5157

5258
def wprint(text):
53-
print(textwrap.fill(text, width=80, initial_indent=" ",
59+
print(textwrap.fill(text, width=80, initial_indent=" ",
5460
subsequent_indent=" ", break_on_hyphens=False))
5561

5662

@@ -155,7 +161,7 @@ def check_and_or_get_gtdb_files(GTDB_dir):
155161
else:
156162
wprint(color_text("Downloading and parsing archaeal and bacterial metadata tables from GTDB (only needs to be done once)...", "yellow"))
157163
print("")
158-
164+
159165
gen_gtdb_tab(GTDB_dir)
160166

161167

0 commit comments

Comments
 (0)