Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi there, The stand-alone BLAST in windows can't yet support the -i flag allowing retrieval of multiple sequences through fastacmd. I am trying to get around this with a simple script that looks through the accession numbers I want to retrieve and stores these as $id. I then use:
system 'fastacmd -d mydatabase -s $id >output.txt
This runs each time $id gets replaced with a new sequence number.

However this doesnt work - it can't find $id in my database as it doesnt seem to be replacing $id with what is actually stored in $id !

any ideas ?
Thanks,
basm100

Replies are listed 'Best First'.
Re: piping to fastacmd (bioinformatics)
by Abigail-II (Bishop) on Nov 14, 2002 at 17:15 UTC
    That's because you are using single quotes in your string. Use double quotes to get the required interpolation.

    Abigail

Re: piping to fastacmd (bioinformatics)
by Zaxo (Archbishop) on Nov 14, 2002 at 17:15 UTC

    Use double quotes or qq() to get $id to interpolate its value.

    Probably a pasto, but you don't close quotes or end the statement with a semicolon.

    After Compline,
    Zaxo

Re: piping to fastacmd (bioinformatics)
by tommyw (Hermit) on Nov 14, 2002 at 17:17 UTC

    Use " instead of '. Variables don't get replaced (interpolate) inside single quotes.

    --
    Tommy
    Too stupid to live.
    Too stubborn to die.