Faheem Mitha avatar Faheem Mitha committed 786f87e

Update paper

Comments (0)

Files changed (1)

 diff -r 93dca9262560 checkfasta.py
 --- /dev/null
 +++ b/checkfasta.py
-@@ -0,0 +1,112 @@
+@@ -0,0 +1,123 @@
 +def checkfasta(accnum, rss):
 +    import os
 +    from corrmodel.utils import get_conf
 +    seq_in_rsslst = False
 +    seqcontainsrss = []
 +    #print "rsslst", rsslst
-+    rss_in_seq = False
++    #rss_in_seq = []
 +    for accnum in accnumlst:
++        rss_in_seq = []
 +        for rss in rsslst:
 +            #rss = "".join(rss.split())
 +            #rss = rss.upper()
 +            sc = complement(s)
 +            #print "forward", rss in s
 +            #print "reversed", rss in sc
-+            # check that rss is contained in sequence
-+            if rss in s or rss in sc:
-+                rss_in_seq = True
-+        rss_in_seqlst = rss_in_seq
-+        seqcontainsrss.append((accnum, rss_in_seqlst))
++            #check that rss is contained in sequence
++            if rss in s:
++                rss_in_seq.append("forward")
++            if rss in sc:
++                rss_in_seq.append("reverse")
++            # if rss not in s and rss not in sc:
++            #     rss_in_seq.append(False)
++        #rss_in_seqlst = rss_in_seq
++        for r in rss_in_seq:
++            seqcontainsrss.append([accnum, r])
 +
 +    return seqcontainsrss
 +
 +    #("SELECT sequence from motif inner join motifgroup on motif.motifgroup_id=motifgroup.id")
 +    fastafile = "accnum.fasta"
 +    seqcontainsrss = checkfasta2(fastafile, accnumlst, rsslst)
++    print seqcontainsrss
 +    #[t[0] for t in x if t[1] is True]
-+    seqcontainingrssonly = [x[0] for x in seqcontainsrss if x[1] is True]
++    #seqcontainingrssonly = [x for x in seqcontainsrss if x[1] is not False]
++    outfile = "seqcontainsrss.txt"
++    f = open(outfile, 'w')
++    f.write(str(seqcontainsrss))
++    f.close()
 diff -r 93dca9262560 compareseq.py
 --- /dev/null
 +++ b/compareseq.py
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.