Using method: app for seq retrieval
simon andrews (BI)
simon.andrews at bbsrc.ac.uk
Tue Jan 22 08:20:09 UTC 2002
> -----Original Message-----
> From: Gene Cutler [mailto:cutler at tularik.com]
> Sent: Monday, January 21, 2002 7:16 PM
> To: emboss at embnet.org
> Subject: Using method: app for seq retrieval
>
>
> I'm trying to follow the docs for using a custom
> app for sequence retrieval.
> I made a test perl script which just prints out a
> fasta sequence to stdout, but I can't get the retrieval
> to work. In my emboss config, I've put
> this:
>
> DB test [
> method: app
> format: fasta
> app: "/usr/local/bin/test.pl %s"
> type: N
> ]
Gene,
I've done this successfully, using the following entry in emboss.default,
where allmus is a perl script which returns a fasta file.
DB allmus [
type: N
method: app
format: fasta
app: "/usr/users/andrewss/bin/allmus"
comment: "Farm of all Mouse Genomic seqs" ]
The database and sequence name will automatically be passed to the script
with this setup. They will be passed in the form "database:accession".
Since I've made my script pretty generic, I use the following snippet to
extract the accession code from what is passed to the script;
my ($reference) = @ARGV;
if ($reference =~ /:(.+)$/){
$reference = $1;
}
else {
die "\n*** ERROR *** Couldn't get accession after : from $reference\n\n";
}
You just then need to use $reference to find your sequence and print it to
STDOUT. I seem to also remember that you have to have the accession number
requested at the start of the fasta header, otherwise you get an error
saying the file could not be found. So if you ask for
"seqret script:cheese"
You have to return a file looking like:
>cheese .....
AGCTAGC...
and not
>chalk ....
ATCGCTA
otherwise seqret will curl up and die.
Hope this helps
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