X BOL wishing you a very and Happy New year

Alternative content

History

Our Sponsors



Download BioinformaticsOnline(BOL) Apps in your chrome browser.




Subprocess pkg: Revision

Subprocess pkg

Last updated 3781 days ago by Rahul Agarwal

Subprocess is one of simplest way of running linux command from within python code

Example:

if you want to run fastqc for QC of fastq file:

from subprocess import Popen,PIPE,call

p=Popen(["fastqc","-f","fastq","-o", "/home/name/result/","/dev/stdin"],stdin=fopen("read.fastq","r") ,stdout=PIPE,stderr=PIPE)

print p.stderr

p.stdout.close()

More:

http://pymotw.com/2/subprocess/