The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::Search::DrugBank - Access DrugBank's database of pharmaceuticals

SYNOPSIS

  use WWW::Search;

  my $search = new WWW::Search('DrugBank');

  my @ids = qw/ APRD00109 APRD00189 APRD00849 /;
  $search->native_query( \@ids );

  while( my $drug = $search->next_result ) {
    printf "Generic name: %s\n", $drug->{generic_name};
    printf "Melting point: %s\n", $drug->{melting_point};
    printf "CAS registry number: %s\n", $drug->{cas_registry_number};
    printf "PubChem compound ID: %s\n", $drug->{pubchem_id}->{compound};
    printf "PubChem substance ID: %s\n", $drug->{pubchem_id}->{substance};
    print "\n";
    # ... etc.
  }

DESCRIPTION

This module provides a programmatic way of scouring DrugBank (http://redpoll.pharmacy.ualberta.ca/drugbank/), the University of Alberta project that maintains a database of a wide range of pharmaceuticals.

If you are unfamiliar with the WWW::Search interface, see the synopsis for an example of how you might use this module. As its first argument, the "native_query" method accepts either a DrugBank accession number or a reference to an array of such numbers. Results returned by the "next_result" method (named $drug above) are WWW::SearchResult objects containing data about the target drug. Each result contains the following fields.

RESULT FIELDS

drug_target_1_gene_sequence

  $value = $prot->{drug_target_1_gene_sequence};

Corresponds to the 'Drug Target 1 Gene Sequence' field.

drug_target_1_general_function

  $value = $prot->{drug_target_1_general_function};

Corresponds to the 'Drug Target 1 General Function' field.

drug_target_1_locus

  $value = $prot->{drug_target_1_locus};

Corresponds to the 'Drug Target 1 Locus' field.

drug_target_1_molecular_weight

  $value = $prot->{drug_target_1_molecular_weight};

Corresponds to the 'Drug Target 1 Molecular Weight' field.

drug_target_1_name

  $value = $prot->{drug_target_1_name};

Corresponds to the 'Drug Target 1 Name' field.

drug_target_1_number_of_residues

  $value = $prot->{drug_target_1_number_of_residues};

Corresponds to the 'Drug Target 1 Number of Residues' field.

drug_target_1_pdb_id

  $value = $prot->{drug_target_1_pdb_id};

Corresponds to the 'Drug Target 1 PDB ID' field.

drug_target_1_pathway

  $value = $prot->{drug_target_1_pathway};

Corresponds to the 'Drug Target 1 Pathway' field.

drug_target_1_pfam_domain_function

  $value = $prot->{drug_target_1_pfam_domain_function};

Corresponds to the 'Drug Target 1 Pfam Domain Function' field.

drug_target_1_protein_sequence

  $value = $prot->{drug_target_1_protein_sequence};

Corresponds to the 'Drug Target 1 Protein Sequence' field.

drug_target_1_reaction

  $value = $prot->{drug_target_1_reaction};

Corresponds to the 'Drug Target 1 Reaction' field.

drug_target_1_references

  $value = $prot->{drug_target_1_references};

Corresponds to the 'Drug Target 1 References' field.

drug_target_1_snps

  $value = $prot->{drug_target_1_snps};

Corresponds to the 'Drug Target 1 SNPs' field.

drug_target_1_signals

  $value = $prot->{drug_target_1_signals};

Corresponds to the 'Drug Target 1 Signals' field.

drug_target_1_specific_function

  $value = $prot->{drug_target_1_specific_function};

Corresponds to the 'Drug Target 1 Specific Function' field.

drug_target_1_swissprot_id

  $value = $prot->{drug_target_1_swissprot_id};

Corresponds to the 'Drug Target 1 SwissProt ID' field.

drug_target_1_synonyms

  $value = $prot->{drug_target_1_synonyms};

Corresponds to the 'Drug Target 1 Synonyms' field.

drug_target_1_theoretical_pi

  $value = $prot->{drug_target_1_theoretical_pi};

Corresponds to the 'Drug Target 1 Theoretical pI' field.

drug_target_1_transmembrane_regions

  $value = $prot->{drug_target_1_transmembrane_regions};

Corresponds to the 'Drug Target 1 Transmembrane Regions' field.

drug_target_2_3d_structure_image

  $value = $prot->{drug_target_2_3d_structure_image};

Corresponds to the 'Drug Target 2 3D Structure Image' field.

drug_target_2_3d_structure_text

  $value = $prot->{drug_target_2_3d_structure_text};

Corresponds to the 'Drug Target 2 3D Structure Text' field.

drug_target_2_cellular_location

  $value = $prot->{drug_target_2_cellular_location};

Corresponds to the 'Drug Target 2 Cellular Location' field.

drug_target_2_chromosome_location

  $value = $prot->{drug_target_2_chromosome_location};

Corresponds to the 'Drug Target 2 Chromosome Location' field.

drug_target_2_essentiality

  $value = $prot->{drug_target_2_essentiality};

Corresponds to the 'Drug Target 2 Essentiality' field.

drug_target_2_go_classification

  $value = $prot->{drug_target_2_go_classification};

Corresponds to the 'Drug Target 2 GO Classification' field.

drug_target_2_genbank_id_gene

  $value = $prot->{drug_target_2_genbank_id_gene};

Corresponds to the 'Drug Target 2 GenBank ID Gene' field.

drug_target_2_genbank_id_protein

  $value = $prot->{drug_target_2_genbank_id_protein};

Corresponds to the 'Drug Target 2 GenBank ID Protein' field.

drug_target_2_gene_name

  $value = $prot->{drug_target_2_gene_name};

Corresponds to the 'Drug Target 2 Gene Name' field.

drug_target_2_gene_sequence

  $value = $prot->{drug_target_2_gene_sequence};

Corresponds to the 'Drug Target 2 Gene Sequence' field.

drug_target_2_general_function

  $value = $prot->{drug_target_2_general_function};

Corresponds to the 'Drug Target 2 General Function' field.

drug_target_2_locus

  $value = $prot->{drug_target_2_locus};

Corresponds to the 'Drug Target 2 Locus' field.

drug_target_2_molecular_weight

  $value = $prot->{drug_target_2_molecular_weight};

Corresponds to the 'Drug Target 2 Molecular Weight' field.

drug_target_2_name

  $value = $prot->{drug_target_2_name};

Corresponds to the 'Drug Target 2 Name' field.

drug_target_2_number_of_residues

  $value = $prot->{drug_target_2_number_of_residues};

Corresponds to the 'Drug Target 2 Number of Residues' field.

drug_target_2_pdb_id

  $value = $prot->{drug_target_2_pdb_id};

Corresponds to the 'Drug Target 2 PDB ID' field.

drug_target_2_pathway

  $value = $prot->{drug_target_2_pathway};

Corresponds to the 'Drug Target 2 Pathway' field.

drug_target_2_pfam_domain_function

  $value = $prot->{drug_target_2_pfam_domain_function};

Corresponds to the 'Drug Target 2 Pfam Domain Function' field.

drug_target_2_protein_sequence

  $value = $prot->{drug_target_2_protein_sequence};

Corresponds to the 'Drug Target 2 Protein Sequence' field.

drug_target_2_reaction

  $value = $prot->{drug_target_2_reaction};

Corresponds to the 'Drug Target 2 Reaction' field.

drug_target_2_references

  $value = $prot->{drug_target_2_references};

Corresponds to the 'Drug Target 2 References' field.

drug_target_2_snps

  $value = $prot->{drug_target_2_snps};

Corresponds to the 'Drug Target 2 SNPs' field.

drug_target_2_signals

  $value = $prot->{drug_target_2_signals};

Corresponds to the 'Drug Target 2 Signals' field.

drug_target_2_specific_function

  $value = $prot->{drug_target_2_specific_function};

Corresponds to the 'Drug Target 2 Specific Function' field.

drug_target_2_swissprot_id

  $value = $prot->{drug_target_2_swissprot_id};

Corresponds to the 'Drug Target 2 SwissProt ID' field.

drug_target_2_synonyms

  $value = $prot->{drug_target_2_synonyms};

Corresponds to the 'Drug Target 2 Synonyms' field.

drug_target_2_theoretical_pi

  $value = $prot->{drug_target_2_theoretical_pi};

Corresponds to the 'Drug Target 2 Theoretical pI' field.

drug_target_2_transmembrane_regions

  $value = $prot->{drug_target_2_transmembrane_regions};

Corresponds to the 'Drug Target 2 Transmembrane Regions' field.

drug_type, type

  $value = $prot->{drug_type};
  $value = $prot->{type};

Corresponds to the 'Drug Type' field.

fda_label

  $value = $prot->{fda_label};

Corresponds to the 'FDA Label' field.

genbank_id

  $value = $prot->{genbank_id};

Corresponds to the 'GenBank ID' field.

generic_name, name

  $value = $prot->{generic_name};
  $value = $prot->{name};

Corresponds to the 'Generic Name' field.

h2o_solubility

  $value = $prot->{h2o_solubility};

Corresponds to the 'H2O Solubility' field.

het_id

  $value = $prot->{het_id};

Corresponds to the 'HET ID' field.

half_life

  $value = $prot->{half_life};

Corresponds to the 'Half Life' field.

inchi_identifier, inchi_id

  $value = $prot->{inchi_identifier};
  $value = $prot->{inchi_id};

Corresponds to the 'InChi Identifier' field.

indication

  $value = $prot->{indication};

Corresponds to the 'Indication' field.

interactions

  $value = $prot->{interactions};

Corresponds to the 'Interactions' field.

kegg_compound_id

  $value = $prot->{kegg_compound_id};

Corresponds to the 'KEGG Compound ID' field.

last_update

  $value = $prot->{last_update};

Corresponds to the 'Last Update' field.

logp, hydrophobicity

  $value = $prot->{logp};
  $value = $prot->{hydrophobicity};

Corresponds to the 'LogP/Hydrophobicity' field.

mol_file_image

  $value = $prot->{mol_file_image};

Corresponds to the 'MOL File Image' field.

mol_file_text

  $value = $prot->{mol_file_text};

Corresponds to the 'MOL File Text' field.

mass_spectrum

  $value = $prot->{mass_spectrum};

Corresponds to the 'Mass Spectrum' field.

material_safety_data_sheet, msds

  $value = $prot->{material_safety_data_sheet};
  $value = $prot->{msds};

Corresponds to the 'Material Safety Data Sheet (MSDS)' field.

mechanism_of_action

  $value = $prot->{mechanism_of_action};

Corresponds to the 'Mechanism of Action' field.

melting_point

  $value = $prot->{melting_point};

Corresponds to the 'Melting Point' field.

molecular_weight

  $value = $prot->{molecular_weight};

Corresponds to the 'Molecular Weight' field.

nmr_spectrum

  $value = $prot->{nmr_spectrum};

Corresponds to the 'NMR Spectrum' field.

organisms_affected

  $value = $prot->{organisms_affected};

Corresponds to the 'Organisms Affected' field.

pdb_experimental_id

  $value = $prot->{pdb_experimental_id};

Corresponds to the 'PDB Experimental ID' field.

pdb_file_calculated_image

  $value = $prot->{pdb_file_calculated_image};

Corresponds to the 'PDB File Calculated Image' field.

pdb_file_calculated_text

  $value = $prot->{pdb_file_calculated_text};

Corresponds to the 'PDB File Calculated Text' field.

pdb_file_experimental_image

  $value = $prot->{pdb_file_experimental_image};

Corresponds to the 'PDB File Experimental Image' field.

pdb_file_experimental_text

  $value = $prot->{pdb_file_experimental_text};

Corresponds to the 'PDB File Experimental Text' field.

patient_information

  $value = $prot->{patient_information};

Corresponds to the 'Patient Information' field.

pharmgkb_id

  $value = $prot->{pharmgkb_id};

Corresponds to the 'PharmGKB ID' field.

pharmacology

  $value = $prot->{pharmacology};

Corresponds to the 'Pharmacology' field.

phase_1_metabolizing_enzyme

  $value = $prot->{phase_1_metabolizing_enzyme};

Corresponds to the 'Phase 1 Metabolizing Enzyme' field.

phase_1_metabolizing_enzyme_sequence

  $value = $prot->{phase_1_metabolizing_enzyme_sequence};

Corresponds to the 'Phase 1 Metabolizing Enzyme Sequence' field.

phase_1_metabolizing_enzyme_swissprot_id

  $value = $prot->{phase_1_metabolizing_enzyme_swissprot_id};

Corresponds to the 'Phase 1 Metabolizing Enzyme SwissProt ID' field.

protein_binding, protein_bound

  $value = $prot->{protein_binding};
  $value = $prot->{protein_bound};

Corresponds to the 'Protein Binding' field.

pubchem_id

  $value = $prot->{pubchem_id};

Corresponds to the 'PubChem ID' field.

  $value = $prot->{rxlist_link};

Corresponds to the 'RxList Link' field.

sdf_file

  $value = $prot->{sdf_file};

Corresponds to the 'SDF File' field.

smiles_string

  $value = $prot->{smiles_string};

Corresponds to the 'Smiles String' field.

state

  $value = $prot->{state};

Corresponds to the 'State' field.

swissprot_id

  $value = $prot->{swissprot_id};

Corresponds to the 'SwissProt ID' field.

synthesis_reference

  $value = $prot->{synthesis_reference};

Corresponds to the 'Synthesis Reference' field.

toxicity

  $value = $prot->{toxicity};

Corresponds to the 'Toxicity' field.

pka, isoelectric_point

  $value = $prot->{pka};
  $value = $prot->{isoelectric_point};

Corresponds to the 'pKa/Isoelectric Point' field.

AUTHOR

David Iberri, <diberri at cpan.org>

BUGS

Please report any bugs or feature requests to bug-www-drugbank at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Search-DrugBank. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc WWW::Search::DrugBank

You can also look for information at:

COPYRIGHT & LICENSE

Copyright 2006 David Iberri, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.