forked from ncbi/histonedb
/
diff_draft_vs_current.py
executable file
·57 lines (47 loc) · 1.47 KB
/
diff_draft_vs_current.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env python
"""
Show differences between draft and current seeds
"""
from math import sqrt, log, e
from random import choice, random
import uuid
from Bio import ExPASy
from Bio import SwissProt
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
import os
import sys
from Bio import AlignIO
from Bio.PDB.PDBParser import PDBParser
from Bio.PDB.Polypeptide import PPBuilder
import csv
import collections
from Bio import Entrez
from Bio import SeqIO
from Bio.SeqUtils.CheckSum import seguid
from Bio.Align import MultipleSeqAlignment
import re
from Bio import AlignIO
from Bio.Align.Applications import MuscleCommandline
import subprocess
import io
from Bio.Align.AlignInfo import SummaryInfo
from Bio.Emboss.Applications import NeedleCommandline
Entrez.email = "alexey.shaytan@nih.gov"
def get_draft_seeds():
"""
Goes through aux_tools/gis
"""
for i, (root, _, files) in enumerate(os.walk("draft_seeds/")):
hist_type = os.path.basename(root)
for f in files:
if not f.endswith(".fasta"): continue
yield root, f
if __name__ == '__main__':
for root,f in get_draft_seeds():
# print hist_var,hist_type,f
seedpath=os.path.join("../static/browse/",root,f).replace("draft_","")
print(os.path.join(root,f)," vs ",seedpath)
if not os.path.exists(seedpath):
print("seed "+f+" does not exist")
os.system("diff "+os.path.join(root,f)+" "+seedpath)