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
# blosum62 | |
# * column uses minimum score | |
# BLOSUM Clustered Scoring Matrix in 1/2 Bit Units | |
# Blocks Database = /data/blocks_5.0/blocks.dat | |
# Cluster Percentage: >= 62 | |
# Entropy = 0.6979, Expected = -0.5209 | |
A R N D C Q E G H I L K M F P S T W Y V B Z X * | |
A 4 -1 -2 -2 0 -1 -1 0 -2 -1 -1 -1 -1 -2 -1 1 0 -3 -2 0 -2 -1 0 -4 | |
R -1 5 0 -2 -3 1 0 -2 0 -3 -2 2 -1 -3 -2 -1 -1 -3 -2 -3 -1 0 -1 -4 | |
N -2 0 6 1 -3 0 0 0 1 -3 -3 0 -2 -3 -2 1 0 -4 -2 -3 3 0 -1 -4 |
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
^\<\u\l\{-}\> \<\l\{-}\>$ |
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
tail -n+4 -q results/* | less -S |
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
join -a 1 -a2 -e 'NA' -o '0,1.2,2.2' ce hc > join.count |
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 perl | |
use v5.14; | |
use warnings; | |
sub hamming { | |
my @a = split "", shift; | |
my @b = split "", shift; | |
my $distance = 0; | |
for (my $n = 0; $n < scalar(@a); $n++) { | |
unless (($a[$n]) eq ($b[$n])) { |
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 | |
#http://rosalind.info/problems/cons/ | |
import fastaparse | |
letters = ["A","C","G","T"] | |
sequences = [i.seq for i in fastaparse.sequences("temp2")] | |
#create empty profile matrix |
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
sudo ntpd -gq | |
sudo hwclock --systohc --utc |
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
#load everythin in memory | |
#split | |
def split_fasta(input_file): | |
with open(input_file) as fasta_file: | |
text = fasta_file.read().split(">")[1:] | |
data = [] | |
for entry in text: | |
header,sequence = entry.split("\n",1) | |
sequence = sequence.replace("\n","") |
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
def qw(s,t=str): | |
return list(map(t,s.split())) |
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 fastaparse | |
import sys | |
sequences = [i.seq for i in fastaparse.parse_fasta(sys.argv[1])] | |
def substrings(string): | |
n = len(string) | |
for length in range(n,0,-1): |