Skip to content

Instantly share code, notes, and snippets.

View sdhutchins's full-sized avatar
😳
Learning about gene regulatory network inference.

Shaurita D. Hutchins sdhutchins

😳
Learning about gene regulatory network inference.
View GitHub Profile
@sdhutchins
sdhutchins / fetch_protvar_json.py
Created December 10, 2025 19:01
Fetch the ProtVar API & Return JSON
"""
Fetch ProtVar API JSON response for a variant.
Edit HGVS or RS_ID below and set USE_HGVS or USE_RSID to True.
ProtVar API docs:
- https://www.ebi.ac.uk/ProtVar/api/swagger-ui/index.html
- https://www.ebi.ac.uk/ProtVar/api/docs
"""
import json
import re
import urllib.request
@sdhutchins
sdhutchins / extract_docs_urls.py
Created November 5, 2025 23:05
Convert Mkdocs Yaml Nav Section to Urls List
import yaml
import requests
import os
import re
YAML_URL = "https://raw.githubusercontent.com/uabrc/uabrc.github.io/refs/heads/main/mkdocs.yml"
BASE_URL = "https://docs.rc.uab.edu/"
PREFIX = "uab_docs_urls"
def extract_paths(nav):
@sdhutchins
sdhutchins / all_multiselect.py
Last active July 18, 2023 20:38
Create All option for multiselect
import streamlit as st
import pandas as pd
def select_options():
"""Select options based on the user's selection and update the session state.
This function is triggered when the selection of options changes. It checks if "All" is selected and updates
the session state accordingly. If "All" is selected, it sets the selected options to all options except "All",
and updates the maximum number of selections. If "All" is not selected, it updates the maximum number of selections
based on the available options.
@sdhutchins
sdhutchins / install.R
Last active September 3, 2021 01:52
R packages to install first
install.packages(c('devtools', 'tidyverse', 'shiny', 'DT', 'rmarkdown', 'testthat', 'roxygen2', 'BiocManager', 'usethis', 'pkgdown', 'workflowr', 'ggpubr', 'ggthemes', 'sciplot', 'swirl', 'styler', 'ggsci', 'blogdown', 'bookdown', 'sinew', 'available'))
devtools::install_github('Mikata-Project/ggthemr')
devtools::install_github("max-alletsee/rstudio-themes")
@sdhutchins
sdhutchins / pevaluate.vba
Created September 8, 2018 00:06
Evaluate 2 pvalues and update data with symbols
Function pevaluate(p1 As Integer, p2 As Integer, data As String)
If p1 <= 0.05 And p2 <= 0.05 Then
pevaluate = data & "*†"
ElseIf p1 <= 0.05 Then
pevaluate = data & "*"
ElseIf p2 <= 0.05 Then
pevaluate = data & "†"
End If
End Function

Keybase proof

I hereby claim:

  • I am sdhutchins on github.
  • I am sdhutchins (https://keybase.io/sdhutchins) on keybase.
  • I have a public key ASDe2oDMwMTPl8xU2hhtEjDmNr6JcRO6i2z-OfIlmt8llwo

To claim this, I am signing this object:

@sdhutchins
sdhutchins / server.R
Created July 20, 2017 15:49 — forked from sidderb/server.R
A Shiny/R app to display the Illumina human body map dataset. I have not included the expression data due to it's size (19Gb) but this should work with any RNA-seq data set analysed with a TopHat->Cufflinks->CuffDiff pipeline.
library(shiny)
library(deSolve)
library(cummeRbund)
# load cuffDiff data, must be in top dir and called cuffData.db:
cuff = readCufflinks()
shinyServer(function(input,output) {
getData = reactive(function() {
@sdhutchins
sdhutchins / codestyle.py
Created June 8, 2017 23:56
Check Code Style
import pycodestyle
import os
def checkstyle(rootpath):
r = rootpath
for root, dirs, files in os.walk(r, topdown=True):
for f in files:
if f.endswith('.py'):
fchecker = pycodestyle.Checker(os.path.join(root, f),
@sdhutchins
sdhutchins / delete_directories.py
Last active June 2, 2017 23:28
Delete desired directories from root directories
"""Random Utilities"""
import shutil
import os
import subprocess
class StyleFix:
"""Perform automatic pep8 for code in a top down fashion.
import yaml
import json
import pandas as pd
df = pd.DataFrame({'one': [1.0, 2.1, 3.2], 'two': [4.3, 5.4, 6.5]})
with open('df.yml', 'w') as file:
yaml.dump({'result': json.loads(df.to_json(orient='records'))}, file, default_flow_style=False)