Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(161)  |  Call(161)  |  Derive(0)  |  Import(0)

src/i/v/ivy-phylo-20120228/ivy/genbank.py   ivy-phylo(Download)
        retmax=len(gilist)
        )
    d = Entrez.read(h)
    return d["WebEnv"], d["QueryKey"]
 
    h = Entrez.elink(dbfrom='taxonomy', db='nucleotide', from_uid=gi,
                     LinkName='nucleotide_taxonomy')
    r = Entrez.read(h)[0]
    h.close()
    i = r['LinkSetDb'][0]['Link'][0]['Id']
    h = Entrez.efetch(db='taxonomy', id=i, retmode='xml')
    r = Entrez.read(h)[0]
    Entrez.email = email
    h = Entrez.esearch(db="nucleotide", term=ac, retmax=1)
    d = Entrez.read(h)['IdList'][0]
    h.close()
    return d
            usehistory="y"
            )
        d = Entrez.read(h)
        h.close()
        h = Entrez.efetch(db="nucleotide", rettype="gb", retmax=len(v),

src/c/l/clusterDbAnalysis-HEAD/scripts/downloadGenbankFromNCBI.py   clusterDbAnalysis(Download)
    # The default limit of 20 entries returned is not sufficient for incomplete genomes
    # which can have > 100 contigs. I think 1000 is a reasonable limit...
    genomeIDs = Entrez.read(Entrez.esearch(db="nucleotide", term = term, retmax=1000))
    nucIDs = nucIDs + genomeIDs['IdList']
    #make unique (should be already)
def accession_to_strainID(accession, return_nucID = True):
    nucID  = accessionID_to_genbankIDs(accession)
    strainIDs=[]
    summaries = Entrez.read(Entrez.esummary(db="nucleotide", id=nucID))
    for s in summaries:
def accessionID_to_genbankIDs(accession):
    '''Search NCBI for the ID (the unique numerical key) for a specific genbank file from an accession ID'''
    genbank = Entrez.read(Entrez.esearch(db="nucleotide", term=accession))
    IDlist = genbank['IdList']
    #TODO: find the most recent version?
        sys.stderr.write("Querying NCBI with query: %s\n" %(query))
        # The default retmax is 20 which is way too few for some queries...
        NCBIdata = Entrez.read(Entrez.esearch(db="taxonomy", term=query, retmax=10000))
        #there can me multiple records returned
        taxon_strainIDs = NCBIdata['IdList']
def NCBIversion(db):
    '''Print the current version of NCBI used to download the genbank info'''
    # The validate keyword only exists in new versions of biopython
    record = Entrez.read(Entrez.einfo(db=db))
    update = record["DbInfo"]["LastUpdate"]

src/d/e/denigma-HEAD/denigma/library.py   denigma(Download)
    while not counts:
        #print terms
        records = Entrez.read(Entrez.esearch(db='pubmed', term=' '.join(terms)))
        counts = int(records['Count'])
        print("counts = %s" % counts)
    def summary(self, id, printing=False):
        handle = Entrez.esummary(db='pubmed', id=id)
        r = Entrez.read(handle)
        #print r[0]
        if printing:
    def search(self, term, id=None, db='pubmed', add=False):
        if not id:
            handle = Entrez.esearch(db=db, term=term)
            record = Entrez.read(handle)
            #print "Found %s publications" % record['Count']
    def related(self, top=5):
        """Retrieves related references, but does not add them."""
        self.relations = []
        record = Entrez.read(Entrez.elink(dbfrom="pubmed", id=self.pmid))
        #print record
    def cited(self, top=5):
        """Retrieves publiction which cite this reference."""
        self.citations = []
        pmcids = Entrez.read(Entrez.elink(dbfrom="pubmed", db="pmc",
                                           LinkName="pubmed_pmc_refs",

src/g/e/genotyping_23andme-HEAD/pubmed_crawler.py   genotyping_23andme(Download)
 
			handle  = Entrez.esearch(db="pubmed", term=single_snp.name)	
			results = Entrez.read(handle)								#Get all papers for the SNP
			print snp_counter,
 
			if results["IdList"] != []:								#If papers are found for SNP:
				for single_paper in results["IdList"]:
					try:
						summary_handle = Entrez.esummary(db="pubmed", id=single_paper)	 #Get summary
						summary = Entrez.read(summary_handle)
							try:
								detail_handle = Entrez.efetch(db="pubmed",id=single_paper,retmode="xml")
								details = Entrez.read(detail_handle)
								try:
									paper.abstract = str(details[0]["MedlineCitation"]["Article"]["Abstract"]["AbstractText"])

src/p/h/phyloGenerator-HEAD/phyloGenerator.py   phyloGenerator(Download)
        try:
            handleDownload = Entrez.efetch(db="taxonomy", id=taxonID, retmode="xml")
            resultsDownload = Entrez.read(handleDownload)
            handleDownload.close()
            finished = maxCheck + 1
        try:
            handleSearch = Entrez.esearch(db="taxonomy", term=spName)
            resultsSearch = Entrez.read(handleSearch)
            handleSearch.close()
            finished = maxCheck + 1
        try:
            handleSearch = Entrez.esearch(db="taxonomy", term=searchTerm)
            resultsSearch = Entrez.read(handleSearch)
            finished = maxCheck + 1
        except:
    try:
        handleSpName = Entrez.esearch(db="taxonomy", term=spName)
        resultsSpName = Entrez.read(handleSpName)
        handleSpName.close()
        handleID = Entrez.efetch(db="taxonomy", id=resultsSpName['IdList'], retmode="xml")
        resultsSpID = Entrez.read(handleID)

src/p/y/PyCon2013_SNA-HEAD/src/pubmed/pubmed.py   PyCon2013_SNA(Download)
def get_number_of_records(term):
    handle = Entrez.egquery(term=term)
    record = Entrez.read(handle)
    for row in record["eGQueryResult"]:
        if row["DbName"]=="pubmed":
def get_article_ids(term):
    num_records=get_number_of_records(term)
    handle = Entrez.esearch(db="pubmed", term=term, retmax=num_records)
    record = Entrez.read(handle)
    idlist = record["IdList"]

src/d/e/denigma-HEAD/denigma/apps/experts/templatetags/publications.py   denigma(Download)
def medline(author):
    """Fetches all publications of an author using the name."""
    results = {}
    name = " ".join([author.last_name, author.first_name[0]+(author.middle_name or [''])[0]])
    r = Entrez.read(Entrez.esearch(db='pubmed', term=name))
    if r['IdList']:
        records = Entrez.read(Entrez.esummary(db="pubmed", id=",".join(r['IdList'])))

src/b/i/biopython-HEAD/Scripts/query_pubmed.py   biopython(Download)
    else:
        handle = Entrez.esearch(db="pubmed", term=query, usehistory="Y")
    search_results = Entrez.read(handle)
    ids = search_results["IdList"]
    count = len(ids)

src/b/i/biopython-1.63/Scripts/query_pubmed.py   biopython(Download)
    else:
        handle = Entrez.esearch(db="pubmed", term=query, usehistory="Y")
    search_results = Entrez.read(handle)
    ids = search_results["IdList"]
    count = len(ids)

src/d/e/denigma-HEAD/denigma/apps/datasets/models.py   denigma(Download)
                    handle = Entrez.esearch(db='pubmed', term=self.title)
                    print "Got handle"
                    record = Entrez.read(handle)
                    print "Got record", record
                    print record['Count'], type(record['Count'])
          try:
            handle = Entrez.esummary(db="pubmed", id=self.pmid)
            r = Entrez.read(handle)
            # print r
            r = r[0] #  reference.

  1 | 2 | 3 | 4 | 5  Next