Skip to content

Commit 2f4cf9b

Browse files
authored
Merge pull request #10 from cgmeyer/develop
updated examples
2 parents dcca107 + eb0681b commit 2f4cf9b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

expansion/expansion.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,7 +1359,9 @@ def get_guids_for_filenames(self, file_names,api):
13591359
def get_record_for_url(self, url, api):
13601360
""" Returns the indexd record for a file's storage location URL ('urls' in indexd)
13611361
Example:
1362-
exp.get_record_for_url(url=https://icgc.bionimbus.org/index/index/?url=s3://pcawg-tcga-sarc-us/2720a2b8-3f4e-5b6e-9f74-1067a068462a, api=api)
1362+
api='https://icgc.bionimbus.org/'
1363+
url='s3://pcawg-tcga-sarc-us/2720a2b8-3f4e-5b6e-9f74-1067a068462a'
1364+
exp.get_record_for_url(url=url,api=api)
13631365
"""
13641366
indexd_endpoint = "{}/index/index/".format(api)
13651367
indexd_query = "{}?url={}".format(indexd_endpoint,url)
@@ -1369,7 +1371,12 @@ def get_record_for_url(self, url, api):
13691371
return index_records
13701372

13711373
def get_guid_for_url(self, url, api):
1372-
"""Return the GUID for a file's URL in indexd"""
1374+
"""Return the GUID for a file's URL in indexd
1375+
Example:
1376+
api='https://icgc.bionimbus.org/'
1377+
url='s3://pcawg-tcga-sarc-us/2720a2b8-3f4e-5b6e-9f74-1067a068462a'
1378+
exp.get_guid_for_url(url=url,api=api)
1379+
"""
13731380
index_records = self.get_record_for_url(url=url,api=api)
13741381
if len(index_records) == 1:
13751382
guid = index_records[0]['did']

0 commit comments

Comments
 (0)