I am having trouble figuring this out. I want to module load an aligner-"bowtie" in this case. Below is a snippet of the code I have:
import subprocess
moduleCmd=['module', 'load','/modules/ogi-mbc/software/bowtie/bowtie2-2.2.4/bowtie2']
subprocess.Popen(moduleCmd,shell=True)
When I run my script, I am getting following message:
cmdModule.c(166):ERROR:11: Usage is 'module command [arguments ...]
Modules Release 3.2.10 2012-12-21 (Copyright GNU GPL v2 1991):
Usage: module [ switches ] [ subcommand ] [subcommand-args ]`
The program is NOT loaded after running the script.
Testing a simple command with subprocess such as:
testCmd=['ls', '-l']
subprocess.Popen(testCmd,shell=True)
I get the expected output.