Faheem Mitha avatar Faheem Mitha committed 971bfe4

Update paper

Comments (0)

Files changed (1)

 # Parent 93dca926256036df2bb6c22082d50d7ba0215c71
 Add checkfasta.py for checking whether a RSS is in a fasta file.
 
+diff -r 93dca9262560 12rss.py
+--- /dev/null
++++ b/12rss.py
+@@ -0,0 +1,55 @@
++rss1 ="12RSS.txt"
++rssnew1 = "12RSS.new.txt"
++rss2 ="MM12RSS.fasta"
++rssnew2 = "MM12RSS.new.fasta"
++
++def writenewrss(rss, rssnew):
++    import os
++    datadir = "data"
++    from Bio import SeqUtils
++    from Bio.Seq import Seq
++    from Bio.SeqRecord import SeqRecord
++
++    fasta = SeqUtils.quick_FASTA_reader(os.path.join(datadir, rss))
++    #names,seqlst = zip(*fasta)
++
++    #from Bio.Alphabet import generic_protein
++
++    records = []
++    for name, seqlst in fasta:
++        rec = SeqRecord(Seq(seqlst), id=name, description="")
++        records.append(rec)
++
++    from Bio import SeqIO
++    SeqIO.write(records, os.path.join(datadir, rssnew), "fasta")
++
++writenewrss(rss1, rssnew1)
++writenewrss(rss2, rssnew2)
++
++# rec1 = SeqRecord(Seq("MMYQQGCFAGGTVLRLAKDLAENNRGARVLVVCSEITAVTFRGPSETHLDSMVGQALFGD" \
++#                     +"GAGAVIVGSDPDLSVERPLYELVWTGATLLPDSEGAIDGHLREVGLTFHLLKDVPGLISK" \
++#                     +"NIEKSLKEAFTPLGISDWNSTFWIAHPGGPAILDQVEAKLGLKEEKMRATREVLSEYGNM" \
++#                     +"SSAC", generic_protein),
++#                  id="gi|14150838|gb|AAK54648.1|AF376133_1",
++#                  description="chalcone synthase [Cucumis sativus]")
++
++# rec2 = SeqRecord(Seq("YPDYYFRITNREHKAELKEKFQRMCDKSMIKKRYMYLTEEILKENPSMCEYMAPSLDARQ" \
++#                     +"DMVVVEIPKLGKEAAVKAIKEWGQ", generic_protein),
++#                  id="gi|13919613|gb|AAK33142.1|",
++#                  description="chalcone synthase [Fragaria vesca subsp. bracteata]")
++
++# rec3 = SeqRecord(Seq("MVTVEEFRRAQCAEGPATVMAIGTATPSNCVDQSTYPDYYFRITNSEHKVELKEKFKRMC" \
++#                     +"EKSMIKKRYMHLTEEILKENPNICAYMAPSLDARQDIVVVEVPKLGKEAAQKAIKEWGQP" \
++#                     +"KSKITHLVFCTTSGVDMPGCDYQLTKLLGLRPSVKRFMMYQQGCFAGGTVLRMAKDLAEN" \
++#                     +"NKGARVLVVCSEITAVTFRGPNDTHLDSLVGQALFGDGAAAVIIGSDPIPEVERPLFELV" \
++#                     +"SAAQTLLPDSEGAIDGHLREVGLTFHLLKDVPGLISKNIEKSLVEAFQPLGISDWNSLFW" \
++#                     +"IAHPGGPAILDQVELKLGLKQEKLKATRKVLSNYGNMSSACVLFILDEMRKASAKEGLGT" \
++#                     +"TGEGLEWGVLFGFGPGLTVETVVLHSVAT", generic_protein),
++#                  id="gi|13925890|gb|AAK49457.1|",
++#                  description="chalcone synthase [Nicotiana tabacum]")
++
++# my_records = [rec1, rec2, rec3]
++# Now we have a list of SeqRecord objects, we’ll write them to a FASTA format file:
++
++# from Bio import SeqIO
++# SeqIO.write(my_records, "my_example.faa", "fasta")
 diff -r 93dca9262560 checkfasta.py
 --- /dev/null
 +++ b/checkfasta.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.