Skip to content

Instantly share code, notes, and snippets.

View reedacartwright's full-sized avatar
💭
I may be slow to respond.

Reed A. Cartwright reedacartwright

💭
I may be slow to respond.
View GitHub Profile
@reedacartwright
reedacartwright / FastExp.h
Created November 21, 2024 03:59 — forked from jrade/FastExp.h
Fast approximate exponential function
// Copyright 2021 Johan Rade ([email protected])
// Distributed under the MIT license (https://opensource.org/licenses/MIT)
#ifndef FAST_EXP_H
#define FAST_EXP_H
#include <cstdint>
#include <cstring>
@reedacartwright
reedacartwright / ecoli_rel606.gff
Last active October 4, 2024 01:42
Variant files for use with "Intro to R and RStudio for Genomics" data carpentry lesson
This file has been truncated, but you can view the full file.
##gff-version 3
#!gff-spec-version 1.21
#!processor NCBI annotwriter
#!genome-build ASM1798v1
#!genome-build-accession NCBI_Assembly:GCF_000017985.1
#!annotation-date 06/08/2024 00:48:35
#!annotation-source NCBI RefSeq GCF_000017985.1-RS_2024_06_08
##sequence-region NC_012967.1 1 4629812
##species https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=413997
NC_012967.1 RefSeq region 1 4629812 . + . ID=NC_012967.1:1..4629812;Dbxref=taxon:413997;Is_circular=true;Name=ANONYMOUS;gbkey=Src;genome=chromosome;mol_type=genomic DNA;strain=REL606
@reedacartwright
reedacartwright / mult.c
Created November 23, 2023 03:29
Full width multiplication of two 32-bit numbers.
/*
This file contains examples of how to do full-width 32-bit multiplication by dividing each
operand into 16-bit fields.
*/
typedef struct {
int low;
int high;
} int_pair_t;
@reedacartwright
reedacartwright / lesson.md
Last active October 26, 2024 23:46
NHANES Analysis

Introduction

Today we will be working with data from the National Health and Nutrition Examination Survey (NHANES).

NHANES is a program of studies designed to assess the health and nutritional status of adults and children in the United States. The survey is unique in that it combines interviews and physical examinations. NHANES is a major program of the National Center for Health Statistics (NCHS). NCHS is part of

@reedacartwright
reedacartwright / brca1-project.md
Created April 26, 2022 01:11
Instructions for analyzing BRCA1 mutations

In this exercise we are going to download human genomic data generated by the New York Genome Center (NYGC). Information about the data can be found here and details about their pipeline can be found here.

Initializing Project

We will start by setting up a git repository on the cluster to hold our project data.

$ mkdir brca1-project
$ cd brca1-project
$ git init
@reedacartwright
reedacartwright / ga-pipeline-1.md
Last active March 31, 2022 01:07
Instructions for creating a genomic analysis pipleine using Github and a reproducable directory structure

After creating your repository on Github, you need to clone it to Agave. Don't forget to use the correct github url for your repository.

$ cd ~/dc_workshop
$ git clone [email protected]:USERNAME/ga-pipeline-1.git ga-pipeline-1
$ cd ga-pipeline-1

Getting Raw Data

@reedacartwright
reedacartwright / am_class7.R
Last active January 7, 2022 02:57
Plotting Biome using RBedrock
## Today we will work on making maps with ggplot2.
# Install the latest version of rbedrock
devtools::install_github("reedacartwright/rbedrock")
# Load tidyverse and rbedrock
library(tidyverse)
library(rbedrock)
# Open World Database
@reedacartwright
reedacartwright / am_class4.R
Created November 7, 2021 04:06
Introduction to Analyzing a Minecraft World, LIA 194 - Class 4
## Today we are going to work on learning how to plot data with
## ggplot2, which is a part of tidyverse.
# Install the latest version of rbedrock
devtools::install_github("reedacartwright/rbedrock")
# Install tidyverse
install.packages("tidyverse")
# Load tidyverse and rbedrock
@reedacartwright
reedacartwright / am_class2.R
Last active October 26, 2021 02:55
Introduction to Analyzing a Minecraft World, LIA 194 - Class 2
# Introduction to Analyzing a Minecraft World
# LIA 194 - Class #2
# We will be using the development branch of the rbedrock library,
# and will use devtools to install or update it.
if (!requireNamespace("devtools", quietly = TRUE)) {
install.packages("devtools")
}
devtools::install_github("reedacartwright/rbedrock")
@reedacartwright
reedacartwright / find_wither_killer.cc
Created June 10, 2021 21:22
Source code for finding natural wither killers in bedrock edition.
#include <random>
#include <array>
#include <iostream>
using namespace std;
using mat_t = array<array<unsigned int, 32>, 32>;
uint32_t get_seed(int d, int x, int z) {
if(d == 0) {