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 | |
doc = """ | |
Quickly estimates insert sizes of read datasets, given some sequence(s) they can be mapped to. | |
Author: Rayan Chikhi | |
short usage: <reference> <*.fastq> | |
example: | |
estimate-insert-sizes contigs.fa readsA_1.fq readsA_2.fq readsB_1.fq readsB_2.fq |
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 | |
''' | |
Automatically estimate insert size of the paired-end reads for a given SAM/BAM file. | |
Usage: getinsertsize.py <SAM file> or samtools view <BAM file> | getinsertsize.py - | |
Author: Wei Li | |
Copyright (c) <2015> <Wei Li> | |
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 | |
""" | |
extract_reads.py | |
Created by Tim Stuart | |
""" | |
import pysam | |
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/local/bin/python2.7 | |
""" | |
mean_size.py | |
Created by Tim Stuart | |
""" | |
import numpy as np | |
def get_data(inp): |
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 | |
set -eo pipefail | |
# A small script to generate artemis comparison files (nucleic acid comparison) | |
# since all the webservers are apparently defunct! | |
# Script requires blastn (NOT LEGACY BLAST) and makeblastdb in path - check for existence: | |
command -v makeblastdb >/dev/null 2>&1 || { echo >&2 "makeblastdb doesn't appear to be installed. Aborting."; exit 1; } | |
command -v blastn >/dev/null 2>&1 || { echo >&2 "BLAST+ doesn't appear to be installed. Aborting."; exit 1; } |
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
# This script will calculate Shannon entropy from a MSA. | |
# Dependencies: | |
# Biopython, Matplotlib [optionally], Math | |
""" | |
Shannon's entropy equation (latex format): | |
H=-\sum_{i=1}^{M} P_i\,log_2\,P_i | |
Entropy is a measure of the uncertainty of a probability distribution (p1, ..... , pM) |
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 | |
### | |
# Backup Script | |
### | |
# Toggle debug mode for CLI output - "YES" or "NO" | |
DEBUG="YES" | |
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
# coding=UTF-8 | |
import nltk | |
from nltk.corpus import brown | |
# This is a fast and simple noun phrase extractor (based on NLTK) | |
# Feel free to use it, just keep a link back to this post | |
# http://thetokenizer.com/2013/05/09/efficient-way-to-extract-the-main-topics-of-a-sentence/ | |
# Create by Shlomi Babluki | |
# May, 2013 |