-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Libary to interface with the NCBI Entrez REST service. -- @package EntrezHTTP @version 1.0.0 -- | Data structures for Entrez HTTP queries module Bio.EntrezHTTPData -- | Input datastructure for EntrezHTTP. Program is the selected eutility -- (e.g efetch, esearch), database is the selected Entrez database -- (nucleotide) and query the query string. data EntrezHTTPQuery EntrezHTTPQuery :: Maybe String -> Maybe String -> String -> EntrezHTTPQuery program :: EntrezHTTPQuery -> Maybe String database :: EntrezHTTPQuery -> Maybe String query :: EntrezHTTPQuery -> String -- | Data structure for Entrez summary result data EntrezSummary EntrezSummary :: [EntrezDocSum] -> EntrezSummary documentSummaries :: EntrezSummary -> [EntrezDocSum] data EntrezDocSum EntrezDocSum :: String -> [SummaryItem] -> EntrezDocSum summaryId :: EntrezDocSum -> String summaryItems :: EntrezDocSum -> [SummaryItem] data SummaryItem SummaryItem :: String -> String -> String -> SummaryItem itemName :: SummaryItem -> String itemType :: SummaryItem -> String itemContent :: SummaryItem -> String -- | Gene doc summary data EntrezGeneSummary EntrezGeneSummary :: [EntrezGeneDocSummary] -> EntrezGeneSummary geneSummaries :: EntrezGeneSummary -> [EntrezGeneDocSummary] data EntrezGeneDocSummary EntrezGeneDocSummary :: String -> String -> String -> String -> String -> String -> EntrezGenomicInfo -> EntrezGeneDocSummary geneId :: EntrezGeneDocSummary -> String geneName :: EntrezGeneDocSummary -> String geneStatus :: EntrezGeneDocSummary -> String geneCurrentID :: EntrezGeneDocSummary -> String geneGeneticSource :: EntrezGeneDocSummary -> String geneOtherAliases :: EntrezGeneDocSummary -> String geneGenomicInfo :: EntrezGeneDocSummary -> EntrezGenomicInfo data EntrezGenomicInfo EntrezGenomicInfo :: String -> Int -> Int -> Int -> EntrezGenomicInfo chrAccVer :: EntrezGenomicInfo -> String chrStart :: EntrezGenomicInfo -> Int chrStop :: EntrezGenomicInfo -> Int exonCount :: EntrezGenomicInfo -> Int -- | Data structure for Entrez search result data EntrezSearch EntrezSearch :: Int -> Int -> Int -> [Int] -> [TranslationStack] -> String -> EntrezSearch count :: EntrezSearch -> Int retMax :: EntrezSearch -> Int retStart :: EntrezSearch -> Int searchIds :: EntrezSearch -> [Int] translationStack :: EntrezSearch -> [TranslationStack] queryTranslation :: EntrezSearch -> String data TranslationStack TranslationStack :: [TermSet] -> String -> TranslationStack termSets :: TranslationStack -> [TermSet] operation :: TranslationStack -> String data TermSet TermSet :: String -> String -> Int -> String -> TermSet term :: TermSet -> String field :: TermSet -> String termCount :: TermSet -> Int explode :: TermSet -> String instance Show EntrezHTTPQuery instance Eq EntrezHTTPQuery instance Show SummaryItem instance Eq SummaryItem instance Show EntrezDocSum instance Eq EntrezDocSum instance Show EntrezSummary instance Eq EntrezSummary instance Show EntrezGenomicInfo instance Eq EntrezGenomicInfo instance Show EntrezGeneDocSummary instance Eq EntrezGeneDocSummary instance Show EntrezGeneSummary instance Eq EntrezGeneSummary instance Show TermSet instance Eq TermSet instance Show TranslationStack instance Eq TranslationStack instance Show EntrezSearch instance Eq EntrezSearch -- | Interface for the NCBI Entrez REST webservice. -- -- The entrezHTTP function provides a interface to the NCBI Entrez REST -- service. -- -- A series of different eutilites and databases are provided by the REST -- interface. Response depends on the combination of eutil and database, -- as well requested returntype. Specific combinations have wrapper -- functions with corresponding parsing functions included (see Usage -- example). -- -- If you use this libary in a tool, please read A General -- Introduction to the E-utilities carefully and register your tool -- at eutilities@ncbi.nlm.nih.gov. You can append your registration info -- generated with the included buildRegistration function to your query. -- --
-- nucleotideFasta <- fetchNucleotideString "NC_000913.3" 50 1000 "+" Nothing --module Bio.EntrezHTTP -- | Function for querying the NCBI entrez REST interface. Input -- EntrezHTTPQuery datatype is used to select database, program of -- interest and contains the query string. Please note that query strings -- containing whitespace or special characters need to be urlencoded. The -- response format and content depends on the query type, the output -- therefore provided as String. entrezHTTP :: EntrezHTTPQuery -> IO String -- | Retrieve sequence for gene symbol (e.g. yhfA) from accession number -- (e.g. NC_000913.3) and if available entrez registration -- (toolname,devemail) retrieveGeneSymbolFasta :: String -> String -> Maybe (String, String) -> IO String -- | Fetches sequence strings from the nucleotide database. nucleotideId -- can be a NCBI accession number or gene id. Strand is 1 in case of plus -- strand (forward) or 2 minus (reverse) strand, the setStrand function -- can be used for conversion. fetchNucleotideString :: String -> Int -> Int -> Int -> Maybe (String, String) -> IO String -- | Wrapper function for eutils that accept a list of querys (e.g. a list -- of gene ids) that ensures that only chunks of 20 queries are sent per -- request. Sending to long queries otherwise results in a serverside -- exception. retrieveElementsEntrez :: [a] -> ([a] -> IO b) -> IO [b] portionListElements :: [a] -> Int -> [[a]] -- | Read entrez fetch for taxonomy database into a simplyfied datatype -- Result of e.g: http://eutils.ncbi.nlm.nih. readEntrezTaxonSet :: String -> [Taxon] -- | Read entrez fetch for taxonomy database into a simplyfied datatype -- Result of e.g: -- http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=taxonomy&id=1406860 readEntrezSimpleTaxons :: String -> [SimpleTaxon] readEntrezParentIds :: String -> [Int] -- | Read entrez summary from internal haskell string readEntrezSummaries :: String -> [EntrezSummary] -- | Read entrez summary from internal haskell string readEntrezSearch :: String -> [EntrezSearch] -- | Builds Entrez registration String that has to be appended to query key buildRegistration :: String -> String -> String -- | Builds Entrez registration String if present maybeBuildRegistration :: Maybe (String, String) -> String setStrand :: String -> Int convertCoordinatesToStrand :: Int -> Int -> Int