Commit e1ae8519 authored by Maxime Manno's avatar Maxime Manno 🍜
Browse files

Update get-version : #90

popen a shell command with module load before the porechop command
parent e52960af
...@@ -124,10 +124,12 @@ class Trim_porechop (Analysis): ...@@ -124,10 +124,12 @@ class Trim_porechop (Analysis):
logging.getLogger("jflow").debug("End Trimporechop.post_process! ") logging.getLogger("jflow").debug("End Trimporechop.post_process! ")
def get_version(self): def get_version(self):
#os.system("module load bioinfo/Porechop-0.2.1") shell_script = "module load compiler/gcc-7.2.0;module load bioinfo/Porechop-0.2.1;" + self.get_exec_path("porechop") + " --version"
cmd = [self.get_exec_path("porechop"), "--version"] logging.getLogger("jflow").debug("Trimporechop.get_version ! shell_script " + str(shell_script))
cmd = ["sh","-c",shell_script]
p = Popen(cmd, stdout=PIPE, stderr=PIPE) p = Popen(cmd, stdout=PIPE, stderr=PIPE)
stdout, stderr = p.communicate() stdout, stderr = p.communicate()
logging.getLogger("jflow").debug("Trimporechop.get_version !" + str(stderr))
return stdout return stdout
def process(self): def process(self):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment