[Biopython-dev] BWA Wrapper

Peter Cock p.j.a.cock at googlemail.com
Thu Feb 14 16:19:59 UTC 2013

On Thu, Feb 14, 2013 at 4:02 PM, Saket Choudhary <saketkc at gmail.com> wrote:
> Theres one more issue that I have run into . Consider the following command
> , the outout generated is written by piping it to a file called aln_sa.sai,
> bwa aln database.fasta short_read.fastq > aln_sa.sai
> Now if we look into the _call method here , it takes as its inout a boolean
> for stdout. So should I modify this so that it can take 'stdout' as on
> opened file  instance which I can invoke while unvoking my BwaAlnCommandLine
> functions as follwos:
> a=BwaAlnCommandLine()
> b=a(stdout=open("aln_sa.sai","wb"))

Is that possible?

For complex use of subprocess and pipes, we've previously recommend
the user handle this explicitly themselves, just use str() on the command
line wrapper object to get 'bwa aln database.fasta short_read.fastq' in this
case. There are some examples in the Tutorial with (multiple sequence)
alignment tools.


More information about the Biopython-dev mailing list