[Biopython-dev] BWA Wrapper

Peter Cock p.j.a.cock at googlemail.com
Tue Feb 12 17:38:46 UTC 2013


On Tue, Feb 12, 2013 at 9:51 AM, Saket Choudhary <saketkc at gmail.com> wrote:
> Hi,
>
> I am writing a bwa wrapper for bio-python. I have infact got the "index"
>  option working. However I have a concern:
>
> bwa has these options :
>
> bwa index -a bwtsw database.fasta
>
> bwa aln database.fasta short_read.fastq > aln_sa.sai
>
> bwa samse database.fasta aln_sa.sai short_read.fastq > aln.sam
>
> bwa sampe database.fasta aln_sa1.sai aln_sa2.sai read1.fq read2.fq > aln.sam
>
> bwa bwasw database.fasta long_read.fastq > aln.sam
>
>
> If you read the documentation here<http://bio-bwa.sourceforge.net/bwa.shtml>,
> you will see that  "-r" is an option with "aln" command as well as the
> "samse" command. In the former it is of type INT and in the latter of type
> STR. Now I am not sure how can this be taken care of in the wrapper,
> because I also plan to implement a checker_function.  One way is to make a
> new class, lets say BwaAlignCommand which will take care of all options
> inside the "aln" command and separately implement another class say
> "BwaSamseCommand", and implement all the options of the "samse" command.
> But I am not sure if that is indeed the correct way of addressing the
> problem.
>
>
> Any pointers on this issue ?

I would treat "bwa samse", "bwa sampe", "bwa ..." as separate tools and
write a wrapper class for each of them. This would probably fit under the
Bio.Sequencing.Applications namespace.

Peter



More information about the Biopython-dev mailing list