Skip to content

Instantly share code, notes, and snippets.

View Avantol13's full-sized avatar
🎹

Alexander VanTol Avantol13

🎹
  • CTDS - University of Chicago
View GitHub Profile
components:
schemas:
AggregatedResponses:
properties:
commonsA:
type: object
$ref: '#/components/schemas/AggregatedResponse'
commonsB:
type: object
$ref: '#/components/schemas/AggregatedResponse'
"""
Script to get initial metadata for BDCat studies from Gen3 Graph and by scraping dbGaP.
Available tags:
Program
- TOPMed
- COVID 19
Study Registration
"""
Populate ACCESS User Management System with Datasets
Also generate commands for linking Gen3 Google Groups based on mapping file provided
* You need gen3 package so `pip install gen3`
* Download TSV of current production ACCESS list after logging in as Super Admin
* `generate_ACCESS_info` in `generate.py` to output a new `ACCESS_info.txt`
* A list of new/updated studies in the format like:
* phs_consent, authid, full_name
* Log into the commons, download an API key and set the filepath API_KEY_FILEPATH
import argparse
import os
import sys
import sys
import logging
import asyncio
from gen3.tools import metadata
# TODO: Maybe this script to its own repo to be distributed properly
#!/usr/bin/env python
from gimpfu import *
# can run in python console with default values with:
# pdb.python_fu_export_eps("", "test23.eps", 0, 0)
def export_eps(folder, filename, width, height):
folder = folder or "F:\\_GoogleDrive\\Other Projects\\Board Games\\Food Game\\_cards"
width = width or 699.1
{
"ga4gh_passport_v1":
[
{
"iss": "https://stsstg.nih.gov",
"sub": "Ei4sFoHQ1KO-foobar",
"iat": 1588686798,
"exp": 1588729998,
"scope": "email profile ga4gh_passport_v1 openid",
"jti": "42d1e574-4129-4ee1-8a07-fa6a8d8bffcf",
{
"ga4gh_passport_v1":
[
{
"iss": "https://stsstg.nih.gov",
"sub": "Ei4sFoHQ1KO-foobar",
"iat": 1588686798,
"exp": 1588729998,
"scope": "email profile ga4gh_passport_v1 openid",
"jti": "42d1e574-4129-4ee1-8a07-fa6a8d8bffcf",
guid md5 size acl authz urls
c519fedb-686a-4b96-b910-65355d3ea0ab f0aa6ed73a82379a6b8150a3e2b2b42c 12345678345 phs000964.c1 admin /programs/DEV gs://topmed-irc-share/test2
We can't make this file beautiful and searchable because it's too large.
guid,urls,authz,acl,md5,file_size,file_name
2e4f042b-55fd-481a-ae6c-5102357bafe4,gs://dcf-integration-test/NWD437822.txt s3://cdis-presigned-url-test/testdata,/programs/DEV/projects/test,,f0aa6ed73a82379a6b8150a3e2b2b42c,42,
c65ae178-e070-4a33-a091-bca0516b6ab3,s3://cdis-presigned-url-test/NWD680715 gs://dcf-integration-test/file.txt,/programs/DEV/projects/test,,443e7594cbe3275a152906392e433e8d,42,
b81501c5-034c-415a-9a28-989296e9e5b2,s3://cdis-presigned-url-test/testdata gs://dcf-integration-test/file.txt,/programs/DEV/projects/test,,5c4395d5062ae6235a8b8b91752a5a75,42,
5a030535-3257-4b7a-93cd-b60934e711c3,s3://cdis-presigned-url-test/testdata gs://dcf-integration-test/file.txt,/programs/DEV/projects/test,,7edd57cdc3405c9e94909e59da55405b,42,
092b8c05-c848-4397-8884-38bdb9e0b00f,s3://cdis-presigned-url-test/testdata gs://dcf-integration-test/file.txt,/programs/DEV/projects/test,,d873dcebf8c7056a2aede0e588e3b9bd,42,
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
guid submitted_sample_id biosample_id dbgap_sample_id sra_sample_id submitted_subject_id dbgap_subject_id consent_code consent_short_name sex body_site analyte_type sample_use repository dbgap_status sra_data_details study_accession study_accession_with_consent study_with_consent study_subject_id
c65ae178-e070-4a33-a091-bca0516b6ab3 NWD680715 SAMN04109058 1784155 SRS1361261 DBG00391 1360750 2 HMB-IRB-MDS female Blood DNA "[""Seq_DNA_SNP_CNV"", ""WGS""]" TOPMed_WGS_Amish Loaded "{""status"": ""public"", ""experiments"": ""1"", ""runs"": ""1"", ""bases"": ""135458977924"", ""size_Gb"": ""25"", ""experiment_type"": ""WGS"", ""platform"": ""ILLUMINA"", ""center"": ""UM-TOPMed""}" phs000956.v4.p1 phs000956.v4.p1.c2 phs000956.c2 phs000956.v4_DBG00391
2e4f042b-55fd-481a-ae6c-5102357bafe4 NWD437822 SAMN11169121 3415113 SRS4907945 BUR02263239B 2199582 2 DS-LD-IRB-COL male Peripheral Blood DNA "[""Seq_DNA_SNP_CNV"", ""WGS""]" GALAII Loaded "{""status"": ""public"", ""experiments"": ""1"", ""runs"": ""1"", ""bases"": ""