Logo Search packages:      
Sourcecode: python-biopython version File versions

def Bio::EUtils::ThinClient::ThinClient::efetch_using_history (   self,
  db,
  webenv,
  query_key,
  retstart = 0,
  retmax = 20,
  retmode = None,
  rettype = None,
  seq_start = None,
  seq_stop = None,
  strand = None,
  complexity = None 
)

db, webenv, query_key, retstart=0, retmax=20, retmode=None, rettype=None, seq_start=None, seq_stop=None, strand=None, complexity=None

Fetch information for a collection of records in the history,
in a variety of formats.

'db' -- the database containing the history/collection
'webenv' -- the WebEnv cookie for the history
'query_key' -- the collection in the history
'retstart' -- get the formatted data starting with this position
'retmax' -- get data for at most this many records

These options work for sequence databases

'seq_start' -- return the sequence starting at this position.
       The first position is numbered 1
'seq_stop' -- return the sequence ending at this position
       Includes the stop position, so seq_start = 1 and
       seq_stop = 5 returns the first 5 bases/residues.
'strand' -- strand.  Use EUtils.PLUS_STRAND (== 1) for plus
       strand and EUtils.MINUS_STRAND (== 2) for negative
'complexity' -- regulates the level of display.  Options are
    0 - get the whole blob
    1 - get the bioseq for gi of interest (default in Entrez)
    2 - get the minimal bioseq-set containing the gi of interest
    3 - get the minimal nuc-prot containing the gi of interest
    4 - get the minimal pub-set containing the gi of interest

http://www.ncbi.nlm.nih.gov/entrez/query/static/efetchseq_help.html

The valid retmode and rettype values are

For publication databases (omim, pubmed, journals) the
retmodes are 'xml', 'asn.1', 'text', and 'html'.

  If retmode == xml     ---> XML (default)
  if retmode == asn.1   ---> ASN.1

  The following rettype values work for retmode == 'text'.
   
     docsum    ----> author / title / cite / PMID
     brief     ----> a one-liner up to about 66 chars
     abstract  ----> cite / title / author / dept /
                    full abstract / PMID
     citation  ----> cite / title / author / dept /
                    full abstract / MeSH terms /
                    substances / PMID
     medline   ----> full record in medline format
     asn.1     ----> full record in one ASN.1 format
     mlasn1    ----> full record in another ASN.1 format
     uilist    ----> list of uids, one per line
     sgml      ----> same as retmode="xml"

Sequence databases (genome, protein, nucleotide, popset)
also have retmode values of 'xml', 'asn.1', 'text', and
'html'.

  If retmode == 'xml'   ---> XML (default; only supports
                        rettype == 'native')
  If retmode == 'asn.1' ---> ASN.1 text (only works for rettype
                        of 'native' and 'sequin')

  The following work with a retmode of 'text' or 'html' 

     native    ----> Default format for viewing sequences
     fasta     ----> FASTA view of a sequence
     gb        ---->  GenBank view for sequences, constructed sequences
          will be shown as contigs (by pointing to its parts).
          Valid for nucleotides.
     gbwithparts --> GenBank view for sequences, the sequence will
          always be shown.  Valid for nucleotides.
     est       ----> EST Report.  Valid for sequences from
          dbEST database.
     gss       ----> GSS Report.  Valid for sequences from dbGSS
          database.
     gp        ----> GenPept view.  Valid for proteins.
     seqid     ----> To convert list of gis into list of seqids
     acc       ----> To convert list of gis into list of accessions

     # XXX TRY THESE
     fasta_xml
     gb_xml
     gi  (same as uilist?)

     

A retmode of 'file' is the same as 'text' except the data is
sent with a Content-Type of application/octet-stream, which tells
the browser to save the data to a file.

A retmode of 'html' is the same as 'text' except a HTML header
and footer are added and special character are properly escaped.

Returns an input stream from an HTTP request.  The stream
contents are in the requested format.

Definition at line 816 of file ThinClient.py.

                              :
        """db, webenv, query_key, retstart=0, retmax=20, retmode=None, rettype=None, seq_start=None, seq_stop=None, strand=None, complexity=None

        Fetch information for a collection of records in the history,
        in a variety of formats.

        'db' -- the database containing the history/collection
        'webenv' -- the WebEnv cookie for the history
        'query_key' -- the collection in the history
        'retstart' -- get the formatted data starting with this position
        'retmax' -- get data for at most this many records

        These options work for sequence databases

        'seq_start' -- return the sequence starting at this position.
               The first position is numbered 1
        'seq_stop' -- return the sequence ending at this position
               Includes the stop position, so seq_start = 1 and
               seq_stop = 5 returns the first 5 bases/residues.
        'strand' -- strand.  Use EUtils.PLUS_STRAND (== 1) for plus
               strand and EUtils.MINUS_STRAND (== 2) for negative
        'complexity' -- regulates the level of display.  Options are
            0 - get the whole blob
            1 - get the bioseq for gi of interest (default in Entrez)
            2 - get the minimal bioseq-set containing the gi of interest
            3 - get the minimal nuc-prot containing the gi of interest
            4 - get the minimal pub-set containing the gi of interest
        
        http://www.ncbi.nlm.nih.gov/entrez/query/static/efetchseq_help.html

        The valid retmode and rettype values are

        For publication databases (omim, pubmed, journals) the
        retmodes are 'xml', 'asn.1', 'text', and 'html'.
        
          If retmode == xml     ---> XML (default)
          if retmode == asn.1   ---> ASN.1

          The following rettype values work for retmode == 'text'.
           
             docsum    ----> author / title / cite / PMID
             brief     ----> a one-liner up to about 66 chars
             abstract  ----> cite / title / author / dept /
                                    full abstract / PMID
             citation  ----> cite / title / author / dept /
                                    full abstract / MeSH terms /
                                    substances / PMID
             medline   ----> full record in medline format
             asn.1     ----> full record in one ASN.1 format
             mlasn1    ----> full record in another ASN.1 format
             uilist    ----> list of uids, one per line
             sgml      ----> same as retmode="xml"

        Sequence databases (genome, protein, nucleotide, popset)
        also have retmode values of 'xml', 'asn.1', 'text', and
        'html'.

          If retmode == 'xml'   ---> XML (default; only supports
                                        rettype == 'native')
          If retmode == 'asn.1' ---> ASN.1 text (only works for rettype
                                        of 'native' and 'sequin')

          The following work with a retmode of 'text' or 'html' 

             native    ----> Default format for viewing sequences
             fasta     ----> FASTA view of a sequence
             gb        ---->  GenBank view for sequences, constructed sequences
                          will be shown as contigs (by pointing to its parts).
                          Valid for nucleotides.
             gbwithparts --> GenBank view for sequences, the sequence will
                          always be shown.  Valid for nucleotides.
             est       ----> EST Report.  Valid for sequences from
                          dbEST database.
             gss       ----> GSS Report.  Valid for sequences from dbGSS
                          database.
             gp        ----> GenPept view.  Valid for proteins.
             seqid     ----> To convert list of gis into list of seqids
             acc       ----> To convert list of gis into list of accessions

             # XXX TRY THESE
             fasta_xml
             gb_xml
             gi  (same as uilist?)

             
        
        A retmode of 'file' is the same as 'text' except the data is
        sent with a Content-Type of application/octet-stream, which tells
        the browser to save the data to a file.

        A retmode of 'html' is the same as 'text' except a HTML header
        and footer are added and special character are properly escaped.

        Returns an input stream from an HTTP request.  The stream
        contents are in the requested format.
        """

        # NOTE: found the list of possible values by sending illegal
        # parameters, to see which comes up as an error message.  Used
        # that to supplement the information from the documentation.
        # Looks like efetch is based on pmfetch code and uses the same
        # types.
        return self._get(program = "efetch.fcgi",
                         query = {"db": db,
                                  "WebEnv": webenv,
                                  "query_key": query_key,
                                  "retstart": retstart,
        # if retmax is specified, NCBI only returns 500 sequences (or whatever
        # you are fetching). Removing it from the URL relieves this constraint
        #                           "retmax": retmax,
                                  "retmode": retmode,
                                  "rettype": rettype,
                                  "seq_start": seq_start,
                                  "seq_stop": seq_stop,
                                  "strand": strand,
                                  "complexity": complexity,
                                  })
    def efetch_using_dbids(self,


Generated by  Doxygen 1.6.0   Back to index