This file contains 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 | |
import argparse,sys,os,subprocess,shutil,errno | |
from Bio import SeqIO | |
helptext=''' | |
This script is intended to use the results of a BLAST search of a transcriptome | |
against a draft genome to conduct more specific exonerate alignments. Each transcript | |
is paired with its genome scaffold hit using the BioPython Indexing feature. |
This file contains 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
# Adapted from https://stackoverflow.com/a/7267364/1036500 by Andrie de Vries | |
# This is it: theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5)) | |
library(ggplot2) | |
td <- expand.grid( | |
hjust=c(0, 0.5, 1), | |
vjust=c(0, 0.5, 1), | |
angle=c(0, 45, 90), |
This file contains 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
chunks <- seq(from=0, to=1, length.out=7) # how finely we want to divide each univariate character | |
# 0.0000000 0.1666667 0.3333333 0.5000000 0.6666667 0.8333333 1.0000000 | |
possible_states <- expand.grid(a=chunks, b=chunks, c=chunks) # all possible combinations (not adding up to 1). | |
#Doing just three chars here, you can add more: d=chunks, e=chunks.... | |
sums <- apply(possible_states,1, sum) | |
possible_states <- possible_states[which(abs(sums-1)<0.00001),] # now limiting to those that add up to 1 | |
rownames(possible_states) <- sequence(nrow(possible_states)) - 1 # state 0, 1, 2... |