[Biopython] subprocess.Popen problem

Mic mictadlo at gmail.com
Wed Nov 2 04:39:18 UTC 2011


Hello,
I have tried to write a SOAPaligner wrapper in oder to get the SOAP
alignment statistics:

Total Pairs: 1000 PE
Paired:      35 ( 3.50%) PE
Singled:     170 ( 8.50%) SE
Total Elapsed Time:           24.00
      - Load Index Table:     23.22
      - Alignment:             0.78

with the following code:

import os, subprocess
if __name__ == '__main__':
    try:
        cmd_soap = 'soap -p 1 -a test_A_clonesremoved-tiny.fastq -b
test_B_clonesremoved-tiny.fastq -D all.m.fasta.index -r 0 -o
test_clonesremoved-tiny_vs_all.m.paired.soap -2
test_clonesremoved-tiny_vs_all.m.single.soap -m 100 -x 550'
        proc = subprocess.Popen(cmd_soap, shell=True)
        returncode = proc.wait()
        print returncode
    except Exception, e:
        sys.stderr.write( "%s\n" % str(e))
        sys.exit()


However, when I started the script I just got 0 as an output:

$ python soap_wrapper.py

Begin Program SOAPaligner/soap2
Wed Nov  2 14:23:33 2011
Reference: all.m.fasta.index
Query File a: test_A_clonesremoved-tiny.fastq
Query File b: test_B_clonesremoved-tiny.fastq
Output File: test_clonesremoved-tiny_vs_all.m.paired.soap
             test_clonesremoved-tiny_vs_all.m.single.soap
Load Index Table ...
Load Index Table OK
Begin Alignment ...
2000 ok    0.76 sec
Total Pairs: 1000 PE
Paired:      35 ( 3.50%) PE
Singled:     170 ( 8.50%) SE
Total Elapsed Time:           24.00
      - Load Index Table:     23.22
      - Alignment:             0.78

SOAPaligner/soap2 End
Wed Nov  2 14:23:57 2011

0

What did I wrong?

Thank you in advance.



More information about the Biopython mailing list