Skip to content

Instantly share code, notes, and snippets.

View alexcritschristoph's full-sized avatar
🦠
microbes are eating the world

Alex Crits-Christoph alexcritschristoph

🦠
microbes are eating the world
View GitHub Profile
@fomightez
fomightez / mRNAforProtein.py
Last active August 29, 2015 14:11
Retrieve mRNA Seq from NCBI Given A List Of Protein Accessions
#script to accompany https://www.biostars.org/p/64078/
from Bio import Entrez
Entrez.email = "[email protected]"
protein_accn_numbers = ["ABR17211.1", "XP_002864745.1", "AAT45004.1", "XP_003642916.1" ]
protein_gi_numbers = []
print "The Accession numbers for protein sequence provided:"
print protein_accn_numbers
@michaeluzzi
michaeluzzi / grey-album.py
Last active December 16, 2015 01:39
Feeding lyrics from the White Album and Black Album to a Markov chain generator to create "Grey Album" lyrics.
import random
from markov import MarkovGenerator
from markov_by_char import CharacterMarkovGenerator
# word MarkovGenerator
generator = MarkovGenerator(n=2, max=500)
# character MarkovGenerator
#generator = CharacterMarkovGenerator(n=3, max=100)
@nathanhaigh
nathanhaigh / deinterleave_fastq.sh
Last active March 19, 2025 13:29
deinterleave FASTQ files
#!/bin/bash
# Usage: deinterleave_fastq.sh < interleaved.fastq f.fastq r.fastq [compress]
#
# Deinterleaves a FASTQ file of paired reads into two FASTQ
# files specified on the command line. Optionally GZip compresses the output
# FASTQ files using pigz if the 3rd command line argument is the word "compress"
#
# Can deinterleave 100 million paired reads (200 million total
# reads; a 43Gbyte file), in memory (/dev/shm), in 4m15s (255s)
#
@andreiolariu
andreiolariu / mm_youtube.py
Created November 18, 2011 17:25
Markov model based on youtube comments
# for more info check out http://webmining.olariu.org/interview-with-a-lady-gaga-fan
# made to be run in the ipython console
import urllib, urllib2, time, random
import simplejson as json
def fetch_url(url, get=None, post=None):
user_agent = 'Andrei Olariu\'s Web Mining for Dummies'
headers = {'User-Agent': user_agent}
if get:
@senko
senko / onchange.sh
Last active April 1, 2025 17:30
OnChange - Watch current directory and execute a command if anything in it changes
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <[email protected]>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of
@ehazlett
ehazlett / pub_med.py
Created July 25, 2011 16:27
Search PubMed with BioPython
#!/usr/bin/env python
# numpy and biopython are required -- pip install numpy biopython
from Bio import Entrez
from Bio import Medline
MAX_COUNT = 10
TERM = 'Tuberculosis'
print('Getting {0} publications containing {1}...'.format(MAX_COUNT, TERM))