changeset 5:495a521cf9f2 draft

"planemo upload commit 40d62ec3d2fea3c3bac605c976941e1f3b7e2cd4"
author rhpvorderman
date Tue, 16 Nov 2021 11:16:06 +0000
parents c8f02bce10d0
children ea9d5fc4c001
files build_container.sh conda_environment.yml container_hash.tsv converttoutf8.py create_container_hash.py involucro shm_clonality.htm shm_csr.htm shm_csr.xml shm_downloads.htm shm_first.htm shm_frequency.htm shm_overview.htm shm_selection.htm shm_transition.htm tests/__pycache__/test_shm_csr.cpython-37-pytest-6.2.5.pyc tests/test_shm_csr.py utf8test.py
diffstat 18 files changed, 66 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build_container.sh	Tue Nov 16 11:16:06 2021 +0000
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+set -e
+DEFAULT_BASE_IMAGE="$1"
+
+python3 create_container_hash.py $DEFAULT_BASE_IMAGE
+mulled-build-files --namespace rhpvorderman build-and-test ./container_hash.tsv --verbose
+
--- a/conda_environment.yml	Mon Nov 15 14:04:10 2021 +0000
+++ b/conda_environment.yml	Tue Nov 16 11:16:06 2021 +0000
@@ -19,6 +19,7 @@
   - file=5.39
   - bc=1.07.1
   - findutils=4.6.0
+  - font-ttf-ubuntu=0.83
   # Test dependencies below
   - pytest=6.2.5
   # Add planemo so tool can be uploaded
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/container_hash.tsv	Tue Nov 16 11:16:06 2021 +0000
@@ -0,0 +1,2 @@
+#targets	base_image	image_build
+python=3.7.1,changeo=0.4.4,biopython=1.72,xlrd=1.2.0,r-ggplot2=3.0.0,r-reshape2=1.4.3,r-scales=0.5.0,r-seqinr=3.4_5,r-data.table=1.11.4,unzip=6.0,bash=4.4.18,tar=1.34,file=5.39,findutils=4.6.0,bc=1.07.1,font-ttf-ubuntu=0.83	bgruening/busybox-bash:0.1	0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/converttoutf8.py	Tue Nov 16 11:16:06 2021 +0000
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+import sys
+
+with open(sys.argv[1], "rt", encoding="utf8") as input_h:
+    input_h.read()
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/create_container_hash.py	Tue Nov 16 11:16:06 2021 +0000
@@ -0,0 +1,29 @@
+#!/usr/bin/env python3
+
+import sys
+
+from xml.etree import ElementTree
+from xml.etree.ElementTree import Element
+
+DEFAULT_BASE_IMAGE = "bgruening/busybox-bash:0.1"
+def main():
+    try:
+        base_image = sys.argv[1]
+    except IndexError:
+        base_image = DEFAULT_BASE_IMAGE
+    tool = ElementTree.parse("shm_csr.xml").getroot()
+    requirements: Element = tool.find("requirements")
+    packages = []
+    for req in requirements.findall("requirement"):
+        if req.get("type") == "package":
+            name = req.text
+            version = req.get("version")
+            package_string = f"{name}={version}"
+            packages.append(package_string)
+    with open("container_hash.tsv", mode="wt") as container_hash_file:
+        container_hash_file.write("#targets\tbase_image\timage_build\n")
+        container_hash_file.write(",".join(packages) + f"\t{base_image}\t0\n")
+
+
+if __name__ == "__main__":
+    main()
Binary file involucro has changed
--- a/shm_clonality.htm	Mon Nov 15 14:04:10 2021 +0000
+++ b/shm_clonality.htm	Tue Nov 16 11:16:06 2021 +0000
@@ -1,7 +1,7 @@
 <html>
 
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
 <meta name=Generator content="Microsoft Word 14 (filtered)">
 <style>
 <!--
--- a/shm_csr.htm	Mon Nov 15 14:04:10 2021 +0000
+++ b/shm_csr.htm	Tue Nov 16 11:16:06 2021 +0000
@@ -1,7 +1,7 @@
 <html>
 
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
 <meta name=Generator content="Microsoft Word 14 (filtered)">
 <style>
 <!--
--- a/shm_csr.xml	Mon Nov 15 14:04:10 2021 +0000
+++ b/shm_csr.xml	Tue Nov 16 11:16:06 2021 +0000
@@ -1,4 +1,4 @@
-<tool id="shm_csr" name="SHM &amp; CSR pipeline" version="1.3.2.1">
+<tool id="shm_csr" name="SHM &amp; CSR pipeline" version="1.3.2.2">
 	<description></description>
 	<requirements>
 		<requirement type="package" version="3.7.1">python</requirement>
@@ -18,6 +18,8 @@
 		<requirement type="package" version="5.39">file</requirement>
 		<requirement type="package" version="4.6.0">findutils</requirement>
 		<requirement type="package" version="1.07.1">bc</requirement>
+		<requirement type="package" version="0.83">font-ttf-ubuntu</requirement>
+		<container type="docker">quay.io/rhpvorderman/mulled-v2-f7d31c9d7424063a492fc0e5ecbf89bc757c0107:2b50bdd4d8c1fefc6ec24b0753fad0dcecec843b-0</container>
 	</requirements>
 	<command interpreter="bash">
 		#if str ( $filter_unique.filter_unique_select ) == "remove":
--- a/shm_downloads.htm	Mon Nov 15 14:04:10 2021 +0000
+++ b/shm_downloads.htm	Tue Nov 16 11:16:06 2021 +0000
@@ -1,7 +1,7 @@
 <html>
 
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
 <meta name=Generator content="Microsoft Word 14 (filtered)">
 <style>
 <!--
--- a/shm_first.htm	Mon Nov 15 14:04:10 2021 +0000
+++ b/shm_first.htm	Tue Nov 16 11:16:06 2021 +0000
@@ -1,7 +1,7 @@
 <html>
 
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
 <meta name=Generator content="Microsoft Word 14 (filtered)">
 <style>
 <!--
--- a/shm_frequency.htm	Mon Nov 15 14:04:10 2021 +0000
+++ b/shm_frequency.htm	Tue Nov 16 11:16:06 2021 +0000
@@ -1,7 +1,7 @@
 <html>
 
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
 <meta name=Generator content="Microsoft Word 14 (filtered)">
 <style>
 <!--
--- a/shm_overview.htm	Mon Nov 15 14:04:10 2021 +0000
+++ b/shm_overview.htm	Tue Nov 16 11:16:06 2021 +0000
@@ -1,7 +1,7 @@
 <html>
 
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
 <meta name=Generator content="Microsoft Word 14 (filtered)">
 <style>
 <!--
--- a/shm_selection.htm	Mon Nov 15 14:04:10 2021 +0000
+++ b/shm_selection.htm	Tue Nov 16 11:16:06 2021 +0000
@@ -1,7 +1,7 @@
 <html>
 
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
 <meta name=Generator content="Microsoft Word 14 (filtered)">
 <style>
 <!--
--- a/shm_transition.htm	Mon Nov 15 14:04:10 2021 +0000
+++ b/shm_transition.htm	Tue Nov 16 11:16:06 2021 +0000
@@ -1,7 +1,7 @@
 <html>
 
 <head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
 <meta name=Generator content="Microsoft Word 14 (filtered)">
 <style>
 <!--
Binary file tests/__pycache__/test_shm_csr.cpython-37-pytest-6.2.5.pyc has changed
--- a/tests/test_shm_csr.py	Mon Nov 15 14:04:10 2021 +0000
+++ b/tests/test_shm_csr.py	Tue Nov 16 11:16:06 2021 +0000
@@ -36,6 +36,7 @@
 
 @pytest.fixture(scope="module")
 def shm_csr_result():
+    docker_container = "quay.io/rhpvorderman/mulled-v2-f7d31c9d7424063a492fc0e5ecbf89bc757c0107:2b50bdd4d8c1fefc6ec24b0753fad0dcecec843b-0"
     temp_dir = Path(tempfile.mkdtemp())
     tool_dir = temp_dir / "shm_csr"
     shutil.copytree(GIT_ROOT, tool_dir)
@@ -84,9 +85,13 @@
         empty_region_filter,
         fast
     ]
+    docker_cmd = ["docker", "run", "-v", f"{temp_dir}:{temp_dir}",
+                  "-v", f"{input}:{input}",
+                  "-w", str(working_dir),
+                  docker_container] + cmd
     with open(temp_dir / "stderr", "wt") as stderr_file:
         with open(temp_dir / "stdout", "wt") as stdout_file:
-            subprocess.run(cmd, cwd=working_dir, stdout=stdout_file,
+            subprocess.run(docker_cmd, cwd=working_dir, stdout=stdout_file,
                            stderr=stderr_file, check=True)
     yield Path(out_files_path)
     #shutil.rmtree(temp_dir)
--- a/utf8test.py	Mon Nov 15 14:04:10 2021 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-#!/usr/bin/env python3
-import sys
-
-with open(sys.argv[1], "rt", encoding="utf-8") as input_h:
-  input_h.read()
-
-