Repository 'ncbi_eutils_epost'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/ncbi_eutils_epost

Changeset 1:196b8dd07896 (2018-10-30)
Previous changeset 0:18e6b25259ff (2016-07-07) Next changeset 2:7d868844e952 (2020-03-11)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ncbi_entrez_eutils commit a4b0969b33a68a0ea9ba12291f6694aec24f13ed
modified:
__efetch_build_options.py
ecitmatch.py
efetch.py
egquery.py
einfo.py
elink.py
epost.py
esearch.py
esummary.py
eutils.py
macros.xml
test-data/egquery.1.xml
test-data/esearch.pubmed.2014-01-pnas.xml
test-data/esearch.pubmed.xml
test-data/esummary.tax.xml
test-data/pm-tax-neighbor.xml
test-data/pubmed.metadata.xml
test-data/viruses.tax.xml
added:
__pycache__/eutils.cpython-35.pyc
removed:
eutils.pyc
tool_dependencies.xml
b
diff -r 18e6b25259ff -r 196b8dd07896 __efetch_build_options.py
--- a/__efetch_build_options.py Thu Jul 07 02:40:33 2016 -0400
+++ b/__efetch_build_options.py Tue Oct 30 19:10:51 2018 -0400
[
@@ -1,6 +1,8 @@
 #!/usr/bin/env python
 # Daniel Blankenberg
 # Creates the options for tool interface
+from __future__ import print_function
+
 import re
 
 # http://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi
@@ -164,7 +166,7 @@
 
 section = None
 for line in help:
-    line = re.split('\s{2,}', line.strip())
+    line = re.split(r'\s{2,}', line.strip())
     # Ignore empties
     if len(line) == 0:
         continue
@@ -214,9 +216,9 @@
 
 format_names = {}
 
-print '''  <xml name="db">
+print('''  <xml name="db">
     <conditional name="db">
-      <expand macro="dbselect" />'''
+      <expand macro="dbselect" />''')
 for key in sorted(db):
     format_options = []
 
@@ -233,13 +235,13 @@
 
         format_names[format_string] = format_modifier
 
-    print WHEN_TPL.format(
+    print(WHEN_TPL.format(
         format=key,
         format_options='\n          '.join(format_options)
-    )
+    ))
 
-print '''    </conditional>
-  </xml>'''
+print('''    </conditional>
+  </xml>''')
 
 CHANGE_FORMAT_TPL = '''
   <xml name="efetch_formats">
@@ -264,4 +266,4 @@
         key=k, value=v
     ))
 
-print CHANGE_FORMAT_TPL.format(formats='\n      '.join(whens))
+print(CHANGE_FORMAT_TPL.format(formats='\n      '.join(whens)))
b
diff -r 18e6b25259ff -r 196b8dd07896 __pycache__/eutils.cpython-35.pyc
b
Binary file __pycache__/eutils.cpython-35.pyc has changed
b
diff -r 18e6b25259ff -r 196b8dd07896 ecitmatch.py
--- a/ecitmatch.py Thu Jul 07 02:40:33 2016 -0400
+++ b/ecitmatch.py Tue Oct 30 19:10:51 2018 -0400
[
@@ -1,5 +1,8 @@
 #!/usr/bin/env python
+from __future__ import print_function
+
 import argparse
+
 import eutils
 
 
@@ -48,7 +51,7 @@
                         'key': tmp[5],
                     })
                 except KeyError:
-                    print "Could not parse line: %s" % line
+                    print("Could not parse line: %s" % line)
 
     payload = {
         'db': 'pubmed',
@@ -57,4 +60,4 @@
 
     results = c.citmatch(**payload)
     # We get data back as pipe separated, so just replace those with tabs
-    print results.replace('|', '\t')
+    print(results.replace('|', '\t'))
b
diff -r 18e6b25259ff -r 196b8dd07896 efetch.py
--- a/efetch.py Thu Jul 07 02:40:33 2016 -0400
+++ b/efetch.py Tue Oct 30 19:10:51 2018 -0400
b
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 import argparse
+
 import eutils
 
 
b
diff -r 18e6b25259ff -r 196b8dd07896 egquery.py
--- a/egquery.py Thu Jul 07 02:40:33 2016 -0400
+++ b/egquery.py Tue Oct 30 19:10:51 2018 -0400
b
@@ -1,5 +1,8 @@
 #!/usr/bin/env python
+from __future__ import print_function
+
 import argparse
+
 import eutils
 
 
@@ -17,4 +20,4 @@
         'term': args.term,
     }
     results = c.gquery(**payload)
-    print results
+    print(results)
b
diff -r 18e6b25259ff -r 196b8dd07896 einfo.py
--- a/einfo.py Thu Jul 07 02:40:33 2016 -0400
+++ b/einfo.py Tue Oct 30 19:10:51 2018 -0400
[
@@ -1,5 +1,8 @@
 #!/usr/bin/env python
+from __future__ import print_function
+
 import argparse
+
 import eutils
 
 
@@ -15,4 +18,4 @@
     if args.db is not None:
         payload['db'] = args.db
         payload['version'] = '2.0'
-    print c.info(**payload)
+    print(c.info(**payload))
b
diff -r 18e6b25259ff -r 196b8dd07896 elink.py
--- a/elink.py Thu Jul 07 02:40:33 2016 -0400
+++ b/elink.py Tue Oct 30 19:10:51 2018 -0400
b
@@ -1,4 +1,6 @@
 #!/usr/bin/env python
+from __future__ import print_function
+
 import argparse
 import json
 
@@ -56,4 +58,4 @@
         history = c.extract_history(results)
         args.history_out.write(json.dumps(history, indent=4))
 
-    print results
+    print(results)
b
diff -r 18e6b25259ff -r 196b8dd07896 epost.py
--- a/epost.py Thu Jul 07 02:40:33 2016 -0400
+++ b/epost.py Tue Oct 30 19:10:51 2018 -0400
[
@@ -1,5 +1,8 @@
 #!/usr/bin/env python
+from __future__ import print_function
+
 import argparse
+
 import eutils
 
 
@@ -24,4 +27,4 @@
         payload['id'] = ','.join(merged_ids)
         payload['WebEnv'] = ''
 
-    print c.post(args.db, **payload)
+    print(c.post(args.db, **payload))
b
diff -r 18e6b25259ff -r 196b8dd07896 esearch.py
--- a/esearch.py Thu Jul 07 02:40:33 2016 -0400
+++ b/esearch.py Tue Oct 30 19:10:51 2018 -0400
b
@@ -1,6 +1,9 @@
 #!/usr/bin/env python
+from __future__ import print_function
+
+import argparse
 import json
-import argparse
+
 import eutils
 
 
@@ -44,4 +47,4 @@
         history = c.extract_history(results)
         args.history_out.write(json.dumps(history, indent=4))
 
-    print results
+    print(results)
b
diff -r 18e6b25259ff -r 196b8dd07896 esummary.py
--- a/esummary.py Thu Jul 07 02:40:33 2016 -0400
+++ b/esummary.py Tue Oct 30 19:10:51 2018 -0400
[
@@ -1,5 +1,8 @@
 #!/usr/bin/env python
+from __future__ import print_function
+
 import argparse
+
 import eutils
 
 
@@ -26,4 +29,4 @@
     else:
         payload['id'] = ','.join(merged_ids)
 
-    print c.summary(**payload)
+    print(c.summary(**payload))
b
diff -r 18e6b25259ff -r 196b8dd07896 eutils.py
--- a/eutils.py Thu Jul 07 02:40:33 2016 -0400
+++ b/eutils.py Tue Oct 30 19:10:51 2018 -0400
b
@@ -1,7 +1,9 @@
+import json
 import os
-import json
-import StringIO
+
 from Bio import Entrez
+from six import StringIO
+
 Entrez.tool = "GalaxyEutils_1_0"
 BATCH_SIZE = 200
 
b
diff -r 18e6b25259ff -r 196b8dd07896 eutils.pyc
b
Binary file eutils.pyc has changed
b
diff -r 18e6b25259ff -r 196b8dd07896 macros.xml
--- a/macros.xml Thu Jul 07 02:40:33 2016 -0400
+++ b/macros.xml Tue Oct 30 19:10:51 2018 -0400
b
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <macros>
-  <token name="@WRAPPER_VERSION@">1.1</token>
+  <token name="@WRAPPER_VERSION@">1.2</token>
   <token name="@EMAIL_ARGUMENTS@">
 --user_email "$__user_email__"
 #set admin_emails = ';'.join(str($__admin_users__).split(','))
@@ -50,9 +50,9 @@
 materials. Please consult your legal counsel. If you wish to do a large
 data mining project on PubMed data, you can enter into a licensing
 agreement and lease the data for free from NLM. For more information on
-this please see `http://www.nlm.nih.gov/databases/leased.html <http://www.nlm.nih.gov/databases/leased.html>`__
+this please see `https://www.nlm.nih.gov/databases/download/data_distrib_main.html <https://www.nlm.nih.gov/databases/download/data_distrib_main.html>`__
 
-The `full disclaimer <http://www.ncbi.nlm.nih.gov/About/disclaimer.html>`__ is available on
+The `full disclaimer <https://www.ncbi.nlm.nih.gov/home/about/policies/>`__ is available on
 their website
 
 Liability
@@ -829,19 +829,19 @@
           title = {Entrez Programming Utilities Help},
           year = {2010},
           publisher = {National Center for Biotechnology Information, Bethesda, Maryland},
-          note = {http://ww.ncbi.nlm.nih.gov/books/NBK25500/}
+          note = {https://www.ncbi.nlm.nih.gov/books/NBK25500/}
       }</citation>
     </citations>
   </xml>
   <xml name="requirements">
     <requirements>
-      <requirement type="package" version="2.7">python</requirement>
-      <requirement type="package" version="1.66">biopython</requirement>
+      <requirement type="package" version="1.68">biopython</requirement>
+      <requirement type="package" version="1.10">six</requirement>
     </requirements>
   </xml>
   <xml name="linkname">
     <param name="linkname" type="select" label="To NCBI Database">
-        <!-- TODO: http://eutils.ncbi.nlm.nih.gov/entrez/query/static/entrezlinks.html -->
+        <!-- TODO: https://eutils.ncbi.nlm.nih.gov/entrez/query/static/entrezlinks.html -->
     </param>
   </xml>
 </macros>
b
diff -r 18e6b25259ff -r 196b8dd07896 test-data/egquery.1.xml
--- a/test-data/egquery.1.xml Thu Jul 07 02:40:33 2016 -0400
+++ b/test-data/egquery.1.xml Tue Oct 30 19:10:51 2018 -0400
b
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE Result PUBLIC "-//NLM//DTD eSearchResult, January 2004//EN" "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/egquery.dtd">
+<!DOCTYPE Result PUBLIC "-//NLM//DTD eSearchResult, January 2004//EN" "https://www.ncbi.nlm.nih.gov/entrez/query/DTD/egquery.dtd">
 <Result>
    
     <Term>bacteriophage</Term>
b
diff -r 18e6b25259ff -r 196b8dd07896 test-data/esearch.pubmed.2014-01-pnas.xml
--- a/test-data/esearch.pubmed.2014-01-pnas.xml Thu Jul 07 02:40:33 2016 -0400
+++ b/test-data/esearch.pubmed.2014-01-pnas.xml Tue Oct 30 19:10:51 2018 -0400
[
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE eSearchResult PUBLIC "-//NLM//DTD esearch 20060628//EN" "http://eutils.ncbi.nlm.nih.gov/eutils/dtd/20060628/esearch.dtd">
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE eSearchResult PUBLIC "-//NLM//DTD esearch 20060628//EN" "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20060628/esearch.dtd">
 <eSearchResult><Count>524</Count><RetMax>20</RetMax><RetStart>0</RetStart><IdList>
 <Id>24620368</Id>
 <Id>24613929</Id>
@@ -21,5 +21,5 @@
 <Id>24481252</Id>
 <Id>24477693</Id>
 <Id>24477692</Id>
-</IdList><TranslationSet><Translation>     <From>PNAS[ta]</From>     <To>"Proc Natl Acad Sci U S A"[Journal]</To>    </Translation></TranslationSet><TranslationStack>   <TermSet>    <Term>"Proc Natl Acad Sci U S A"[Journal]</Term>    <Field>Journal</Field>    <Count>124812</Count>    <Explode>N</Explode>   </TermSet>   <TermSet>    <Term>2014/01/01[PDAT]</Term>    <Field>PDAT</Field>    <Count>0</Count>    <Explode>N</Explode>   </TermSet>   <TermSet>    <Term>2014/02/01[PDAT]</Term>    <Field>PDAT</Field>    <Count>0</Count>    <Explode>N</Explode>   </TermSet>   <OP>RANGE</OP>   <OP>AND</OP>  </TranslationStack><QueryTranslation>"Proc Natl Acad Sci U S A"[Journal] AND 2014/01/01[PDAT] : 2014/02/01[PDAT]</QueryTranslation></eSearchResult>
+</IdList><TranslationSet><Translation>     <From>PNAS[ta]</From>     <To>"Proc Natl Acad Sci U S A"[Journal]</To>    </Translation></TranslationSet><TranslationStack>   <TermSet>    <Term>"Proc Natl Acad Sci U S A"[Journal]</Term>    <Field>Journal</Field>    <Count>127235</Count>    <Explode>N</Explode>   </TermSet>   <TermSet>    <Term>2014/01/01[PDAT]</Term>    <Field>PDAT</Field>    <Count>0</Count>    <Explode>N</Explode>   </TermSet>   <TermSet>    <Term>2014/02/01[PDAT]</Term>    <Field>PDAT</Field>    <Count>0</Count>    <Explode>N</Explode>   </TermSet>   <OP>RANGE</OP>   <OP>AND</OP>  </TranslationStack><QueryTranslation>"Proc Natl Acad Sci U S A"[Journal] AND 2014/01/01[PDAT] : 2014/02/01[PDAT]</QueryTranslation></eSearchResult>
 
b
diff -r 18e6b25259ff -r 196b8dd07896 test-data/esearch.pubmed.xml
--- a/test-data/esearch.pubmed.xml Thu Jul 07 02:40:33 2016 -0400
+++ b/test-data/esearch.pubmed.xml Tue Oct 30 19:10:51 2018 -0400
[
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE eSearchResult PUBLIC "-//NLM//DTD esearch 20060628//EN" "http://eutils.ncbi.nlm.nih.gov/eutils/dtd/20060628/esearch.dtd">
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE eSearchResult PUBLIC "-//NLM//DTD esearch 20060628//EN" "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20060628/esearch.dtd">
 <eSearchResult><Count>2651</Count><RetMax>20</RetMax><RetStart>0</RetStart><IdList>
 <Id>16578858</Id>
 <Id>11186225</Id>
@@ -21,5 +21,5 @@
 <Id>11121066</Id>
 <Id>11121065</Id>
 <Id>11121064</Id>
-</IdList><TranslationSet><Translation>     <From>PNAS[ta]</From>     <To>"Proc Natl Acad Sci U S A"[Journal]</To>    </Translation></TranslationSet><TranslationStack>   <TermSet>    <Term>"Proc Natl Acad Sci U S A"[Journal]</Term>    <Field>Journal</Field>    <Count>124812</Count>    <Explode>N</Explode>   </TermSet>   <TermSet>    <Term>97[vi]</Term>    <Field>vi</Field>    <Count>77218</Count>    <Explode>N</Explode>   </TermSet>   <OP>AND</OP>   <OP>GROUP</OP>  </TranslationStack><QueryTranslation>"Proc Natl Acad Sci U S A"[Journal] AND 97[vi]</QueryTranslation></eSearchResult>
+</IdList><TranslationSet><Translation>     <From>PNAS[ta]</From>     <To>"Proc Natl Acad Sci U S A"[Journal]</To>    </Translation></TranslationSet><TranslationStack>   <TermSet>    <Term>"Proc Natl Acad Sci U S A"[Journal]</Term>    <Field>Journal</Field>    <Count>127235</Count>    <Explode>N</Explode>   </TermSet>   <TermSet>    <Term>97[vi]</Term>    <Field>vi</Field>    <Count>78776</Count>    <Explode>N</Explode>   </TermSet>   <OP>AND</OP>   <OP>GROUP</OP>  </TranslationStack><QueryTranslation>"Proc Natl Acad Sci U S A"[Journal] AND 97[vi]</QueryTranslation></eSearchResult>
 
b
diff -r 18e6b25259ff -r 196b8dd07896 test-data/esummary.tax.xml
--- a/test-data/esummary.tax.xml Thu Jul 07 02:40:33 2016 -0400
+++ b/test-data/esummary.tax.xml Tue Oct 30 19:10:51 2018 -0400
b
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE eSummaryResult PUBLIC "-//NLM//DTD esummary v1 20041029//EN" "http://eutils.ncbi.nlm.nih.gov/eutils/dtd/20041029/esummary-v1.dtd">
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE eSummaryResult PUBLIC "-//NLM//DTD esummary v1 20041029//EN" "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20041029/esummary-v1.dtd">
 <eSummaryResult>
 <DocSum>
  <Id>10239</Id>
@@ -13,7 +13,7 @@
  <Item Name="Genus" Type="String"></Item>
  <Item Name="Species" Type="String"></Item>
  <Item Name="Subsp" Type="String"></Item>
- <Item Name="ModificationDate" Type="Date">2010/11/23 00:00</Item>
+ <Item Name="ModificationDate" Type="Date">2017/06/14 00:00</Item>
 </DocSum>
 
 </eSummaryResult>
b
diff -r 18e6b25259ff -r 196b8dd07896 test-data/pm-tax-neighbor.xml
--- a/test-data/pm-tax-neighbor.xml Thu Jul 07 02:40:33 2016 -0400
+++ b/test-data/pm-tax-neighbor.xml Tue Oct 30 19:10:51 2018 -0400
b
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE eLinkResult PUBLIC "-//NLM//DTD elink 20101123//EN" "http://eutils.ncbi.nlm.nih.gov/eutils/dtd/20101123/elink.dtd">
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE eLinkResult PUBLIC "-//NLM//DTD elink 20101123//EN" "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20101123/elink.dtd">
 <eLinkResult>
 
   <LinkSet>
b
diff -r 18e6b25259ff -r 196b8dd07896 test-data/pubmed.metadata.xml
--- a/test-data/pubmed.metadata.xml Thu Jul 07 02:40:33 2016 -0400
+++ b/test-data/pubmed.metadata.xml Tue Oct 30 19:10:51 2018 -0400
b
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE eInfoResult PUBLIC "-//NLM//DTD einfo 20130322//EN" "http://eutils.ncbi.nlm.nih.gov/eutils/dtd/20130322/einfo.dtd">
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE eInfoResult PUBLIC "-//NLM//DTD einfo 20130322//EN" "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20130322/einfo.dtd">
 <eInfoResult>
  <DbInfo>
  <DbName>pubmed</DbName>
b
diff -r 18e6b25259ff -r 196b8dd07896 test-data/viruses.tax.xml
--- a/test-data/viruses.tax.xml Thu Jul 07 02:40:33 2016 -0400
+++ b/test-data/viruses.tax.xml Tue Oct 30 19:10:51 2018 -0400
b
@@ -1,5 +1,5 @@
-<?xml version="1.0"?>
-<!DOCTYPE TaxaSet PUBLIC "-//NLM//DTD Taxon, 14th January 2002//EN" "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/taxon.dtd">
+<?xml version="1.0" ?>
+<!DOCTYPE TaxaSet PUBLIC "-//NLM//DTD Taxon, 14th January 2002//EN" "https://www.ncbi.nlm.nih.gov/entrez/query/DTD/taxon.dtd">
 <TaxaSet><Taxon>
     <TaxId>10239</TaxId>
     <ScientificName>Viruses</ScientificName>
@@ -21,9 +21,8 @@
     </MitoGeneticCode>
     <Lineage/>
     <CreateDate>1995/02/27 09:24:00</CreateDate>
-    <UpdateDate>2010/11/23 11:40:11</UpdateDate>
+    <UpdateDate>2017/06/14 10:56:24</UpdateDate>
     <PubDate>1993/04/20 01:00:00</PubDate>
 </Taxon>
 
-</TaxaSet>
-
+</TaxaSet>
\ No newline at end of file
b
diff -r 18e6b25259ff -r 196b8dd07896 tool_dependencies.xml
--- a/tool_dependencies.xml Thu Jul 07 02:40:33 2016 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<tool_dependency>
-  <set_environment version="1.0">
-    <environment_variable action="set_to" name="NCBI_EUTILS_CONTACT">/please set the administrator's contact email in the corresponding env.sh file/</environment_variable>
-  </set_environment>
-  <package name="biopython" version="1.66">
-    <repository changeset_revision="8433ee4531ff" name="package_biopython_1_66" owner="biopython" toolshed="https://toolshed.g2.bx.psu.edu" />
-  </package>
-</tool_dependency>