Skip to content

Instantly share code, notes, and snippets.

@ionox0
Last active January 4, 2021 20:57
Show Gist options
  • Save ionox0/d1790818ff24125e06baa074d8e37228 to your computer and use it in GitHub Desktop.
Save ionox0/d1790818ff24125e06baa074d8e37228 to your computer and use it in GitHub Desktop.
import_access_cnv_and_msi_resources.py
import json
import requests
paths = [
"/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/curated_normal_manifest.txt",
"/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/ACCESS_targets_coverage.bed",
"/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/ACCESS_targets_coverage.txt",
"/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/microsatellites.list",
"/juno/work/access/production/resources/admie/versions/v1.0/ADMIE.joblib"
]
port = "6991"
access_file_group_id = "0221fdb7-6cf8-41d7-9432-8cbbccfd08fe"
url = "http://localhost:{}/v0/fs/files/".format(port)
for path in paths:
data = {
"metadata": json.dumps({}),
"path": path,
"file_group": access_file_group_id,
"file_type": "txt"
}
resp = requests.post(url, data = data, auth = ('asdf', 'asdf'))
print(resp.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment