[BioPython] using a variable as input for restriction enzyme

Frank Kauff fkauff at duke.edu
Fri Dec 9 12:14:03 EST 2005


On Fri, 2005-12-09 at 10:25 -0500, Douglas Kojetin wrote:
> Hi All-
> 
> How do I use a variable to specify the restriction enzyme?
> 
> Example --  instead of using the following call:
> 
>    Restriction.EcoR1.elucidate()
> 
> instead (somehow) use a variable to specify the restriction enzyme:
> 
>    rsite='EcoR1'
>    Restriction.rsite.elucidate()
> 

Not sure, but would

Restriction.__getattribute__(rsite).elucidate()

work?

Frank


> Thanks,
> Doug
> 
> _______________________________________________
> BioPython mailing list  -  BioPython at biopython.org
> http://biopython.org/mailman/listinfo/biopython
-- 



More information about the BioPython mailing list