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 | |
#A python implementation of building clusters from MASH distances | |
import optparse | |
import sys | |
from optparse import OptionParser | |
try: | |
from scipy.cluster.hierarchy import weighted | |
import scipy.spatial.distance as ssd |
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 sys | |
from sys import argv | |
try: | |
out_matrix = open("transposed_matrix.matrix", "w") | |
reduced = [] | |
with open(argv[1]) as my_file: | |
for line in my_file: |
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 | |
"""parse frequencies from a Kmer matrix""" | |
from __future__ import division | |
import sys | |
import os | |
import optparse | |
from optparse import OptionParser | |
from collections import deque |
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 | |
"""retrieve only parsimony infomative | |
sites from a nucleotide multiple sequence alignment""" | |
from optparse import OptionParser | |
import sys | |
try: | |
from Bio import SeqIO | |
except: |
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 | |
"""calculates MLST types from assemblies using BLAST. | |
If the gene is truncated, it will report a "T" and if | |
the gene has no blast hit, it will report a "X". | |
Your reference allele names must all end in "fasta" | |
and must contain a "_" between gene name and number. | |
The only external dependency is blast+ - tested version | |
is 2.2.31""" |
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 | |
"""Read counts across a set of reference sequences. | |
Requires Python 2.7 to run""" | |
from __future__ import division | |
from __future__ import print_function | |
from optparse import OptionParser | |
import sys | |
import os |
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
ERR319438 | |
ERR360775 | |
ERR360792 | |
ERR360848 | |
ERR360746 | |
ERR360782 | |
ERR360788 | |
ERR360789 | |
ERR360783 | |
ERR360770 |
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 | |
"""Transform ribotype data. Input matrix | |
is a transposed output from bac_seq""" | |
from __future__ import print_function | |
from __future__ import division | |
import sys | |
import os | |
import optparse |
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/python | |
#parses sequence lengths from a file and prints them to the screen | |
#usage python seqlength.py infasta | |
from __future__ import print_function | |
from sys import argv | |
import sys | |
try: | |
from Bio import SeqIO | |
except: | |
print("script requires BioPython to run..exiting") |
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
#The input is two colums: x and corresponding y values | |
require(MASS) ## for mvrnorm() | |
set.seed(1) | |
mine <- read.table("xy.txt") | |
mine <- data.frame(mine) | |
names(mine) <- c("X","Y") | |
plot(mine) | |
res <- resid(mod <- lm(Y ~ X, data = mine)) | |
res.qt <- quantile(res, probs = c(0.001,0.999)) | |
want <- which(res >= res.qt[1] & res <= res.qt[2]) |
NewerOlder