[Bioperl-l] call for help and comments on module

Mark A. Jensen maj at fortinbras.us
Tue Dec 22 00:19:35 EST 2009


Hey Dan, 
It looks like if the outfile isn't specified on the commandline for
maptool, then the align is written to stdout. So, you could 
try this workaround in in Bowtie/Config.pm:

our %command_files = (
    'single'     => [qw( ind seq #out )],
    'paired'     => [qw( ind seq seq2 #out )],
    'crossbow'   => [qw( ind seq #out )],
    'build'      => [qw( ref out )],
    'inspect'    => [qw( ind >#out )],
    'convert'    => [qw( bwt out bfa )],
-    'map'        => [qw( bwt #out )]
+    'map'        => [qw( bwt >#out )]
    );

which should be transparent to the user. If this works, then
there is probably something funky going on with IPC::Run
+ maptool; if it doesn't, then the funkiness is prob. in my code.

I notice, however, that both bowtie-maptool and bowtie-maqconvert
have been removed from the 0.12.0-beta release 
(http://bowtie-bio.sourceforge.net/index.shtml)...

cheers MAJ

----- Original Message ----- 
From: "Dan Kortschak" <dan.kortschak at adelaide.edu.au>
To: <bioperl-l at lists.open-bio.org>
Sent: Monday, December 21, 2009 10:24 PM
Subject: [Bioperl-l] call for help and comments on module


> Hi,
> 
> I've been working on a Bio::Tools::Run module to handle the bowtie rapid
> alignment tool (and associated tools): Bio::Tools::Run::Bowtie (in
> bioperl-run tree).
> 
> I have 90% of what I want included in the module and would like some
> advice from more experienced bioperlers. Feedback on approach is also
> welcomed (this is my first significant wrapper, and after a long gap
> from writing module, so I am rusty). The module has ended up being
> significantly more complicated than I had hoped.
> 
> There are a few issues I'm having, so I apologise for the list:
> 
>     1. Informal tests run correctly (outside the t/ tree and Test
>        harness), but formal Test harness tests fail for reasons I
>        cannot understand. (The module is still lacking a lot of tests,
>        but since things were failing in the harness I have placed them
>        as a lower priority and have been working to my micro-script
>        tests - yes, bad form.
>     2. I am having a big problem with IPC::Run for one of the
>        executables (the module can call 5 different excutables for 7
>        commands), bowtie-maptool (module command 'map'). All the other
>        commands tested (this excludes bowtie-maqconvert [convert
>        command]) work fine, but maptool fails with an illegal seek -
>        presumably due to the redirection handling? I have no idea how
>        to resolve this, so help would be greatly appreciated (a small
>        script that demonstrates the use that results in the failure is
>        below).
> 
> There will be provision for returning a Bio::Assembly::IO object through
> samtools in the finished module, but currently the
> Bio::Assembly::IO::sam builder doesn't like what bowtie can provide.
> 
> Thanks for any help.
> Dan
> 
> 
> #!/usr/bin/perl
> 
> use strict;
> use warnings;
> 
> use Bio::Tools::Run::Bowtie;
> 
> # These files are in the bioperl-run t/data/ tree
> my $rdq = '/usr/local/src/bioperl-run/t/data/bowtie/reads/e_coli_1000.fq';
> my $refseq = '/usr/local/src/bioperl-run/t/data/bowtie/indexes/e_coli';
> 
> my $bowtiefac = Bio::Tools::Run::Bowtie->new(
> -command             => 'single',
> -max_seed_mismatches => 2,
> -seed_length         => 28,
> -max_qual_mismatch   => 70,
> -sam_format          => 0
> );
> 
> my $align = $bowtiefac->run($rdq,$refseq); # this runs fine
> 
> my $bowtiemap = Bio::Tools::Run::Bowtie->new(
> -command             => 'map'
> );
> 
> my $map = $bowtiemap->run($align); # throws Illegal seek
> 
> print "$map\n";
> 
> open (IN,$map);
> my $lines =(my @lines)= <IN>;
> print @lines;
> print "\n\n$lines\n";
> close IN;
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 
>


More information about the Bioperl-l mailing list