This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2006-2022 Mark Diekhans | |
# Modified by Lon Blauvelt 2023 | |
"""Operations for accessing mysql""" | |
import warnings | |
import time | |
import MySQLdb # mysqlclient is required for python 3 | |
from MySQLdb.cursors import DictCursor # noqa: F401 | |
from MySQLdb.cursors import Cursor | |
import MySQLdb.converters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PicSureClient, PicSureHpdsLib | |
# Based on: https://github.com/hms-dbmi/pic-sure-python-client | |
# and: https://terra.biodatacatalyst.nhlbi.nih.gov/#workspaces/biodata-catalyst/BioData%20Catalyst%20PIC-SURE%20API%20Python%20examples/notebooks | |
# | |
# +--------------------------------------+------------------------------------------------------+ | |
# | Resource UUID | Resource Name | | |
# +--------------------------------------+------------------------------------------------------+ | |
# | 02e23f52-f354-4e8b-992c-d37c8b9ba140 | | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import logging | |
import os | |
import requests | |
import uuid | |
import sevenbridges as sbg | |
log = logging.getLogger(__name__) | |
os.environ['SB_API_ENDPOINT'] = 'https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from hca import HCAConfig | |
from hca.dss import DSSClient | |
hca_config = HCAConfig() | |
hca_config['DSSClient'].swagger_url = f'https://dss.dev.data.humancellatlas.org/v1/swagger.json' | |
dss = DSSClient(config=hca_config) | |
for i in dss.post_search.iterate(replica='aws', es_query={}): | |
uuid, version = i['bundle_fqid'].split('.', 1) | |
try: | |
s = f'Bundle: {uuid}.{version}\n' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import time | |
import os | |
import boto3 | |
from hca import HCAConfig | |
from hca.dss import DSSClient | |
""" |