'str' Object has no attribute biopython

Asked

Viewed 41 times

2

I’m working on the biopython. Request input of an input():

enz_name1 = input('ENZYME 1 NAME: ')
enz_name2 = input('ENZYME 2 NAME: ')

However, when I want to use input() to use . catalyse in this way:

    rb=RestrictionBatch()
    rb.add(enz_name1)
    rb.add(enz_name2)
    #enz_name=enz#  
print(rb.catalyse(my_seq,linear=False)) 

or Even:

print (enz_name1.catalyse(my_seq, linear=False)

I have error 'str' Object has no attribute. What if I use the normal enzyme name (e.g. Ecori or Xmai) works, but not the string I get as input. There is a way to convert these strings into the nonstring form of these enzymes that are recognized by the . catalyse option?

  • enz_name1 is a string so it has no method catalyse. This probably comes from another object of some class you’re using and you’re making a mess of the objects. Only with the code you put in here is it not possible to know what you were trying to do.

  • I think you want the job search(). An object of the type RestrictionBatch() does not have the function catalyse().

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.