-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Libary to interface with the Bioinformatics HTTP services - Entrez Ensembl -- -- BiobaseHTTP provides functions to interface the Bioinformatics REST -- services - Entrez Ensembl -- -- NCBI Entrez provides multiple different databases and eutils. -- -- For more information on Entrez refer to: -- http://www.ncbi.nlm.nih.gov/gquery/. -- -- Information on the webservice can be found at: -- http://www.ncbi.nlm.nih.gov/books/NBK25497/. If you plan to -- include the library in a tool, register it as explained here. -- -- Information on ENSEMBL genomes API can be found here: -- http://rest.ensemblgenomes.org/. -- -- BiobaseHTTP is the successor of the deprecated EntrezHTTP library. @package BiobaseHTTP @version 1.2.0 -- | Interface for Ensembl module Biobase.Ensembl.HTTP startXRefSession :: Text -> Text -> IO (Either String [EnsemblEntry]) requestGOTermsWithGeneIds :: [Text] -> IO [(Text, [Text])] requestUniProtWithGeneIds :: [Text] -> IO [(Text, Text)] data EnsemblEntry EnsemblEntry :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> [Text] -> Maybe Text -> Maybe Text -> Maybe Text -> EnsemblEntry [display_id] :: EnsemblEntry -> Maybe Text [primary_id] :: EnsemblEntry -> Maybe Text [version] :: EnsemblEntry -> Maybe Text [description] :: EnsemblEntry -> Maybe Text [dbname] :: EnsemblEntry -> Maybe Text [synonyms] :: EnsemblEntry -> [Text] [info_text] :: EnsemblEntry -> Maybe Text [info_type] :: EnsemblEntry -> Maybe Text [db_display_name] :: EnsemblEntry -> Maybe Text -- | Data structures for Entrez HTTP queries module Biobase.Entrez.HTTPData -- | 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 newtype 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 newtype 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 GHC.Classes.Eq Biobase.Entrez.HTTPData.EntrezSearch instance GHC.Show.Show Biobase.Entrez.HTTPData.EntrezSearch instance GHC.Classes.Eq Biobase.Entrez.HTTPData.TranslationStack instance GHC.Show.Show Biobase.Entrez.HTTPData.TranslationStack instance GHC.Classes.Eq Biobase.Entrez.HTTPData.TermSet instance GHC.Show.Show Biobase.Entrez.HTTPData.TermSet instance GHC.Classes.Eq Biobase.Entrez.HTTPData.EntrezGeneSummary instance GHC.Show.Show Biobase.Entrez.HTTPData.EntrezGeneSummary instance GHC.Classes.Eq Biobase.Entrez.HTTPData.EntrezGeneDocSummary instance GHC.Show.Show Biobase.Entrez.HTTPData.EntrezGeneDocSummary instance GHC.Classes.Eq Biobase.Entrez.HTTPData.EntrezGenomicInfo instance GHC.Show.Show Biobase.Entrez.HTTPData.EntrezGenomicInfo instance GHC.Classes.Eq Biobase.Entrez.HTTPData.EntrezSummary instance GHC.Show.Show Biobase.Entrez.HTTPData.EntrezSummary instance GHC.Classes.Eq Biobase.Entrez.HTTPData.EntrezDocSum instance GHC.Show.Show Biobase.Entrez.HTTPData.EntrezDocSum instance GHC.Classes.Eq Biobase.Entrez.HTTPData.SummaryItem instance GHC.Show.Show Biobase.Entrez.HTTPData.SummaryItem instance GHC.Classes.Eq Biobase.Entrez.HTTPData.EntrezHTTPQuery instance GHC.Show.Show Biobase.Entrez.HTTPData.EntrezHTTPQuery -- | 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. -- --

Usage example:

-- -- Retrieve a nucleotide sequence for Escherichia coli -- --
--   nucleotideFasta <- fetchNucleotideString "NC_000913.3" 50 1000 "+" Nothing
--   
module Biobase.Entrez.HTTP -- | 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