Skip to content

Instantly share code, notes, and snippets.

View upendrak's full-sized avatar

Upendra Kumar Devisetty upendrak

View GitHub Profile
@znorgaard
znorgaard / SKILL.md
Created June 9, 2026 17:02
bioinformatics-python — Claude Code skill for Python bioinformatics (fgpyo, pybedlite, fgmetric). See install.sh to install into ~/.claude/skills/.
name bioinformatics-python
description Use when writing Python that handles SAM/BAM/CRAM, FASTA/FASTQ, VCF, or BED files; building test fixtures with bioinformatics records; parsing CIGARs or sequencing read structures; doing genomic interval overlap queries; or modeling typed delimited (TSV/CSV) records. Surfaces fgpyo, pybedlite, and fgmetric features so common primitives (SamBuilder, Template, Cigar, Metric, MetricWriter, BedSource, OverlapDetector) are used instead of hand-rolled equivalents. fgmetric.Metric is preferred over fgpyo.util.Metric.

Using fgpyo, pybedlite, and fgmetric

Three Fulcrum Genomics libraries (fgpyo, pybedlite, fgmetric — all on PyPI) cover most Python bioinformatics primitives. Default to them. Do not hand-roll the equivalents.

If they aren't installed in the project, add them. If a project bans them, do not push.

@stephenturner
stephenturner / get-human-gene-info.R
Created December 30, 2024 14:36
Get information about human genes from RefSeq
library(tidyverse)
# Get Gene Summary info
gs_orig <- read_tsv("https://ftp.ncbi.nlm.nih.gov/gene/DATA/gene_summary.gz")
gs <- gs_orig |>
janitor::clean_names() |>
set_names(str_replace, "number_tax_id", "tax_id") |>
filter(tax_id==9606) |>
distinct()
gs
@tomsing1
tomsing1 / nextflow_tower.md
Created February 15, 2021 20:15
Setting up nextflow tower locally

Installing Nextflow on a Mac

  • Install JAVA 8
 brew install adoptopenjdk8
  • Install Nextflow: curl https://get.nextflow.io | bash in the current directory
  • Optional: Move the nextflow binary to a directory that is in the PATH.
@naomiajacobs
naomiajacobs / optimization.py
Last active April 4, 2026 00:28
bnt162b2 Vaccine Codon Optimization
from dnachisel import *
# Subbed in `CCTCCT` for `AAAGTT` to account for proline substitution
virus = 'ATGTTTGTTTTTCTTGTTTTATTGCCACTAGTCTCTAGTCAGTGTGTTAATCTTACAACCAGAACTCAATTACCCCCTGCATACACTAATTCTTTCACACGTGGTGTTTATTACCCTGACAAAGTTTTCAGATCCTCAGTTTTACATTCAACTCAGGACTTGTTCTTACCTTTCTTTTCCAATGTTACTTGGTTCCATGCTATACATGTCTCTGGGACCAATGGTACTAAGAGGTTTGATAACCCTGTCCTACCATTTAATGATGGTGTTTATTTTGCTTCCACTGAGAAGTCTAACATAATAAGAGGCTGGATTTTTGGTACTACTTTAGATTCGAAGACCCAGTCCCTACTTATTGTTAATAACGCTACTAATGTTGTTATTAAAGTCTGTGAATTTCAATTTTGTAATGATCCATTTTTGGGTGTTTATTACCACAAAAACAACAAAAGTTGGATGGAAAGTGAGTTCAGAGTTTATTCTAGTGCGAATAATTGCACTTTTGAATATGTCTCTCAGCCTTTTCTTATGGACCTTGAAGGAAAACAGGGTAATTTCAAAAATCTTAGGGAATTTGTGTTTAAGAATATTGATGGTTATTTTAAAATATATTCTAAGCACACGCCTATTAATTTAGTGCGTGATCTCCCTCAGGGTTTTTCGGCTTTAGAACCATTGGTAGATTTGCCAATAGGTATTAACATCACTAGGTTTCAAACTTTACTTGCTTTACATAGAAGTTATTTGACTCCTGGTGATTCTTCTTCAGGTTGGACAGCTGGTGCTGCAGCTTATTATGTGGGTTATCTTCAACCTAGGACTTTTCTATTAAAATATAATGAAAATGGAACCATTACAGATGCTGTAGACTGTGCACTTGACCCTCTCTCAGAAACAAAGTGTACGTTGAAATCCTTCAC
@upkarlidder
upkarlidder / dl-resources.md
Last active June 18, 2022 08:32
Deep Learning Hands-On Series with Eric Schles
@mikelove
mikelove / Snakefile
Last active January 29, 2024 20:17
my Salmon Snakemake file
RUNS, = glob_wildcards("fastq/{run}_1.fastq.gz")
SALMON = "/proj/milovelab/bin/salmon-1.4.0_linux_x86_64/bin/salmon"
ANNO = "/proj/milovelab/anno"
rule all:
input: expand("quants/{run}/quant.sf", run=RUNS)
rule salmon_index:
@hannes-brt
hannes-brt / dna_encode.py
Last active May 7, 2023 11:36
One-hot encoding DNA with TensorFlow
# Copyright 2019 Hannes Bretschneider
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
@toniher
toniher / docker2singularity.sh
Last active February 2, 2020 07:52
Bash script wrapper for generating a singularity image from a local Docker image
#!/bin/bash
# Based on https://github.com/sylabs/singularity/issues/1537
# Usage: bash docker2singularity.sh mydockerimg mysingularity.simg
set -ueo pipefail
IMG=$1
FILEOUT=$2
PORT=${3:-5000}
@hiraksarkar
hiraksarkar / extract_transcript_intron.sh
Last active December 14, 2018 21:53
3 line script to extract intron boundaries per transcript
## requirement bed tools
BIN='/home/hirak/bedtools2/bin'
## Gencode
## gencode.v29.chr_patch_hapl_scaff.annotation.gtf
GTF_FILE="gencode.v29.chr_patch_hapl_scaff.annotation.gtf"
# extract transcript boundaries
cat $GTF_FILE | awk 'BEGIN{OFS="\t";} $3=="transcript" {print $1,$4-1,$5,$12}' | tr -d "\"" | tr -d ";" | $BIN/sortBed > gencode_transcript_intervals.bed
# merge exon boundaris
snippet module
${1:name}UI <- function(id){
ns <- NS(id)
tagList(
)
}
${1:name} <- function(input, output, session){