Commits

Faheem Mitha committed 480047a

Update paper

Comments (0)

Files changed (1)

 +#print len(set(datafilesinfoorig).intersection(set(datafilesinfonew)))
 +#print set(datafilesinfoorig).difference(set(datafilesinfonew))
 +#print [list(t) for t in list(set(datafilesinfonew).difference(set(datafilesinfoorig)))]
+diff -r 93dca9262560 comparemousefasta.py
+--- /dev/null
++++ b/comparemousefasta.py
+@@ -0,0 +1,56 @@
++fastafile1 = "12mouseRSS.fasta"
++fastafile2 = "MM12RSS.fasta.new"
++
++import os
++from Bio import SeqUtils
++#from corrmodel.load import complement
++datadir = "data"
++fasta1 = SeqUtils.quick_FASTA_reader(os.path.join(datadir, fastafile1))
++fasta2 = SeqUtils.quick_FASTA_reader(os.path.join(datadir, fastafile2))
++names1, seqlst1 = zip(*fasta1)
++fastadict1 = {}
++fastadict2 = {}
++#print fasta1
++
++for name, seq in fasta1:
++    #print name, seq
++    if seq not in fastadict1:
++        fastadict1[seq] = [name]
++    else:
++        fastadict1[seq].append(name)
++
++for name, seq in fasta2:
++    #print name, seq
++    if seq not in fastadict2:
++        fastadict2[seq] = [name]
++    else:
++        fastadict2[seq].append(name)
++
++#print fastadict1
++#print fasta1
++#fastadict1 = dict(fasta1)
++#print fastadict1
++
++#fastadict1 = dict(fasta1)
++#print fastadict1
++
++#print "fasta1", fasta1
++#print zip(*fasta1)
++names1, seqlst1 = zip(*fasta1)
++names2, seqlst2 = zip(*fasta2)
++
++#print "seqlst1", seqlst1
++#print "seqlst2", seqlst2
++
++print "len of seqlst1", len(seqlst1)
++print "len of seqlst1 unique", len(set(seqlst1))
++print "len of seqlst2", len(seqlst2)
++print "len of seqlst2 unique", len(set(seqlst2))
++print "seqlst1 - seqlst2", set(seqlst1).difference(set(seqlst2))
++for s in set(seqlst1).difference(set(seqlst2)):
++    print fastadict1[s]
++print "len of seqlst1 - seqlst2", len(set(seqlst1).difference(set(seqlst2)))
++print "seqlst2 - seqlst1", set(seqlst2).difference(set(seqlst1))
++#print "len of seqlst2 - seqlst1", len(set(seqlst2).difference(set(seqlst1)))
++
++print "intersection of seqlst2 - seqlst1", len(set(seqlst2).intersection(set(seqlst1)))
 diff -r 93dca9262560 compareseq.py
 --- /dev/null
 +++ b/compareseq.py