Skip to content

Instantly share code, notes, and snippets.

View tantrev's full-sized avatar

Trevor Tanner tantrev

  • Bloomington, IN
View GitHub Profile
@endolith
endolith / peakdet.m
Last active February 14, 2024 21:27
Peak detection in Python [Eli Billauer]
function [maxtab, mintab]=peakdet(v, delta, x)
%PEAKDET Detect peaks in a vector
% [MAXTAB, MINTAB] = PEAKDET(V, DELTA) finds the local
% maxima and minima ("peaks") in the vector V.
% MAXTAB and MINTAB consists of two columns. Column 1
% contains indices in V, and column 2 the found values.
%
% With [MAXTAB, MINTAB] = PEAKDET(V, DELTA, X) the indices
% in MAXTAB and MINTAB are replaced with the corresponding
% X-values.
@feczo
feczo / putty-gce.md
Last active July 23, 2020 13:14
How to use Compute Engine - GCE with putty
@danielecook
danielecook / generate_masked_ranges.py
Last active December 28, 2019 03:00
Generates the masked ranges within a fasta file.
#!bin/python
import gzip
import io
import sys
import os
# This file will generate a bedfile of the masked regions a fasta file.
# STDIN or arguments
@jlln
jlln / separator.py
Last active November 9, 2023 19:59
Efficiently split Pandas Dataframe cells containing lists into multiple rows, duplicating the other column's values.
def splitDataFrameList(df,target_column,separator):
''' df = dataframe to split,
target_column = the column containing the values to split
separator = the symbol used to perform the split
returns: a dataframe with each entry for the target column separated, with each element moved into a new row.
The values in the other columns are duplicated across the newly divided rows.
'''
def splitListToRows(row,row_accumulator,target_column,separator):
split_row = row[target_column].split(separator)
@mikheyev
mikheyev / ERCC92.gff
Created June 13, 2015 23:19
ERCC92 gff
ERCC-00002 ERCC exon 1 1061 0.000000 + . gene_id "ERCC-00002"; transcript_id "DQ459430";
ERCC-00003 ERCC exon 1 1023 0.000000 + . gene_id "ERCC-00003"; transcript_id "DQ516784";
ERCC-00004 ERCC exon 1 523 0.000000 + . gene_id "ERCC-00004"; transcript_id "DQ516752";
ERCC-00009 ERCC exon 1 984 0.000000 + . gene_id "ERCC-00009"; transcript_id "DQ668364";
ERCC-00012 ERCC exon 1 994 0.000000 + . gene_id "ERCC-00012"; transcript_id "DQ883670";
ERCC-00013 ERCC exon 1 808 0.000000 + . gene_id "ERCC-00013"; transcript_id "EF011062";
ERCC-00014 ERCC exon 1 1957 0.000000 + . gene_id "ERCC-00014"; transcript_id "DQ875385";
ERCC-00016 ERCC exon 1 844 0.000000 + . gene_id "ERCC-00016"; transcript_id "DQ883664";
ERCC-00017 ERCC exon 1 1136 0.000000 + . gene_id "ERCC-00017"; transcript_id "DQ459420";
ERCC-00019 ERCC exon 1 644 0.000000 + . gene_id "ERCC-00019"; transcript_id "DQ883651";
@fadere
fadere / ebay_scraper.py
Created December 3, 2015 07:21
python code to scrape ebay historical auction results
import csv
import requests
import bs4
import argparse
# parser = argparse.ArgumentParser(description='Process a list of search terms.')
# parser.add_argument('terms', metavar='N', type=str, nargs='+',
# help='comma separated list of terms to search for')
# args = parser.parse_args()
#!/usr/bin/env perl
#
# Downloaded from http://www.uppmax.uu.se/system/files/fastqFormatDetect.pl_.txt on Jan 19, 2016.
#
# Author: Martin Dahlo / modified Jacques Dainat
#
# Usage: perl scriptname.pl <infile> [-a -t <max seconds to search>]
# ex.
# perl scriptname.pl reads.fq
# perl scriptname.pl reads.fq -a
@ckandoth
ckandoth / ensembl_vep_84_with_offline_cache.md
Last active July 9, 2018 16:53
Install Ensembl's VEP v84 with various caches for running offline

Ensembl's VEP (Variant Effect Predictor) is popular for how it picks a single effect per gene as detailed here, its CLIA-compliant HGVS variant format, and Sequence Ontology nomenclature for variant effects.

To follow these instructions, we'll assume you have these packaged essentials installed:

sudo yum install -y curl rsync tar make perl perl-core
## OR ##
sudo apt-get install -y curl rsync tar make perl perl-base

VEP requires Perl 5.10 or newer, but I'd strongly recommend at least 5.18. If your system Perl is outdated, then follow this gist to set up Perl 5.22. Once that's done, set temporary shell variables pointing to where Perl and its libraries live. Change this as needed for y

@ckandoth
ckandoth / ensembl_vep_85_with_offline_cache.md
Last active May 15, 2018 08:50
Install Ensembl's VEP v85 with various caches for running offline

Ensembl's VEP (Variant Effect Predictor) is popular for how it picks a single effect per gene as detailed here, its CLIA-compliant HGVS variant format, and Sequence Ontology nomenclature for variant effects.

To follow these instructions, we'll assume you have these packaged essentials installed:

## For Debian/Ubuntu system admins ##
sudo apt-get install -y build-essential git libncurses-dev

## For RHEL/CentOS system admins ##
sudo yum groupinstall -y 'Development Tools'

sudo yum install -y git ncurses-devel

@ckandoth
ckandoth / ensembl_vep_86_with_offline_cache.md
Last active July 15, 2021 16:26
Install Ensembl's VEP v86 with various caches for running offline

Ensembl's VEP (Variant Effect Predictor) is popular for how it picks a single effect per gene as detailed here, its CLIA-compliant HGVS variant format, and Sequence Ontology nomenclature for variant effects.

To follow these instructions, we'll assume you have these packaged essentials installed:

## For Debian/Ubuntu system admins ##
sudo apt-get install -y build-essential git libncurses-dev

## For RHEL/CentOS system admins ##
sudo yum groupinstall -y 'Development Tools'
sudo yum install -y git ncurses-devel