X BOL wishing you a very and Happy New year

Alternative content

Our Sponsors



Download BioinformaticsOnline(BOL) Apps in your chrome browser.




Subprocess pkg

Subprocess pkg

Last updated 3782 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/