needle -filter
Jonathan Barber
jon at compbio.dundee.ac.uk
Tue Jun 10 09:30:44 UTC 2003
On Tue, Jun 10, 2003 at 08:53:52AM +0100, simon andrews (BI) wrote:
> > From: David Mathog
> > > Peter Rice wrote:
> > > > simon andrews (BI) wrote:
> > > > In the manual for needle it suggests that it too can
> > > > accept -filter as a qualifier, but I can't get it to work.
> > > >
> > > > cat seq1.txt seq2.txt | needle -filter -sformat1
> > > > fasta -sformat2 fasta
> > > >
> >
> > Hmm. So presumably they're coming out of some other program
> > together in a stream and it's inconvenient for some reason to
> > write them to files. Ok.
>
> Yes, it's going to be used as part of a CGI script so the sequences
> are already in variables in the script. I could go down the line of
> creating temp files, but this gets to be a real pain (making sure
> different processes don't clash, and cleaning up afterwards), and it
> would slow things down as well.
If you're using Perl, the easiest way to do this is to use the core
File::Temp module. tempdir() may be exactly what you need.
[snip]
> As an aside, the idea of the asis: USA is a really nice way around
> this whole problem. The trouble is that it's limited (I presume) by
> the command line length your shell allows, and by you not being able
> to specify a name for the sequence. If there was some easy way around
> this limitation, then that would solve the problem for the situations
> I can think I'm likely to encounter.
Again, if you're using Perl, then you can use system() with a list
argument rather than a scalar, and this will avoid the shell, if your
command doesn't have any shell metacharacters in it (perldoc -f system).
--
Jon
More information about the EMBOSS
mailing list