Skip to content

Commit 4a39219

Browse files
author
Will Trimble
committed
Merge branch 'master' into mgrmaster
2 parents 872c728 + 25f226a commit 4a39219

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

mglib/mglib.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ def post_file(url, keyname, filename, data={}, auth=None, debug=False):
212212
finally:
213213
# sys.exit(1)
214214
return None
215+
except OSError as error:
216+
sys.stderr.write("ERROR with post_file\n")
217+
sys.stderr.write("ERROR (%s): %s\n" %(error.code, error.read()))
215218
if not res:
216219
sys.stderr.write("ERROR: no results returned for %s\n"% (filename))
217220
# sys.exit(1)

scripts/mg-display-statistics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def main(args):
8383
token = get_auth_token(opts)
8484

8585
# build call url
86-
url = opts.url+'/metagenome/'+opts.id+'?verbosity=stats'
86+
url = opts.url+'/metagenome/'+opts.id+'?verbosity=stats&public=1'
8787

8888
# retrieve / output data
8989
result = obj_from_url(url, auth=token)

tests/test_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,21 @@ def test_matrix_04():
8181
o.write(str(obj))
8282

8383
def test_large_01():
84-
URI = API_URL + '/matrix/organism?group_level=phylum&source=RDP&hit_type=single&result_type=abundance&evalue=1&identity=60&length=15&taxid=0&id=mgm4510219.3'
84+
URI = API_URL + '/matrix/organism?group_level=phylum&source=RDP&hit_type=single&result_type=abundance&evalue=1&identity=60&length=15&taxid=0&id=mgm4440026.3'
8585
obj = obj_from_url(URI)
8686
o = open("5.txt", "w")
8787
o.write(str(obj))
8888
os.remove("5.txt")
8989

9090
def test_large_02():
91-
URI = API_URL + '/matrix/organism?group_level=phylum&source=RefSeq&hit_type=single&result_type=abundance&evalue=1&identity=60&length=15&taxid=0&id=mgm4510219.3'
91+
URI = API_URL + '/matrix/organism?group_level=phylum&source=RefSeq&hit_type=single&result_type=abundance&evalue=1&identity=60&length=15&taxid=0&id=mgm4440026.3'
9292
obj = obj_from_url(URI)
9393
o = open("6.txt", "w")
9494
o.write(str(obj))
9595
os.remove("6.txt")
9696

9797
def test_large_03():
98-
URI = API_URL + '/matrix/organism?group_level=phylum&source=SEED&hit_type=single&result_type=abundance&evalue=1&identity=60&length=15&taxid=0&id=mgm4510219.3'
98+
URI = API_URL + '/matrix/organism?group_level=phylum&source=SEED&hit_type=single&result_type=abundance&evalue=1&identity=60&length=15&taxid=0&id=mgm4440026.3'
9999
obj = obj_from_url(URI)
100100
o = open("7.txt", "w")
101101
o.write(str(obj))

0 commit comments

Comments
 (0)