[BioRuby] URL Generation in Bioruby

Ben Woodcroft donttrustben at gmail.com
Wed Oct 15 01:07:59 UTC 2008


Thanks Adam - I have included these into the module.

2008/10/15 Adam Kraut <adamnkraut at gmail.com>

> I typically put these in Rails/Merb helpers.  I extracted a few from one of
> my apps.  I'm still not sure if these belong in bioruby due to the huge
> number of resources and urls.  I also think they're somewhat
> project-specific.  You're welcome to include or modify these:
>
>     def pdb_url_for(pdbId)
>       "http://www.rcsb.org/pdb/cgi/explore.cgi?pdbId=#{pdbId}<http://www.rcsb.org/pdb/cgi/explore.cgi?pdbId=#%7BpdbId%7D>
> "
>     end
>
>     def pdbsum_url_for(pdbId)
>       "
> http://www.ebi.ac.uk/thornton-srv/databases/cgi-bin/pdbsum/GetPage.pl?pdbcode=#{pdbId}<http://www.ebi.ac.uk/thornton-srv/databases/cgi-bin/pdbsum/GetPage.pl?pdbcode=#%7BpdbId%7D>
> "
>     end
>
>     def cath_url_for(pdbId)
>       "
> http://cathwww.biochem.ucl.ac.uk/cgi-bin/cath/SearchPdb.pl?query=#{pdbId}&type=PDB<http://cathwww.biochem.ucl.ac.uk/cgi-bin/cath/SearchPdb.pl?query=#%7BpdbId%7D&type=PDB>
> "
>     end
>
>     def scop_url_for(pdbId)
>       "http://scop.mrc-lmb.cam.ac.uk/scop/pdb.cgi?disp=scop&id=#{pdbId}<http://scop.mrc-lmb.cam.ac.uk/scop/pdb.cgi?disp=scop&id=#%7BpdbId%7D>
> "
>     end
>
> -Adam
>



-- 
FYI: My email addresses at unimelb, uq and gmail all redirect to the same
place.



More information about the BioRuby mailing list