[BioPython] using a variable as input for restriction enzyme

James Stroud jstroud at mbi.ucla.edu
Fri Dec 9 14:57:05 EST 2005


Best would probably be

getattr(Restriction, 'EcoRI').elucidate()


On Friday 09 December 2005 07:25, 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()
>
> Thanks,
> Doug
>
> _______________________________________________
> BioPython mailing list  -  BioPython at biopython.org
> http://biopython.org/mailman/listinfo/biopython

-- 
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/


More information about the BioPython mailing list