[EMBOSS] Seqret stdin issues
simon andrews (BI)
simon.andrews at bbsrc.ac.uk
Fri Sep 16 07:28:03 UTC 2005
On 15 Sep 2005, at 23:45, Ronnie O wrote:
> Hello everyone,
> I am trying to pipe sequence data into seqret via a pipe with the
> following
> command:
> ./seqret raw::stdin raw::stdout
> and i am getting the following data piped back to my app via the error
> pipe:
> Unable to read sequence 'raw::stdin raw::stdout'
A simple pipe of the type you describe works fine for me:
echo "GATAGCTAG" | seqret raw::stdin fasta::stdout
Reads and writes (returns) sequences
>EMBOSS_001
GATAGCTAG
However it sounds like you're trying to do this via a Perl script. Are
you using the IPC::Open2 / Open3 modules to do this? I tried it and it
seemed to work OK:
#!/usr/bin/perl
use warnings;
use strict;
use IPC::Open2;
my $seq = "GATAGATATGCTAGA";
my $pid = open2(\*OUT,\*IN,"seqret","raw::stdin","raw::stdout");
print IN $seq;
close IN or die "Can't close IN: $!";
while (<OUT>) {
print;
}
close OUT or die "Can't close OUT: $!";
waitpid($pid,0);
##################
Incidentally, it you're just using seqret as a filter then there is a
-filter flag which has a slightly cleaner syntax for what you're trying
to do:
echo "GATAGCTAG" | seqret -filter -osf fasta
If you're still having problems then can you post the piece of code
which isn't working so we can have a look.
Cheers
Simon.
--
Simon Andrews PhD
Bioinformatics Dept.
The Babraham Institute
simon.andrews at bbsrc.ac.uk
+44 (0) 1223 496463
More information about the EMBOSS
mailing list