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

Changeset 1:8dff71edbce5 (2021-11-18)
Previous changeset 0:ef7f9e2f32f2 (2021-08-26) Next changeset 2:13018941c6a0 (2021-11-19)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_funannotate commit d1ebc78155f57c87d8e82c9855b176428e9803ad"
modified:
data_manager/funannotate.py
data_manager/funannotate.xml
b
diff -r ef7f9e2f32f2 -r 8dff71edbce5 data_manager/funannotate.py
--- a/data_manager/funannotate.py Thu Aug 26 06:54:45 2021 +0000
+++ b/data_manager/funannotate.py Thu Nov 18 21:55:43 2021 +0000
[
b'@@ -6,8 +6,219 @@\n import os\n import subprocess\n import sys\n+import tarfile\n from datetime import datetime\n \n+import requests\n+\n+# Some additional busco/orthodb10 datasets that can be added to funannotate db\n+# Will probably not be needed anymore in future versions of funannotate when it\n+# will use a recent busco version\n+BUSCO_10_DATASETS_URL = "https://busco-data.ezlab.org/v5/data/lineages/{dataset}"\n+BUSCO_10_DATASETS = [\n+    "acidobacteria_odb10.2020-03-06.tar.gz",\n+    "aconoidasida_odb10.2020-08-05.tar.gz",\n+    "actinobacteria_class_odb10.2021-02-23.tar.gz",\n+    "actinobacteria_phylum_odb10.2021-02-23.tar.gz",\n+    "actinopterygii_odb10.2021-02-19.tar.gz",\n+    "agaricales_odb10.2020-08-05.tar.gz",\n+    "agaricomycetes_odb10.2020-08-05.tar.gz",\n+    "alphabaculovirus_odb10.2020-11-26.tar.gz",\n+    "alphaherpesvirinae_odb10.2020-11-26.tar.gz",\n+    "alphaproteobacteria_odb10.2021-02-23.tar.gz",\n+    "alteromonadales_odb10.2021-02-23.tar.gz",\n+    "alveolata_odb10.2020-09-10.tar.gz",\n+    "apicomplexa_odb10.2020-09-10.tar.gz",\n+    "aquificae_odb10.2021-02-23.tar.gz",\n+    "arachnida_odb10.2020-08-05.tar.gz",\n+    "archaea_odb10.2021-02-23.tar.gz",\n+    "arthropoda_odb10.2020-09-10.tar.gz",\n+    "ascomycota_odb10.2020-09-10.tar.gz",\n+    "aves_odb10.2021-02-19.tar.gz",\n+    "aviadenovirus_odb10.2020-11-26.tar.gz",\n+    "bacillales_odb10.2021-02-23.tar.gz",\n+    "bacilli_odb10.2021-02-23.tar.gz",\n+    "bacteria_odb10.2020-03-06.tar.gz",\n+    "bacteroidales_odb10.2021-02-23.tar.gz",\n+    "bacteroidetes-chlorobi_group_odb10.2021-02-23.tar.gz",\n+    "bacteroidetes_odb10.2021-02-23.tar.gz",\n+    "bacteroidia_odb10.2021-02-23.tar.gz",\n+    "baculoviridae_odb10.2020-11-26.tar.gz",\n+    "basidiomycota_odb10.2020-09-10.tar.gz",\n+    "bclasvirinae_odb10.2020-11-26.tar.gz",\n+    "betabaculovirus_odb10.2020-11-26.tar.gz",\n+    "betaherpesvirinae_odb10.2020-11-26.tar.gz",\n+    "betaproteobacteria_odb10.2021-02-23.tar.gz",\n+    "boletales_odb10.2020-08-05.tar.gz",\n+    "brassicales_odb10.2020-08-05.tar.gz",\n+    "burkholderiales_odb10.2021-02-23.tar.gz",\n+    "campylobacterales_odb10.2020-03-06.tar.gz",\n+    "capnodiales_odb10.2020-08-05.tar.gz",\n+    "carnivora_odb10.2021-02-19.tar.gz",\n+    "cellvibrionales_odb10.2020-03-06.tar.gz",\n+    "cetartiodactyla_odb10.2021-02-19.tar.gz",\n+    "chaetothyriales_odb10.2020-08-05.tar.gz",\n+    "cheoctovirus_odb10.2020-11-26.tar.gz",\n+    "chlamydiae_odb10.2020-03-06.tar.gz",\n+    "chlorobi_odb10.2020-03-06.tar.gz",\n+    "chloroflexi_odb10.2020-03-06.tar.gz",\n+    "chlorophyta_odb10.2020-08-05.tar.gz",\n+    "chordopoxvirinae_odb10.2020-11-26.tar.gz",\n+    "chromatiales_odb10.2020-03-06.tar.gz",\n+    "chroococcales_odb10.2020-03-06.tar.gz",\n+    "clostridia_odb10.2020-03-06.tar.gz",\n+    "clostridiales_odb10.2020-03-06.tar.gz",\n+    "coccidia_odb10.2020-08-05.tar.gz",\n+    "coriobacteriales_odb10.2020-03-06.tar.gz",\n+    "coriobacteriia_odb10.2020-03-06.tar.gz",\n+    "corynebacteriales_odb10.2020-03-06.tar.gz",\n+    "cyanobacteria_odb10.2021-02-23.tar.gz",\n+    "cyprinodontiformes_odb10.2021-02-19.tar.gz",\n+    "cytophagales_odb10.2021-02-23.tar.gz",\n+    "cytophagia_odb10.2021-02-23.tar.gz",\n+    "delta-epsilon-subdivisions_odb10.2021-02-23.tar.gz",\n+    "deltaproteobacteria_odb10.2021-02-23.tar.gz",\n+    "desulfobacterales_odb10.2020-03-06.tar.gz",\n+    "desulfovibrionales_odb10.2021-02-23.tar.gz",\n+    "desulfurococcales_odb10.2021-02-23.tar.gz",\n+    "desulfuromonadales_odb10.2020-03-06.tar.gz",\n+    "diptera_odb10.2020-08-05.tar.gz",\n+    "dothideomycetes_odb10.2020-08-05.tar.gz",\n+    "embryophyta_odb10.2020-09-10.tar.gz",\n+    "endopterygota_odb10.2020-09-10.tar.gz",\n+    "enquatrovirus_odb10.2021-05-05.tar.gz",\n+    "enterobacterales_odb10.2021-02-23.tar.gz",\n+    "entomoplasmatales_odb10.2020-03-06.tar.gz",\n+    "epsilonproteobacteria_odb10.2020-03-06.tar.gz",\n+    "euarchontoglires_odb10.2021-02-19.tar.gz",\n+    "eudicots_odb10.2020-09-10.tar.gz",\n+    "euglenozoa_odb10.2020-08-05.ta'..b'   "onygenales_odb10.2020-08-05.tar.gz",\n+    "oscillatoriales_odb10.2021-02-23.tar.gz",\n+    "pahexavirus_odb10.2020-11-26.tar.gz",\n+    "passeriformes_odb10.2021-02-19.tar.gz",\n+    "pasteurellales_odb10.2021-02-23.tar.gz",\n+    "peduovirus_odb10.2021-02-23.tar.gz",\n+    "planctomycetes_odb10.2020-03-06.tar.gz",\n+    "plasmodium_odb10.2020-08-05.tar.gz",\n+    "pleosporales_odb10.2020-08-05.tar.gz",\n+    "poales_odb10.2020-08-05.tar.gz",\n+    "polyporales_odb10.2020-08-05.tar.gz",\n+    "poxviridae_odb10.2020-11-26.tar.gz",\n+    "primates_odb10.2021-02-19.tar.gz",\n+    "propionibacteriales_odb10.2020-03-06.tar.gz",\n+    "proteobacteria_odb10.2021-02-23.tar.gz",\n+    "pseudomonadales_odb10.2020-03-06.tar.gz",\n+    "rhizobiales_odb10.2020-03-06.tar.gz",\n+    "rhizobium-agrobacterium_group_odb10.2020-03-06.tar.gz",\n+    "rhodobacterales_odb10.2021-02-23.tar.gz",\n+    "rhodospirillales_odb10.2020-03-06.tar.gz",\n+    "rickettsiales_odb10.2020-03-06.tar.gz",\n+    "rudiviridae_odb10.2020-11-26.tar.gz",\n+    "saccharomycetes_odb10.2020-08-05.tar.gz",\n+    "sauropsida_odb10.2021-02-19.tar.gz",\n+    "selenomonadales_odb10.2020-03-06.tar.gz",\n+    "simplexvirus_odb10.2020-11-26.tar.gz",\n+    "skunavirus_odb10.2020-11-26.tar.gz",\n+    "solanales_odb10.2020-08-05.tar.gz",\n+    "sordariomycetes_odb10.2020-08-05.tar.gz",\n+    "sphingobacteriia_odb10.2020-03-06.tar.gz",\n+    "sphingomonadales_odb10.2021-02-23.tar.gz",\n+    "spirochaetales_odb10.2020-03-06.tar.gz",\n+    "spirochaetes_odb10.2021-02-23.tar.gz",\n+    "spirochaetia_odb10.2021-02-23.tar.gz",\n+    "spounavirinae_odb10.2020-11-26.tar.gz",\n+    "stramenopiles_odb10.2020-08-05.tar.gz",\n+    "streptomycetales_odb10.2020-03-06.tar.gz",\n+    "streptosporangiales_odb10.2020-03-06.tar.gz",\n+    "sulfolobales_odb10.2021-02-23.tar.gz",\n+    "synechococcales_odb10.2020-03-06.tar.gz",\n+    "synergistetes_odb10.2020-03-06.tar.gz",\n+    "tenericutes_odb10.2020-03-06.tar.gz",\n+    "tequatrovirus_odb10.2020-11-26.tar.gz",\n+    "teseptimavirus_odb10.2020-11-26.tar.gz",\n+    "tetrapoda_odb10.2021-02-19.tar.gz",\n+    "tevenvirinae_odb10.2021-02-23.tar.gz",\n+    "thaumarchaeota_odb10.2021-02-23.tar.gz",\n+    "thermoanaerobacterales_odb10.2020-03-06.tar.gz",\n+    "thermoplasmata_odb10.2021-02-23.tar.gz",\n+    "thermoproteales_odb10.2021-02-23.tar.gz",\n+    "thermoprotei_odb10.2021-02-23.tar.gz",\n+    "thermotogae_odb10.2020-03-06.tar.gz",\n+    "thiotrichales_odb10.2020-03-06.tar.gz",\n+    "tissierellales_odb10.2020-03-06.tar.gz",\n+    "tissierellia_odb10.2020-03-06.tar.gz",\n+    "tremellomycetes_odb10.2020-08-05.tar.gz",\n+    "tunavirinae_odb10.2020-11-26.tar.gz",\n+    "varicellovirus_odb10.2020-11-26.tar.gz",\n+    "verrucomicrobia_odb10.2020-03-06.tar.gz",\n+    "vertebrata_odb10.2021-02-19.tar.gz",\n+    "vibrionales_odb10.2020-03-06.tar.gz",\n+    "viridiplantae_odb10.2020-09-10.tar.gz",\n+    "xanthomonadales_odb10.2020-03-06.tar.gz",\n+]\n+\n+\n+def download_file(url, dest):\n+    with requests.get(url, stream=True) as r:\n+        r.raise_for_status()\n+        with open(dest, \'wb\') as f:\n+            for chunk in r.iter_content(chunk_size=8192):\n+                f.write(chunk)\n+\n \n if __name__ == "__main__":\n \n@@ -38,6 +249,20 @@\n         print("Error downloading Funannotate database.", file=sys.stderr)\n         sys.exit(return_code)\n \n+    # Download newer busco datasets from orthodb 10\n+    if args.partial:\n+        BUSCO_10_DATASETS = BUSCO_10_DATASETS[:1]\n+\n+    for busco_dataset in BUSCO_10_DATASETS:\n+        print("Downloading additional busco orthodb10 dataset %s" % busco_dataset)\n+        dest_tar = os.path.join(output_directory, busco_dataset)\n+        download_file(BUSCO_10_DATASETS_URL.format(dataset=busco_dataset), dest_tar)\n+        print("Extracting %s" % busco_dataset)\n+        tar = tarfile.open(dest_tar, "r:gz")\n+        tar.extractall(output_directory)\n+        tar.close()\n+        os.remove(dest_tar)\n+\n     version_id = datetime.today().strftime(\'%Y-%m-%d-%H%M%S\')\n \n     version = \'1.0\'\n'
b
diff -r ef7f9e2f32f2 -r 8dff71edbce5 data_manager/funannotate.xml
--- a/data_manager/funannotate.xml Thu Aug 26 06:54:45 2021 +0000
+++ b/data_manager/funannotate.xml Thu Nov 18 21:55:43 2021 +0000
[
@@ -1,10 +1,11 @@
-<tool id="data_manager_funannotate" name="Funannotate data manager" version="0.0.1" tool_type="manage_data" profile="20.01">
+<tool id="data_manager_funannotate" name="Funannotate data manager" version="0.0.2" tool_type="manage_data" profile="20.01">
     <requirements>
-        <requirement type="package" version="1.8.7">funannotate</requirement>
+        <requirement type="package" version="1.8.9">funannotate</requirement>
+        <requirement type="package" version="2.26.0">requests</requirement>
     </requirements>
     <version_command>funannotate check --show-versions</version_command>
     <command detect_errors="exit_code"><![CDATA[
-python '$__tool_directory__/funannotate.py'
+python -u '$__tool_directory__/funannotate.py'
 $partial_data
 \$(date +'%Y-%m-%d-%H%M%S')
 'funannotate'