This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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)) |