I would like to call BWA mem from within a python script. This works, but I cannot specify an output filename. The output is printed to stdout, but off course this is not what I want. From within BWA I should use '>' but this is not working from within python. This is the call function that I'm using:
aln_value=call([script_dir+"/software/bwa","mem", "-t 4", "-M", script_dir+"/ref/hg19.navin", args.fastq_file ],stderr=ERR_LOG,stdout=OUT_LOG)
Is there a simple alternative that allows me to specify the outputfile from within the python script?
Thanks , Lien