From cjt01 at uark.edu Sat Jun 25 15:06:51 2005 From: cjt01 at uark.edu (C Thomas) Date: Sat, 25 Jun 2005 14:06:51 -0500 Subject: embInitP documentation? Message-ID: Hi, I'm new to EMBOSS, but I've read a good bit of the documentation on the website, and also have delved into the source code. I want to create a program that doesn't exist in the pre-existing EMBOSS software repository structure - that is, I want the binary to live in any arbitrary place I want. When I try this, it seems that embInit() does not 'see' the ACD file anymore. It looks as if embInitP() may be meant to handle a situation like this: from embinit.c: AjStatus embInitP (const char *pgm, ajint argc, char * const argv[], const char *package) { ajNamInit(package); return ajAcdInit (pgm, argc, argv); } The documentation has this to say about that last argument: package const char* Package name, used to find the ACD file What exactly a package name is, and how it is used to find the ACD file, seems to be left as an exercise to the reader. I've looked at both ajNamInit and ajAcdInit, but the process used to find the ACD file based on that const char *package is still a mystery to me. Can somebody help me? Thanks, and thanks for this awesome software (I'm assuming the emboss authors read this list...) c. thomas From pmr at ebi.ac.uk Sat Jun 25 15:24:53 2005 From: pmr at ebi.ac.uk (pmr at ebi.ac.uk) Date: Sat, 25 Jun 2005 20:24:53 +0100 (BST) Subject: embInitP documentation? In-Reply-To: References: Message-ID: <1340.12.27.2.2.1119727493.squirrel@webmail.ebi.ac.uk> Hi C... > I'm new to EMBOSS, but I've read a good bit of the documentation on > the website, and also have delved into the source code. Welcome!!! > I want to create a program that doesn't exist in the pre-existing > EMBOSS software repository structure - that is, I want the binary to > live in any arbitrary place I want. Ah .... I know that problem. > It looks as if embInitP() may be meant to handle a situation like this: Yes, but as I noticed last month it's not perfect in the current release. > What exactly a package name is, and how it is used to find the ACD > file, seems to be left as an exercise to the reader. In which case, we should give him something better to read! The package is there so that an EMBASSY package (EMBOSS-associated software, maybe with its own licence) can be linked to the EMBOSS libraries and have somewhere to live. Currently, we distribute these in embassy/[packagename]/ and the package variable was there so the ACD file could be found if the program was not installed. EMBOSS will look in embassy/[packagename]/emboss_acd/ to find the ACD file. Putting a symlink in there, and having your ACD file in an emboss_acd directory, should help. If you run your program with -debug on the command line, it should produce a report to [programname].dbg showing where it is looking for your ACD file. For EMBOSS 3.0.0 (due out, as tradition dictates, on 15th July) we have extended the EMBASSY packages to include a "myemboss" package. This is intended for anyone to develop their own programs in an EMBOSS development environment (you need aclocal, autoconf, automake and libtool on your system - all free and saves an enormous amount of makefile editing). With MYEMBOSS installed you can do this: write your application in the myemboss source directory put your ACD file in the myemboss/emboss_acd directory use "myemboss" in your embInitP call define EMBOSS_MYEMBOSSACDROOT to point to where your myemboss/emboss_acd directory is. You can easily use some other package name if appropriate (for example, you may be developing your own "EMBASSY" package - we have several with only one program). Hope that helps. If you need it urgently, I could send you a patch to the ajacd.c source file that will look for the new package ACDROOT variable. Otherwise, you would have to wait 3 weeks (or dive into the CVS developers copy :-) > Thanks, and thanks for this awesome software (I'm assuming the emboss > authors read this list...) You found us! I wrote embInitP :-) Peter Rice From cjt01 at uark.edu Sat Jun 25 22:41:18 2005 From: cjt01 at uark.edu (C Thomas) Date: Sat, 25 Jun 2005 21:41:18 -0500 Subject: embInitP documentation? In-Reply-To: <1668.12.27.2.2.1119734346.squirrel@webmail.ebi.ac.uk> References: <1340.12.27.2.2.1119727493.squirrel@webmail.ebi.ac.uk> <7C9BC354-CC44-4B3D-B526-473B6E94BFA0@uark.edu> <1668.12.27.2.2.1119734346.squirrel@webmail.ebi.ac.uk> Message-ID: <23F70175-93B4-442E-BC1C-B114A4B004F4@uark.edu> Can an ACD specify a variable number of arguments? For example, can I give an arbitrary number of input sequences on the command line? I know about list files, but this would be more useful to me... From cjt01 at uark.edu Sun Jun 26 02:31:27 2005 From: cjt01 at uark.edu (C Thomas) Date: Sun, 26 Jun 2005 01:31:27 -0500 Subject: AcdPAcd destructor Message-ID: <6D8F51BD-050A-46ED-98C0-265A1E7138E0@uark.edu> Does the CVS version of emboss have a destructor for the AcdPAcd object? I would like to send data through ACD more than once during the lifetime of my program. ajAcdExit() doesn't seem to do anything... I was hoping it would clean things up so I could run ajAcdInitP() again, but no luck. c. thomas From pmr at ebi.ac.uk Sun Jun 26 08:26:52 2005 From: pmr at ebi.ac.uk (pmr at ebi.ac.uk) Date: Sun, 26 Jun 2005 13:26:52 +0100 (BST) Subject: AcdPAcd destructor In-Reply-To: <6D8F51BD-050A-46ED-98C0-265A1E7138E0@uark.edu> References: <6D8F51BD-050A-46ED-98C0-265A1E7138E0@uark.edu> Message-ID: <1452.12.27.2.2.1119788812.squirrel@webmail.ebi.ac.uk> Hi C..., (one day we'll find out what the 'C' stands for :-) > Does the CVS version of emboss have a destructor for the AcdPAcd > object? I would like to send data through ACD more than once during > the lifetime of my program. ajAcdExit() doesn't seem to do > anything... I was hoping it would clean things up so I could run > ajAcdInitP() again, but no luck. As embInitP is meant to be called just once, at startup, there is no application in EMBOSS that required a destructor. We should have one, of course, but there is rather more needed to properly cleanup and restore the initial state of ACD processing.. It would help if you could explain a little more why you want to be a little heretical and call embInit (or embInitP) more than once. One thing I'm curious about is where the other commandlines are coming from :-) I can think of some good use cases. We could use a code stub to check how well we can cleanup. regards, Peter From pmr at ebi.ac.uk Sun Jun 26 08:31:19 2005 From: pmr at ebi.ac.uk (pmr at ebi.ac.uk) Date: Sun, 26 Jun 2005 13:31:19 +0100 (BST) Subject: embInitP documentation? In-Reply-To: <23F70175-93B4-442E-BC1C-B114A4B004F4@uark.edu> References: <1340.12.27.2.2.1119727493.squirrel@webmail.ebi.ac.uk> <7C9BC354-CC44-4B3D-B526-473B6E94BFA0@uark.edu> <1668.12.27.2.2.1119734346.squirrel@webmail.ebi.ac.uk> <23F70175-93B4-442E-BC1C-B114A4B004F4@uark.edu> Message-ID: <1455.12.27.2.2.1119789079.squirrel@webmail.ebi.ac.uk> Hi C..., > Can an ACD specify a variable number of arguments? For example, can > I give an arbitrary number of input sequences on the command line? I > know about list files, but this would be more useful to me... In ACD (EMBOSS) terms, I assume you are asking about "parameters" - things that appear on the commandline without a qualifier name. We need to be able to count these, so having anything that appears as a list of more than one string is not possible. Shell wildcard processing is a pain in this respect. The solution is to quote your list so it can appear as a single parameter, and then process the value(s) in ACD. Can you give a more specific example so I can chekc on what we already have for that datatype/ regards, Peter From cjt01 at uark.edu Sun Jun 26 16:14:47 2005 From: cjt01 at uark.edu (C Thomas) Date: Sun, 26 Jun 2005 15:14:47 -0500 Subject: solved Message-ID: <449F19F0-B3F9-4CFE-BF9E-2FF0D6A9BBDC@uark.edu> Ah... It seems I was trying to do things the wrong way. Everything is clear now; I was trying to use ACD for something it was never intended for. Digging a little deeper, I found that I can easily get a sequence object from a USA whenever I need to. Not sure why I didn't try that first... c. thomas From pmr at ebi.ac.uk Sun Jun 26 18:59:21 2005 From: pmr at ebi.ac.uk (pmr at ebi.ac.uk) Date: Sun, 26 Jun 2005 23:59:21 +0100 (BST) Subject: solved In-Reply-To: <449F19F0-B3F9-4CFE-BF9E-2FF0D6A9BBDC@uark.edu> References: <449F19F0-B3F9-4CFE-BF9E-2FF0D6A9BBDC@uark.edu> Message-ID: <2341.12.27.2.2.1119826761.squirrel@webmail.ebi.ac.uk> Hi C..., > Ah... It seems I was trying to do things the wrong way. Everything > is clear now; I was trying to use ACD for something it was never > intended for. Digging a little deeper, I found that I can easily get > a sequence object from a USA whenever I need to. Not sure why I > didn't try that first... Strange as it may seem, you could still be in slightly uncharted territory - issues such as where the formats are set, and some of the options that ACD handles automatically. Just ask for help if you find anythign weird. In theory there should be code in the ajSeq functions to do all this, but in practice some things are known only in the ACD processing. We should fix that of course - just as soon as it impacts on anyone else :-) regards, Peter From cjt01 at uark.edu Sat Jun 25 19:06:51 2005 From: cjt01 at uark.edu (C Thomas) Date: Sat, 25 Jun 2005 14:06:51 -0500 Subject: embInitP documentation? Message-ID: Hi, I'm new to EMBOSS, but I've read a good bit of the documentation on the website, and also have delved into the source code. I want to create a program that doesn't exist in the pre-existing EMBOSS software repository structure - that is, I want the binary to live in any arbitrary place I want. When I try this, it seems that embInit() does not 'see' the ACD file anymore. It looks as if embInitP() may be meant to handle a situation like this: from embinit.c: AjStatus embInitP (const char *pgm, ajint argc, char * const argv[], const char *package) { ajNamInit(package); return ajAcdInit (pgm, argc, argv); } The documentation has this to say about that last argument: package const char* Package name, used to find the ACD file What exactly a package name is, and how it is used to find the ACD file, seems to be left as an exercise to the reader. I've looked at both ajNamInit and ajAcdInit, but the process used to find the ACD file based on that const char *package is still a mystery to me. Can somebody help me? Thanks, and thanks for this awesome software (I'm assuming the emboss authors read this list...) c. thomas From pmr at ebi.ac.uk Sat Jun 25 19:24:53 2005 From: pmr at ebi.ac.uk (pmr at ebi.ac.uk) Date: Sat, 25 Jun 2005 20:24:53 +0100 (BST) Subject: embInitP documentation? In-Reply-To: References: Message-ID: <1340.12.27.2.2.1119727493.squirrel@webmail.ebi.ac.uk> Hi C... > I'm new to EMBOSS, but I've read a good bit of the documentation on > the website, and also have delved into the source code. Welcome!!! > I want to create a program that doesn't exist in the pre-existing > EMBOSS software repository structure - that is, I want the binary to > live in any arbitrary place I want. Ah .... I know that problem. > It looks as if embInitP() may be meant to handle a situation like this: Yes, but as I noticed last month it's not perfect in the current release. > What exactly a package name is, and how it is used to find the ACD > file, seems to be left as an exercise to the reader. In which case, we should give him something better to read! The package is there so that an EMBASSY package (EMBOSS-associated software, maybe with its own licence) can be linked to the EMBOSS libraries and have somewhere to live. Currently, we distribute these in embassy/[packagename]/ and the package variable was there so the ACD file could be found if the program was not installed. EMBOSS will look in embassy/[packagename]/emboss_acd/ to find the ACD file. Putting a symlink in there, and having your ACD file in an emboss_acd directory, should help. If you run your program with -debug on the command line, it should produce a report to [programname].dbg showing where it is looking for your ACD file. For EMBOSS 3.0.0 (due out, as tradition dictates, on 15th July) we have extended the EMBASSY packages to include a "myemboss" package. This is intended for anyone to develop their own programs in an EMBOSS development environment (you need aclocal, autoconf, automake and libtool on your system - all free and saves an enormous amount of makefile editing). With MYEMBOSS installed you can do this: write your application in the myemboss source directory put your ACD file in the myemboss/emboss_acd directory use "myemboss" in your embInitP call define EMBOSS_MYEMBOSSACDROOT to point to where your myemboss/emboss_acd directory is. You can easily use some other package name if appropriate (for example, you may be developing your own "EMBASSY" package - we have several with only one program). Hope that helps. If you need it urgently, I could send you a patch to the ajacd.c source file that will look for the new package ACDROOT variable. Otherwise, you would have to wait 3 weeks (or dive into the CVS developers copy :-) > Thanks, and thanks for this awesome software (I'm assuming the emboss > authors read this list...) You found us! I wrote embInitP :-) Peter Rice From cjt01 at uark.edu Sun Jun 26 02:41:18 2005 From: cjt01 at uark.edu (C Thomas) Date: Sat, 25 Jun 2005 21:41:18 -0500 Subject: embInitP documentation? In-Reply-To: <1668.12.27.2.2.1119734346.squirrel@webmail.ebi.ac.uk> References: <1340.12.27.2.2.1119727493.squirrel@webmail.ebi.ac.uk> <7C9BC354-CC44-4B3D-B526-473B6E94BFA0@uark.edu> <1668.12.27.2.2.1119734346.squirrel@webmail.ebi.ac.uk> Message-ID: <23F70175-93B4-442E-BC1C-B114A4B004F4@uark.edu> Can an ACD specify a variable number of arguments? For example, can I give an arbitrary number of input sequences on the command line? I know about list files, but this would be more useful to me... From cjt01 at uark.edu Sun Jun 26 06:31:27 2005 From: cjt01 at uark.edu (C Thomas) Date: Sun, 26 Jun 2005 01:31:27 -0500 Subject: AcdPAcd destructor Message-ID: <6D8F51BD-050A-46ED-98C0-265A1E7138E0@uark.edu> Does the CVS version of emboss have a destructor for the AcdPAcd object? I would like to send data through ACD more than once during the lifetime of my program. ajAcdExit() doesn't seem to do anything... I was hoping it would clean things up so I could run ajAcdInitP() again, but no luck. c. thomas From pmr at ebi.ac.uk Sun Jun 26 12:26:52 2005 From: pmr at ebi.ac.uk (pmr at ebi.ac.uk) Date: Sun, 26 Jun 2005 13:26:52 +0100 (BST) Subject: AcdPAcd destructor In-Reply-To: <6D8F51BD-050A-46ED-98C0-265A1E7138E0@uark.edu> References: <6D8F51BD-050A-46ED-98C0-265A1E7138E0@uark.edu> Message-ID: <1452.12.27.2.2.1119788812.squirrel@webmail.ebi.ac.uk> Hi C..., (one day we'll find out what the 'C' stands for :-) > Does the CVS version of emboss have a destructor for the AcdPAcd > object? I would like to send data through ACD more than once during > the lifetime of my program. ajAcdExit() doesn't seem to do > anything... I was hoping it would clean things up so I could run > ajAcdInitP() again, but no luck. As embInitP is meant to be called just once, at startup, there is no application in EMBOSS that required a destructor. We should have one, of course, but there is rather more needed to properly cleanup and restore the initial state of ACD processing.. It would help if you could explain a little more why you want to be a little heretical and call embInit (or embInitP) more than once. One thing I'm curious about is where the other commandlines are coming from :-) I can think of some good use cases. We could use a code stub to check how well we can cleanup. regards, Peter From pmr at ebi.ac.uk Sun Jun 26 12:31:19 2005 From: pmr at ebi.ac.uk (pmr at ebi.ac.uk) Date: Sun, 26 Jun 2005 13:31:19 +0100 (BST) Subject: embInitP documentation? In-Reply-To: <23F70175-93B4-442E-BC1C-B114A4B004F4@uark.edu> References: <1340.12.27.2.2.1119727493.squirrel@webmail.ebi.ac.uk> <7C9BC354-CC44-4B3D-B526-473B6E94BFA0@uark.edu> <1668.12.27.2.2.1119734346.squirrel@webmail.ebi.ac.uk> <23F70175-93B4-442E-BC1C-B114A4B004F4@uark.edu> Message-ID: <1455.12.27.2.2.1119789079.squirrel@webmail.ebi.ac.uk> Hi C..., > Can an ACD specify a variable number of arguments? For example, can > I give an arbitrary number of input sequences on the command line? I > know about list files, but this would be more useful to me... In ACD (EMBOSS) terms, I assume you are asking about "parameters" - things that appear on the commandline without a qualifier name. We need to be able to count these, so having anything that appears as a list of more than one string is not possible. Shell wildcard processing is a pain in this respect. The solution is to quote your list so it can appear as a single parameter, and then process the value(s) in ACD. Can you give a more specific example so I can chekc on what we already have for that datatype/ regards, Peter From cjt01 at uark.edu Sun Jun 26 20:14:47 2005 From: cjt01 at uark.edu (C Thomas) Date: Sun, 26 Jun 2005 15:14:47 -0500 Subject: solved Message-ID: <449F19F0-B3F9-4CFE-BF9E-2FF0D6A9BBDC@uark.edu> Ah... It seems I was trying to do things the wrong way. Everything is clear now; I was trying to use ACD for something it was never intended for. Digging a little deeper, I found that I can easily get a sequence object from a USA whenever I need to. Not sure why I didn't try that first... c. thomas From pmr at ebi.ac.uk Sun Jun 26 22:59:21 2005 From: pmr at ebi.ac.uk (pmr at ebi.ac.uk) Date: Sun, 26 Jun 2005 23:59:21 +0100 (BST) Subject: solved In-Reply-To: <449F19F0-B3F9-4CFE-BF9E-2FF0D6A9BBDC@uark.edu> References: <449F19F0-B3F9-4CFE-BF9E-2FF0D6A9BBDC@uark.edu> Message-ID: <2341.12.27.2.2.1119826761.squirrel@webmail.ebi.ac.uk> Hi C..., > Ah... It seems I was trying to do things the wrong way. Everything > is clear now; I was trying to use ACD for something it was never > intended for. Digging a little deeper, I found that I can easily get > a sequence object from a USA whenever I need to. Not sure why I > didn't try that first... Strange as it may seem, you could still be in slightly uncharted territory - issues such as where the formats are set, and some of the options that ACD handles automatically. Just ask for help if you find anythign weird. In theory there should be code in the ajSeq functions to do all this, but in practice some things are known only in the ACD processing. We should fix that of course - just as soon as it impacts on anyone else :-) regards, Peter