lib/bio/io/ddbjxml.rb in bio-1.0.0 vs lib/bio/io/ddbjxml.rb in bio-1.1.0

- old
+ new

@@ -1,32 +1,14 @@ # # = bio/io/ddbjxml.rb - DDBJ SOAP server access class # # Copyright:: Copyright (C) 2003, 2004 -# KATAYAMA Toshiaki <k@bioruby.org> -# License:: LGPL +# Toshiaki Katayama <k@bioruby.org> +# License:: The Ruby License # -# $Id: ddbjxml.rb,v 1.10 2006/02/02 16:30:29 nakao Exp $ +# $Id: ddbjxml.rb,v 1.14 2007/04/05 23:35:41 trevor Exp $ # -#-- -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -#++ -# require 'bio/io/soapwsdl' require 'bio/db/genbank/ddbj' @@ -43,10 +25,17 @@ # class XML < Bio::SOAPWSDL BASE_URI = "http://xml.nig.ac.jp/wsdl/" + # set default to GetEntry + SERVER_URI = BASE_URI + "GetEntry.wsdl" + + def initialize(wsdl = nil) + super(wsdl || self.class::SERVER_URI) + end + # === Description # # DDBJ XML BLAST Database Search # # * http://xml.nig.ac.jp/doc/Blast.txt @@ -70,29 +59,24 @@ # param = '-m 8 -e 0.001' # puts serv.searchParam(program, database, query, param) # # === WSDL Methods # - # ==== searchSimple(program, database, query) + # * searchSimple(program, database, query) # # Returns a blast report in the default format. # - # ==== searchParam(program, database, query, param) + # * searchParam(program, database, query, param) # # Blasts with param and returns a blast report. # # === References # # * http://xml.nig.ac.jp/doc/Blast.txt # class Blast < XML SERVER_URI = BASE_URI + "Blast.wsdl" - - # returns a Bio::DDBJ::XML::Blast object. - def initialize(wsdl = nil) - super(wsdl || SERVER_URI) - end end # === ClustalW # @@ -121,24 +105,19 @@ # puts serv.analyzeSimple(query) # puts serv.analyzeParam(query, '-align -matrix=blosum') # # === WSDL Methods # - # ==== analyzeSimple(query) - # ==== analyzeParam(query, param) + # * analyzeSimple(query) + # * analyzeParam(query, param) # # === References # # * http://xml.nig.ac.jp/doc/ClustalW.txt # class ClustalW < XML SERVER_URI = BASE_URI + "ClustalW.wsdl" - - # returns a Bio::DDBJ::XML::ClustalW object. - def initialize(wsdl = nil) - super(wsdl || SERVER_URI) - end end # == DDBJ # @@ -156,28 +135,23 @@ # puts serv.getRelatedFeatures('AL121903', '59000', '64000') # puts serv.getRelatedFeaturesSeq('AL121903', '59000', '64000') # # === WSDL Methods # - # ==== getFFEntry(accession) - # ==== getXMLEntry(accession) - # ==== getFeatureInfo(accession, feature) - # ==== getAllFeatures(accession) - # ==== getRelatedFeatures(accession, start, stop) - # ==== getRelatedFeaturesSeq(accession, start, stop) + # * getFFEntry(accession) + # * getXMLEntry(accession) + # * getFeatureInfo(accession, feature) + # * getAllFeatures(accession) + # * getRelatedFeatures(accession, start, stop) + # * getRelatedFeaturesSeq(accession, start, stop) # # === References # # * http://xml.nig.ac.jp/doc/DDBJ.txt # class DDBJ < XML SERVER_URI = BASE_URI + "DDBJ.wsdl" - - # returns a Bio::DDBJ::XML::DDBJ object. - def initialize(wsdl = nil) - super(wsdl || SERVER_URI) - end end # == Fasta # @@ -194,24 +168,19 @@ # query = ">Test\nAGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC" # puts serv.searchParam('fastx34_t', 'PDB', query, '-n') # # === WSDL Methods # - # ==== searchSimple(program, database, query) - # ==== searchParam(program, database, query, param) + # * searchSimple(program, database, query) + # * searchParam(program, database, query, param) # # === References # # * http://xml.nig.ac.jp/doc/Fasta.txt # class Fasta < XML SERVER_URI = BASE_URI + "Fasta.wsdl" - - # returns a Bio::DDBJ::XML::Fasta object. - def initialize(wsdl = nil) - super(wsdl || SERVER_URI) - end end # == GetEntry # @@ -225,51 +194,46 @@ # puts serv.getDDBJEntry('AB000050') # puts serv. getPDBEntry('1AAR') # # === WSDL Methods # - # ==== getEntry(database, var, param1, param2) - # ==== getEntry(database, var) - # ==== getDDBJEntry(accession) - # ==== getDDBJCONEntry(accession) - # ==== getDDBJVerEntry(accession) - # ==== getLocus_DDBJEntry(locus) - # ==== getGene_DDBJEntry(gene) - # ==== getProd_DDBJEntry(products) - # ==== getPID_DDBJEntry(pid) - # ==== getClone_DDBJEntry(clone) - # ==== getXML_DDBJEntry(accession) - # ==== getEMBLEntry(accession) - # ==== getSWISSEntry(accession) - # ==== getPIREntry(accession) - # ==== getPRFEntry(accession) - # ==== getPDBEntry(accession) - # ==== getQVEntry(accession) - # ==== getDADEntry(accession) - # ==== getPID_DADEntry(pid) - # ==== getFASTA_DDBJEntry(accession) - # ==== getFASTA_DDBJCONEntry(accession) - # ==== getFASTA_DDBJVerEntry(accession) - # ==== getFASTA_DDBJSeqEntry(accession, start, end) - # ==== getFASTA_DADEntry(accession) - # ==== getFASTA_PIREntry(accession) - # ==== getFASTA_SWISSEntry(accession) - # ==== getFASTA_PDBEntry(accession) - # ==== getFASTA_PRFEntry(accession) - # ==== getFASTA_CDSEntry(accession) + # * getEntry(database, var, param1, param2) + # * getEntry(database, var) + # * getDDBJEntry(accession) + # * getDDBJCONEntry(accession) + # * getDDBJVerEntry(accession) + # * getLocus_DDBJEntry(locus) + # * getGene_DDBJEntry(gene) + # * getProd_DDBJEntry(products) + # * getPID_DDBJEntry(pid) + # * getClone_DDBJEntry(clone) + # * getXML_DDBJEntry(accession) + # * getEMBLEntry(accession) + # * getSWISSEntry(accession) + # * getPIREntry(accession) + # * getPRFEntry(accession) + # * getPDBEntry(accession) + # * getQVEntry(accession) + # * getDADEntry(accession) + # * getPID_DADEntry(pid) + # * getFASTA_DDBJEntry(accession) + # * getFASTA_DDBJCONEntry(accession) + # * getFASTA_DDBJVerEntry(accession) + # * getFASTA_DDBJSeqEntry(accession, start, end) + # * getFASTA_DADEntry(accession) + # * getFASTA_PIREntry(accession) + # * getFASTA_SWISSEntry(accession) + # * getFASTA_PDBEntry(accession) + # * getFASTA_PRFEntry(accession) + # * getFASTA_CDSEntry(accession) # # === References # # * http://xml.nig.ac.jp/doc/GetEntry.txt # class GetEntry < XML SERVER_URI = BASE_URI + "GetEntry.wsdl" - - # returns a Bio::DDBJ::XML::GetEntry object. - def initialize(wsdl = nil) - super(wsdl || SERVER_URI) - end end # === Gib # @@ -292,33 +256,28 @@ # puts serv.getFlatFile('Nost_PCC7120:pCC7120zeta') # puts serv.getFastaFile('Nost_PCC7120:pCC7120zeta', 'cdsaa') # # === WSDL Methods # - # ==== getOrganismList - # ==== getChIDList - # ==== getOrganismNameFromChid(chid) - # ==== getChIDFromOrganismName(orgName) - # ==== getAccession(chid) - # ==== getPieceNumber(chid) - # ==== getDivision(chid) - # ==== getType(chid) - # ==== getFlatFile(chid) - # ==== getFastaFile(chid, type) - # ==== getCDS(chid) + # * getOrganismList + # * getChIDList + # * getOrganismNameFromChid(chid) + # * getChIDFromOrganismName(orgName) + # * getAccession(chid) + # * getPieceNumber(chid) + # * getDivision(chid) + # * getType(chid) + # * getFlatFile(chid) + # * getFastaFile(chid, type) + # * getCDS(chid) # # === References # # * http://xml.nig.ac.jp/doc/Gib.txt # class Gib < XML SERVER_URI = BASE_URI + "Gib.wsdl" - - # returns a Bio::DDBJ::XML::Gib object. - def initialize(wsdl = nil) - super(wsdl || SERVER_URI) - end end # === Gtop # @@ -332,24 +291,19 @@ # puts serv.getOrganismList # puts serv.getMasterInfo('thrA', 'ecol0') # # === WSDL Methods # - # ==== getOrganismList - # ==== getMasterInfo(orfID, organism) + # * getOrganismList + # * getMasterInfo(orfID, organism) # # === References # # * http://xml.nig.ac.jp/doc/Gtop.txt # class Gtop < XML SERVER_URI = BASE_URI + "Gtop.wsdl" - - # returns a Bio::DDBJ::XML::Gtop object. - def initialize(wsdl = nil) - super(wsdl || SERVER_URI) - end end # === PML # @@ -362,28 +316,23 @@ # serv = Bio::DDBJ::XML::PML.new # puts serv.getVariation('1') # # === WSDL Methods # - # ==== searchVariation(field, query, order) - # ==== searchVariationSimple(field, query) - # ==== searchFrequency(field, query, order) - # ==== searchFrequencySimple(field, query) - # ==== getVariation(variation_id) - # ==== getFrequency(variation_id, population_id) + # * searchVariation(field, query, order) + # * searchVariationSimple(field, query) + # * searchFrequency(field, query, order) + # * searchFrequencySimple(field, query) + # * getVariation(variation_id) + # * getFrequency(variation_id, population_id) # # === References # # * http://xml.nig.ac.jp/doc/PML.txt # class PML < XML SERVER_URI = BASE_URI + "PML.wsdl" - - # returns a Bio::DDBJ::XML::PML object. - def initialize(wsdl = nil) - super(wsdl || SERVER_URI) - end end # === SRS # @@ -397,24 +346,19 @@ # puts serv.searchSimple('[pathway-des:sugar]') # puts serv.searchParam('[swissprot-des:cohesin]', '-f seq -sf fasta') # # === WSDL Methods # - # ==== searchSimple(query) - # ==== searchParam(query, param) + # * searchSimple(query) + # * searchParam(query, param) # # === Examples # # * http://xml.nig.ac.jp/doc/SRS.txt # class SRS < XML SERVER_URI = BASE_URI + "SRS.wsdl" - - # returns a Bio::DDBJ::XML::SRS object. - def initialize(wsdl = nil) - super(wsdl || SERVER_URI) - end end # === TxSearch # @@ -434,26 +378,21 @@ # rank = ["family", "genus"].join("\n") # puts serv.searchLineage(query, rank, 'Bacteria') # # === WSDL Methdos # - # ==== searchSimple(tx_Name) - # ==== searchParam(tx_Name, tx_Clas, tx_Rank, tx_Rmax, tx_Dcls) - # ==== getTxId(tx_Name) - # ==== getTxName(tx_Id) - # ==== searchLineage(query, ranks, superkingdom) + # * searchSimple(tx_Name) + # * searchParam(tx_Name, tx_Clas, tx_Rank, tx_Rmax, tx_Dcls) + # * getTxId(tx_Name) + # * getTxName(tx_Id) + # * searchLineage(query, ranks, superkingdom) # # === References # # * http://xml.nig.ac.jp/doc/TxSearch.txt # class TxSearch < XML SERVER_URI = BASE_URI + "TxSearch.wsdl" - - # returns a Bio::DDBJ::XML::TxSearch object. - def initialize(wsdl = nil) - super(wsdl || SERVER_URI) - end end end # XML end # DDBJ