Need help debug my problem.

User Generated

uhfxlwnzrf

Programming

Description

I have a few modules in the file mymotif.py and trying to use those modules in the file "Gibbs.py". All the modules work on their on in file mymotif but not when imported into Gibbs.py. I attached the error message and two source code files with this post.

Goal is to make all the "import mymotif.py" work.

Error message:

Program does not run:

$ ./gibbs.py mydna.txt 6 100

Traceback (most recent call last):

File "./gibbs.py", line 6, in

import mymotif

File "/home/c.bruce/BINF6308/binf6308-og-GEZHU0376/assmt8A2/mymotif.py", line 63, in

print (profile(string_list,2))

File "/home/c.bruce/BINF6308/binf6308-og-GEZHU0376/assmt8A2/mymotif.py", line 52, in profile

count = Count(string_list,p)

File "/home/c.bruce/BINF6308/binf6308-og-GEZHU0376/assmt8A2/mymotif.py", line 42, in Count

Count[symbol][j-1] += 1

KeyError: 'B'

Unformatted Attachment Preview

The random motifs list: GTTTTT TTCTTT TTCTTT TGTTTT TATTTT TTTCTT TTTTTC TTTCTT TGTTTT TTGTTT TATTTT CTTTTT CTTTTT TTCTTT TCTTTT TTATTT TTTTAT TTGTTT TATTTT TTTTGT Random sequence of DNA with motif insert: tattgagggtactggcctggttaaTTTTATcgcatccccccatcaggagcaggtca taatggtcgtccctggtgataTTTGTTtcgcccgaggggttaaaactctgtatata ccatTTTCTTcgatggccaccaggcgtagatgggtcctttacaggttgctgactgt cctacgttcaggcaagactgggcatgtaTTTTTGgagaagctgcaacactcctgat tagttactctaatgcactaacgtattgagactatcatcctgtctgcaTTTTCTtcg gaTTTTTAagatacagcatgctacccttgaactgcccctcccgcatgtgttgccag agctaacccgaaCTTTTTcgttccccaccgtctacacatcaggtgattgttcccag tcTTTTTCctacgacgcgaacgccgccaatcgatcttcgatctacagatagatgat caagatttaagcagctttgaatactgccccccggctctcctatccttTTTGTTcat gtaaggtgtgcatttcccctccaattcctcgcgtgcgATTTTTttgtagccattga acacctatgggtaagctgaaacaccgaacaaTTTTCTtccaaggagcctcatccgt gtcttatttagccacatagggatggccccaactgaggaaccgcgccttcaTTTTTA accgaatactgacCTTTTTcaggcataagtaaaccatgggtgttcctcacacgtaa atgacgtcccacatcgaagaattatactgggccacgacaagTTTATTtgcctaatt gctatcttcagcTTTTTAttaacacaattagattcattcgaaggtagggccgtggg gcatacagcggcgctaaacacagtttGTTTTTctggttgaaatgattagtctgcac gATTTTTgcgctcggatgggtcgtgacggaattttgctcgcctgtctttggatggc cacaaggataatTTGTTTactttttaaatttacagtgacctttggaacactcgtta gatctcTTTTATtggcgtgcatacgcgtcagggatgtctcagctcgacgctcggcc cgatccgacTTTTATagtatctaagaactcaaagtacggatgatctcttactcaat Assmt 8A Program does not run: $ ./gibbs.py mydna.txt 6 100 Traceback (most recent call last): File"./gibbs.py", line 6, in import mymotif File "/home/c.bruce/BINF6308/binf6308-og- GEZHU0376/assmt8A2/mymotif.py", line 63, in print (profile(string_list,2)) File "/home/c.bruce/BINF6308/binf6308-og- GEZHU0376/assmt8A2/mymotif.py", line 52, in profile count = Count(string_list,p) File "/home/c.bruce/BINF6308/binf6308-og- GEZHU0376/assmt8A2/mymotif.py", line 42, in Count Count[symbol][j-1] += 1 KeyError: 'B!
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

The solution is attached.This was quite...

Related Tags