Skip to content

Instantly share code, notes, and snippets.

@ionox0
Last active January 27, 2021 19:23
Show Gist options
  • Save ionox0/f503a388e8b9c678ffea8c794dd3c00e to your computer and use it in GitHub Desktop.
Save ionox0/f503a388e8b9c678ffea8c794dd3c00e to your computer and use it in GitHub Desktop.
import_access_reference_files.py
import requests
gene_list = {
'path': '/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/juber-hg19-gene-list.bed',
'file_type': 'bed',
}
hotspots = {
'path': '/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/hotspot-list-union-v1-v2_with_TERT.txt',
'file_type': 'txt',
}
dummy_samplesheet = {
'path': '/juno/work/access/production/resources/tools/voyager_resources/SampleSheet.csv',
'file_type': 'txt'
}
FP_config_file = {
'path': '/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/MSK-ACCESS-v1_0-TilingaAndFpSNPs.txt',
'file_type': 'txt',
}
pool_a_bed_file = {
'path': '/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/MSK-ACCESS-v1_0-probe-A.sorted.bed',
'file_type': 'bed',
}
pool_b_bed_file = {
'path': '/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/MSK-ACCESS-v1_0-probe-B.sorted.bed',
'file_type': 'bed',
}
A_on_target_positions = {
'path': '/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/MSK-ACCESS-v1_0-A-on-target-positions.txt',
'file_type': 'txt',
}
B_on_target_positions = {
'path': '/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/MSK-ACCESS-v1_0-B-on-target-positions.txt',
'file_type': 'txt',
}
bqsr__knownSites_dbSNP = {
'path': '/juno/work/access/production/resources/dbSNP/versions/b37/dbsnp_137.b37.vcf',
'file_type': 'vcf',
}
bqsr__knownSites_millis = {
'path': '/juno/work/access/production/resources/mills-and-1000g/versions/b37/Mills_and_1000G_gold_standard.indels.b37.vcf',
'file_type': 'vcf',
}
noise__good_positions_A = {
'path': '/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/MSK-ACCESS-v1_0-A-good-positions.txt',
'file_type': 'txt',
}
pool_a_bed_file_exonlevel = {
'path': '/juno/work/access/production/resources/msk-access/v1.0/regions_of_interest/versions/v1.0/MSK-ACCESS-v1_0_panelA_canonicaltargets.bed',
'file_type': 'bed',
}
# Note: make sure jar and yaml are valid file types first (or just change these to txt)
bioinfo_utils = {
'path': '/juno/work/access/production/resources/tools/voyager_resources/BioinfoUtils-1.0.2.jar',
'file_type': 'txt',
}
inputs_yaml = {
'path': '/juno/work/access/production/resources/tools/voyager_resources/inputs_group_0.yaml',
'file_type': 'txt',
}
all_access_reference_paths = [
gene_list,
hotspots,
bioinfo_utils,
inputs_yaml,
dummy_samplesheet,
FP_config_file,
pool_a_bed_file,
pool_b_bed_file,
A_on_target_positions,
B_on_target_positions,
bqsr__knownSites_dbSNP,
bqsr__knownSites_millis,
noise__good_positions_A,
pool_a_bed_file_exonlevel,
]
port = '5001'
access_file_group_id = '5a921794-757c-444f-8e36-f4cc9a558177'
url = 'http://voyager.mskcc.org:{}/v0/fs/files/'.format(port)
for p in all_access_reference_paths:
data = {
"metadata": json.dumps({}),
"path": p['path'],
"file_group": access_file_group_id,
"file_type": p['file_type']
}
resp = requests.post(url, data = data)
print(resp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment