Skip to content

Instantly share code, notes, and snippets.

View seandavi's full-sized avatar

Sean Davis seandavi

View GitHub Profile
@seandavi
seandavi / gh_repos_by_topic.qmd
Created March 14, 2025 10:14
Create a simple html page of github repositories based on "topic"
---
title: "Github Repos for Topic"
author: "Sean Davis"
format: html
params:
gh_topic: "r01ca230551"
---
## Required packages
@seandavi
seandavi / README.md
Created October 10, 2024 03:49
embed webr/pyodide in quarto with quarto-live and live-html extension

prelim

To use the live-html (webr/pyodide) in quarto:

quarto add r-wasm/quarto-live

Template for use

# Install Bioconductor and required packages
# This command installs the BiocManager package for managing Bioconductor packages
install.packages("BiocManager")
# Use BiocManager to install specific packages for data analysis and visualization
BiocManager::install(c("GEOquery", "SummarizedExperiment", "ggplot2",
"party", "ggparty", "partykit", "randomForest"))
# Load necessary packages for modeling and visualization
library(party) # For creating classification trees
@seandavi
seandavi / README.md
Created August 16, 2024 19:35
Powerpoint from python code

Powerpoint from code

Using code for a powerpoint is a useful approach to have chatgpt and other LLMs create powerpoint slides from documents or a textual description.

Usage

pip install -r requirements.txt
@seandavi
seandavi / README.md
Last active May 31, 2024 15:46
A small tutorial/workflow for using Nextflow on GCP from the CU Anschutz campus

Nextflow on Google Cloud at CU Anschutz

Nextflow is a powerful workflow management system designed for creating scalable and reproducible scientific workflows. It enables you to write workflows in a declarative language, making it easy to define complex pipelines that can be executed on various platforms, including local machines, clusters, and cloud environments like Google Cloud.

This short tutorial is meant for informatics users who are comfortable with a command line interface. It also assumes that the user is familiar with and has run nextflow on a local computer or HPC system.

Roughly, this document will walk through:

@seandavi
seandavi / extract_cancer_incidence.sh
Created May 2, 2024 16:01
Create jsonlines of US CDC cancer incidence data release
#!/bin/bash
curl https://gis.cdc.gov/Cancer/DataVizApi/GetJSON/USCS_County | sed -e 's/<string xmlns="http:\/\/schemas.microsoft.com\/2003\/10\/Serialization\/">//g' -e 's/<\/string>//g'| jq -c '.[] | .USCS_County[]' > output.jsonl
@seandavi
seandavi / setup_wandb.md
Created March 22, 2024 02:14
Setup weights-and-biases using docker compose

Sure! Here's the converted Docker Compose YAML file with a MySQL server as a separate container and a Docker volume for storage:

version: '3'
services:
  wandb-local:
    image: wandb/local
    container_name: wandb-local
    environment:
 - HOST=https://YOUR_DNS_NAME
@seandavi
seandavi / prompt_example.txt
Created March 7, 2024 23:20
Example of prompt to automate job candidate applications with set of minimal and preferred qualifications to YAML
You are an HR specialist and are evaluating the qualifications of job applicants
for a high-performance computing (HPC) specialist position.
You have been given a set of criteria to evaluate each candidate.
The candidate materials are in the attached PDF.
For each job applicant, fill in the following YAML-format criteria document. You
may use the "comment" field to provide additional context or justification for
your evaluation.
---
# candidate name
@seandavi
seandavi / cmgd_se_to_csv.R
Created February 25, 2024 23:31
convert all CMGD SummarizedExperiments to CSV files
# convert all CMGD SummarizedExperiments to CSV files
# Should run more-or-less directly as a script
# Requires more than 128GB RAM to complete
# Generates about 200GB of files
# BiocManager::install('curatedMetagenomicData')
# BiocManager::install(c('arrow','data.table','dplyr', 'readr'))
library(curatedMetagenomicData)convert all CMGD SummarizedExperiments to CSV files
@seandavi
seandavi / gist:dd7052951a199e5ea5ce584b01c5e0f2
Created January 31, 2024 20:57
Common Fund Data Ecosystem funding from reporter
#!/bin/bash
# results in json format
# Actual data in "results" array
#
# Opportunity numbers taken from https://commonfund.nih.gov/dataecosystem/FundedResearch
curl \
-X POST \
https://api.reporter.nih.gov/v2/projects/search \
-d '{"criteria":{"opportunity_numbers": ["RFA-RM-23-003", "PA20-185", "OTA-23-004", "RFA-RM-22-007", "OTA-23-005", "RFA-RM-17-026", "RFA-RM-21-007", "RFA-RM-19-012"]}}' \
-H 'Content-Type: application/json'