Warning, /readme is written in an unsupported language. File is not indexed.
NCBI SOFTWARE DEVELOPMENT TOOLKIT National Center for Biotechnology Information Bldg 38A, NIH 8600 Rockville Pike Bethesda, MD 20894 The NCBI Software Development Toolkit was developed for the production and distribution of GenBank, Entrez, BLAST, and related services by NCBI. We make it freely available to the public without restriction to facilitate the use of NCBI by the scientific community. However, please understand that while we feel we have done a high quality job, this is not commercial software. The documentation lags considerably behind the software and we must make any changes required by our data production needs. Nontheless, many people have found it a useful and stable basis for a number of tools and applications. The toolkit is available by anonymous ftp from ftp.ncbi.nih.gov cd toolbox cd ncbi_tools bin get ncbi.tar.Z (compressed UNIX tar file) quit In this same directory are also ncbiz.exe (DOS self extracting archive) and ncbi.hqx (Mac self extracting archive). All three files contain the same source code and will make the toolkit for all platforms. Please feel free to email questions/suggestions to: toolbox@ncbi.nlm.nih.gov If you would like hardcopy of the current documentation, send your mailing address with your request to the email address above. If you are considering a serious development project using this toolkit, please contact us. We are happy to discuss compatible strategies and inform you of our longer term plans. There is no limitation of the use of this code or in contacting us about its use for commercial, academic, or government groups. =========================================================================== Version 6.1 the date of release may be obtained from the file ncbi/VERSION =========================================================================== Summary The procedure of building the toolkit on Unix was slightly changed. Now there is no need to download any binary NCBI product for your platform to obtain the platform-specific ncbi.mk file. To build the NCBI toolkit you need to look for platform-dependent instructions: For UNIX (including Linux and Mac OS X): look at the file make/readme.unx For alternative Mac instructions (using CodeWarrior): look at the file make/readme.mac For Microsoft Windows95/98/NT: look at the file make/readme.dos There is some information which may be useful for NCBI tookit building in the file doc/FAQ.txt This release includes source code for the new (2.0.9) version of BLAST. Look at the file doc/README.bls for more detailed documentation on stand-alone BLAST. The file doc/README.pbl has the information about PowerBLAST. And the description on Integrating Matrix Profiles And Local Alignments (IMPALA) is located in the file doc/README.imp The file doc/sequin.htm describes the SEQUIN and its configuration. If you have problems configuring Entrez with a firewall, look at the file doc/firewall.txt This file has a section called CONFIGURATION OR SETTINGS FILES, which explains in detail how our configuration system works. The ncbi config file (.ncbirc on UNIX, ncbi.ini on PC/Windows, and ncbi.cnf on Macintosh) is needed in order to find data files, such as gc.val (the genetic code table), provided in the toolkit or with programs like Sequin. (The asnload files containing dynamic versions of the ASN.1 parse tables are no longer needed, since all platforms can now have large static data.) It has recently become possible to eliminate the need for the ncbi config file by calling UseLocalAsnloadDataAndErrMsg () at the beginning of your program. This looks for the data directory in the same directory as the running program. If it doesn't find it, it looks up one level, in case you are compiling programs in the build directory of the toolkit. If it finds the data directory in either of these places, it transiently sets the location, so code that loads these files is given the correct path. An even more recent change is that copies of several of our data files (gc, seqcode, and featdef) are now built into the source code, so if the data directory is not found, programs that require only these can still run. One final improvement is that access to our network services is now much simpler than before, so if you are not behind a firewall and have domain name server (DNS) available you can connect to our network without needing any configuration information in the ncbi config file. Operation behind a firewall, or with a proxy, requires very little in the ncbi config file, and this is easily created by asking Sequin to configure for network access. ============================================================================= Notes from Previous Releases ============================================================================= ============================================================================= Version 6.0 the date of release may be obtained from the file ncbi/VERSION ============================================================================= This release includes source code for the new (2.0) version of BLAST. Also included are a small number of incremental changes in the ASN.1 specification. BLAST 2.0 - BLAST 2.0 can produce gapped alignments and is capable of position-specific-iterated BLASTp (PSI-BLAST). Compared to the 1.4 release of BLAST, there are also signficant performance enhancements as well as extensive changes to the text report and the format of the databases. BLAST 2.0 uses threads for multi-processing, using the NCBI threads library. Three BLAST programs may be compiled in the demo directory. They are: formatdb: formats FASTA files as BLAST databases for BLAST 2.0. blastall: perform all five flavors of blast comparison. blastn and blastp offer fully gapped alignments. blastx and tblastn have 'in-frame' gapped alignments and use sum statistics to link alignments from different frames. tblastx provides only ungapped alignments. blastpgp: performs gapped blastp searches and can be used to perform iterative searches in psi-blast mode. Additional information may be obtained from the README in the BLAST directory of the FTP site and from the NCBI BLAST pages. ASN.1 Spec Changes for 1997 biblio.asn Cit-pat - some fields made optional to allow patent applications to be legal Cit-pat.number OPTIONAL Cit-pat.date-issue OPTIONAL -- Patent number and date-issue were made optional in 1997 to -- support patent applications being issued from the USPTO -- Semantically a Cit-pat must have either a patent number or -- an application number (or both) to be valid medline.asn added ML-field to support other MEDLINE line types Medline-entry ::= SEQUENCE { uid INTEGER OPTIONAL , -- MEDLINE UID, sometimes not yet available if from PubMed em Date , -- Entry Month ... (not shown) pmid PubMedId OPTIONAL , -- MEDLINE records may include the PubMedId pub-type SET OF VisibleString OPTIONAL, -- may show publication types (review, etc) mlfield SET OF Medline-field OPTIONAL } -- additional Medline field types Medline-field ::= SEQUENCE { type INTEGER { -- Keyed type other (0) , -- look in line code comment (1) , -- comment line erratum (2) } , -- retracted, corrected, etc str VisibleString , -- the text ids SEQUENCE OF DocRef OPTIONAL } -- pointers relevant to this text DocRef ::= SEQUENCE { -- reference to a document type INTEGER { medline (1) , pubmed (2) , ncbigi (3) } , uid INTEGER } seq.asn MolInfo.tech - added names for HTG classes already implemented Annotdesc.region - added seqloc. If present, all annots in this SeqAnnot are within this region. Optimization on big seqs. seqfeat.asn added OrgMod.specimen-voucher - new organism qualifier added OrgMod.old-name - used internally at NCBI added BioSource.is-focus - for distinguishing biological focus of multiple source features. added Seq-feat.pseudo so any feature can be flagged explicitly as belonging to a pseudogene added Seq-feat.except-text for an explanation of the exception when Seq-feat.except is TRUE. Currently this text is in Seq-feat.comment in backbone records and GBQuals in some other genbank records. ============================================================================= Notes from Previous Releases ============================================================================= Version 5.0 Summary This release includes a small number of incremental changes in the ASN.1 specification. Most significant is the addition of the PubMedID, a bibliographic citation identifier similar to a MEDLINE UID. PubMed is a new citation database being developed at NCBI which is a superset of MEDLINE. It will be an avenue by which publishers can deposit electronic versions of their citations and abstracts to allow them timely linking to network entrez from the publishers on-line services. PubMed will route these citations to MEDLINE and they will appear in MEDLINE (and Entrez) after the usual MEDLINE indexing. However, for some period of time, such articles will have only a PubMedID. We would like to switch Entrez over to supporting PubMedIDs as early as possible. WE STRONGLY ENCOURAGE DEVELOPERS TO RECOMPILE AND RELINK WITH THIS VERSION OF THE TOOLKIT AS SOON AS POSSIBLE. The changes in this specification should not cause problems with existing software, so a simple compile and link should be enough to make you compatible. Details of ASN.1 specification changes are listed below. There has been considerable development of the toolkit in other aspects as well, many of which are embodied in sequin, the new NCBI direct submission tool, which is included in the toolkit as well. In the interest of getting the PubMed changes into the specification and developers hands promptly, we have not included much on that aspect of this toolkit at this time. Changes in the 1996 NCBI ASN.1 (version 5.0) specification Once again, there are very few changes to the NCBI ASN.1 specification this year. The biggest change is the addition of the PubMed ID to support the new NCBI PubMed database. There are also small additions to the medline and organism specifications, detailed below. As usual, these changes are also backward compatible with old data. However, you should recompile and relink your applications as soon as possible, since the old applications will not be compatible with the new datatypes. 1) PubMed - NCBI is building a new citation database that is a superset of MEDLINE and which will be linked to online journals from publishers. The bibliographic components of the specification have had support for PubMed IDs added. These include biblio.asn (objbibli.[ch]), pub.asn (objpub.[ch]), medline.asn (objmedli.[ch]). 2) pub-type - MEDLINE includes strings indicating the type of a publication. The medline definition has had the attribute pub-type added to support these strings. From the 1996 MeSH, here's the list. Abstract Bibliography Classical Article Clinical Conference Clinical Trial Clinical Trial, Phase I Clinical Trial, Phase II Clinical Trial, Phase III Clinical Trial, Phase IV Comment Consensus Development Conference Consensus Development Conference, NIH Controlled Clinical Trial Corrected and Republished Article Current Biog-Obit Dictionary Directory Duplicate Publication Editorial Festschrift Guideline Historical Article Historical Biography Interview Journal Article Legal Brief Letter Meeting Report Meta-Analysis Monograph Multicenter Study News Newspaper Article Overall Periodical Index Practice Guideline Published Erratum Randomized Controlled Trial Retracted Publication Retraction of Publication Review Review Literature Review of Reported Cases Review, Academic Review, Multicase Review, Tutorial Scientific Integrity Review Technical Report Twin Study 3) virion - the attribute virion has been added to BioSource.genome. It just complements proviral which was already there. This will map to a /virion qualifier in the new GenBank feature table definition. 4) division - OrgName.div now (optionally) can contain the GenBank division code (eg. PRI). 5) signal-peptide, transit-peptide - were added to Prot-ref, to support annotation of protein features on the protein sequence in a way that could be mapped to a GenBank feature table. That's all. Relevant sections of the asn.1 specification are shown below. ================================================================================ biblio.asn PubMedId ::= INTEGER -- Id from the PubMed database at NCBI and.. Cit-gen ::= SEQUENCE { -- NOT from ANSI, this is a catchall cit VisibleString OPTIONAL , -- anything, not parsable authors Auth-list OPTIONAL , muid INTEGER OPTIONAL , -- medline uid journal Title OPTIONAL , volume VisibleString OPTIONAL , issue VisibleString OPTIONAL , pages VisibleString OPTIONAL , date Date OPTIONAL , serial-number INTEGER OPTIONAL , -- for GenBank style references title VisibleString OPTIONAL , -- eg. cit="unpublished",title="title" pmid PubMedId OPTIONAL } -- PubMed Id pub.asn Pub ::= CHOICE { gen Cit-gen , -- general or generic unparsed sub Cit-sub , -- submission medline Medline-entry , muid INTEGER , -- medline uid article Cit-art , journal Cit-jour , book Cit-book , proc Cit-proc , -- proceedings of a meeting patent Cit-pat , pat-id Id-pat , -- identify a patent man Cit-let , -- manuscript, thesis, or letter equiv Pub-equiv, -- to cite a variety of ways pmid PubMedId } -- PubMedId medline.asn -- a MEDLINE or PubMed entry Medline-entry ::= SEQUENCE { uid INTEGER OPTIONAL , -- MEDLINE UID, sometimes not yet available if from PubMed em Date , -- Entry Month cit Cit-art , -- article citation abstract VisibleString OPTIONAL , mesh SET OF Medline-mesh OPTIONAL , substance SET OF Medline-rn OPTIONAL , xref SET OF Medline-si OPTIONAL , idnum SET OF VisibleString OPTIONAL , -- ID Number (grants, contracts) gene SET OF VisibleString OPTIONAL , pmid PubMedId OPTIONAL , -- MEDLINE records may include the PubMedId pub-type SET OF VisibleString OPTIONAL } -- may show publication types (review, etc) seqfeat.asn OrgName ::= SEQUENCE { name CHOICE { binomial BinomialOrgName , -- genus/species type name virus VisibleString , -- virus names are different hybrid MultiOrgName , -- hybrid between organisms namedhybrid BinomialOrgName , -- some hybrids have genus x species name partial PartialOrgName } OPTIONAL , -- when genus not known attrib VisibleString OPTIONAL , -- attribution of name mod SEQUENCE OF OrgMod OPTIONAL , lineage VisibleString OPTIONAL , -- lineage with semicolon separators gcode INTEGER OPTIONAL , -- genetic code (see CdRegion) mgcode INTEGER OPTIONAL , -- mitochondrial genetic code div VisibleString OPTIONAL } -- GenBank division code BioSource ::= SEQUENCE { genome INTEGER { -- biological context unknown (0) , genomic (1) , chloroplast (2) , chromoplast (3) , kinetoplast (4) , mitochondrion (5) , plastid (6) , macronuclear (7) , extrachrom (8) , plasmid (9) , transposon (10) , insertion-seq (11) , cyanelle (12) , proviral (13) , virion (14) } DEFAULT unknown , origin INTEGER { unknown (0) , natural (1) , -- normal biological entity natmut (2) , -- naturally occurring mutant mut (3) , -- artificially mutagenized artificial (4) , -- artificially engineered synthetic (5) , -- purely synthetic other (255) } DEFAULT unknown , org Org-ref , subtype SEQUENCE OF SubSource OPTIONAL } Prot-ref ::= SEQUENCE { name SET OF VisibleString OPTIONAL , -- protein name desc VisibleString OPTIONAL , -- description (instead of name) ec SET OF VisibleString OPTIONAL , -- E.C. number(s) activity SET OF VisibleString OPTIONAL , -- activities db SET OF Dbtag OPTIONAL , -- ids in other dbases processed ENUMERATED { -- processing status not-set (0) , preprotein (1) , mature (2) , signal-peptide (3) , transit-peptide (4) } DEFAULT not-set } ============================================================================= Notes from Previous Releases ============================================================================= New Functions in Version 4.0 There are a host of new functions in this release, but as usual we have not managed to make time to document them all. Large parts of Sequin are present which will be announced and described more fully in the fall. However, specific tools of immediate interest are: blast2 - this is the long awaited BLAST client/server which permits structured interaction with BLAST over the internet. We have provided a basic client that produces the traditional blast output. In addition, the function call interface can be used in more elaborate clients. For more information contact Tom Madden, madden@ncbi.nlm.nih.gov WARNING!!! blast2 is the client we plan to support on the longer term. The blast1 client we included for those of you who wanted a head start will NOT be supported in future. Please shift any blast1 clients to the (very similar) blast2 interface as soon as possible. sim, sim2 - protein and DNA sequence alignments in linear space. This is the function call interface to these valuable tools. Applications have been written which are available by ftp as are published papers. For more information contact Jinghui Zhang, zjing@ncbi.nlm.nih.gov Changes in ASN.1 spec 4.0 from 3.0 Affil - biblio.asn added the field "postal-code" for Zip code finally. Contact-info - submit.asn added the field "contact" which is type "Author". The contact info has evolved into a fully structured form, so I just took Author which has structured names and structured address (Affil). We will eventually phase out all the less structured ones in Contact-info. OrgName - sefeat.asn added "lineage", "gcode", "mgcode" for the lineage, genetic code, and mitochondrial genetic code. This is part of Org-ref, and consolidates all the organism info (except original SOURCE line) out of the GenBank block... and enables us to deliver it nicely from Taxon. Seq-descr - seq.asn removed the Seq-descr "neighbors" and replaced it with "dbxref", since neighbors has never been used. This is used to add cross-references to the whole entry. Pubdesc - seq.asn has an added slot, "reftype" which is an integer and is used to indicate the GenBank usage of a reference. 0 - seq - applies to the sequence. This is default and they way it is used now. 1 - sites - applies to (unspecified) features. Equivalent to a GenBank SITES feature. We could switch to this from using the Imp-feat we do now. 2 - feats - applies to specific features. The idea here is provide a place for the full citation, so features nead only reference it. If now features reference it should be removed. This would work for checking content when only a part of a sequence is copied or pasted. A "sites" ref could not have this check since we do not know which features it goes to. Seq-feat - seqfeat.asn added a slot called "dbxref" to Seq-feat. This is a SET OF Dbtag. It will be for adding the new db_xref qualifiers to features. We already have some of these in the xref slots of Gene-ref, Prot-ref, Org-ref. It means we ahve to check two places in these cases. I do not want to retire the slots since these were meant to be used in other contexts besides features.. and Org-ref already is. added a slot called "anticodon" to the tRNA extension of the RNA feature. This is a Seq-loc that points to the location of the anticodon in a tRNA. We have been populating this data in a User-object, and will have to do a retro to convert it. EXPORTED Genetic-code Seq-align - seqalign.asn added "bounds" to Seq-align so you can record the regions over which an alignment was computed.. not always included in the resulting alignment itself. added two new types: A) Packed-seg -- a denser representation from Colombe and Jinghui B) disc - discontinuous alignments as a SEQUENCE OF Seq-align Seq-annot - seq.asn added a field to Seq-annot, Align-def, to discriminate types of alignment sets. This has the advantage of minimal changes as well as separating sets of alignments from conceptually single alignments. I am not sure it is necessary to distinguish "alt" from "blocks" though. Also it means you can attach more info, with other Seq-annot fields and/or by expanding the Align-def. I put in "ids" in Align-def specifically to put the one Seq-id that is the "master" for type "ref". I made it a SET OF so we could use it for other collections where we might want to list more than one. added "ids" and "locs" as allowed types within Seq-annot. This would enable us to pass lists like this around between tools with all the addtional descriptive information in Annotdesc. I know this will be useful. added "general" to Annot-id for tracking 3rd party annotations. Introduction This distribution is release 5.0 of the NCBI core library for building portable software, and AsnLib, a collection of routines for handling ASN.1 data and developing ASN.1 software applications. AsnLib and the asntool application are built using the CoreLib routines. In the \doc directory is an MS Word file which details the information given below. It is also available as hardcopy. See the README in \doc. The lowest layer of code is the CoreLib. These are multi- platform functions for memory allocation (including byte stores), string manipulation, file input and output, error and general messages, and time and date notification. These functions have been written only where we found that the existing ANSI functions were not sufficiently multi-platform or well- behaved among all of the platforms that we support. For each platform (a combination of processor, operating system, compiler, and windowing system), we supply a specific ncbilcl.h file, which contains typedefs and defines for multi-platform symbols, and includes a number of standard header files. (For example, ncbilcl.msw is used for the Microsoft C compiler under Microsoft Windows on the PC.) Use of these symbols, and of the functions in the CoreLib, allow us to write multi-platform source code for a variety of disparate platforms. The next layer of code is the AsnLib stream reader. This is used in conjunction with a header file and a parse table loader file, both of which are produced by processing the formal ASN.1 specification with the AsnTool application. The symbolic defines in the header file are pointers into the parse table, in which the ASN.1 specification is represented. To read at the stream reader level, a program alternates between calls to AsnReadId and AsnReadVal. AsnReadId returns a pointer into the parse table, which can be compared against the defines in the AsnTool-generated header. For example, in the specification for MEDLINE records, the Medline-entry section has an item called "uid", for the unique ID of the record. This is symbolized in the header file as MEDLINE_ENTRY_uid. When AsnReadId returns this symbol, the program calls AsnReadVal to obtain the uid for that record. AsnKillValue is also needed to free any memory allocated by AsnReadVal, which occurs when the value is a string and not an integer. The entire set of records on the Entrez CD-ROM can be read as a single stream with the AsnLib functions. The ASN.1 records may be accessed at a higher level through the object loaders, which utilize the stream processing functions to load C memory structures with the contents of the ASN.1 objects. For each ASN.1 object we specify, we also define an equivalent C memory structure. The object loader level of code contains functions to read and write each ASN.1 object. These are hierarchical, as are the ASN.1 specifications. Calling the top level loader, SeqEntryAsnRead, will load an entire SeqEntry from an open AsnIo channel, and will return a pointer to the loaded memory structure. The read function for an AsnIo channel can be swapped to refer to a normal disk file, a network socket, or to compressed data, which it automatically decompresses. The object loader code can interconvert between the highly-branched memory object and a linear ASN.1 message with complete fidelity. The object loaders have additional functions, including the ability to explore the structure and notify the program when particular data elements are encountered. The entire contents of the Entrez CD-ROM can also be streamed through the object loaders. However, most calls to the object loaders for simply reading a particular record are done via the data access functions (see below). The data access functions allow a program to call the object loaders on a sequence or MEDLINE record given the uid of the record. This will get the data into memory regardless of whether the data are compressed on the Entrez CD-ROM or are obtained through a service over the Internet. This means that a detailed understanding of the files and formats on the Entrez disc is not needed by application programmers. The function to load a sequence record, SeqEntryGet, needs the uid to retrieve and a complexity code parameter. A sequence record is in the form of a NucProt set. This contains a nucleotide (which may itself be composed of segments) and all of the proteins it is known to encode. The set of segments is called a SegSet, and the individual sequences are called BioSeqs. We have taken the liberty of producing this integrated view, but the complexity code parameter allows the record to be easily loaded in a simpler, more traditional form, if desired. The accession number term list is built to supply the proper uids to support this facility. This access library is compatible with Entrez release 1.0 or later only. The sequence utilities and application programmer interface layer allows exploration of the loaded memory structures and generation of standard literature or sequence reports from those objects. For example, a BioSeq can be converted to FASTA or GenBank flat file formats and saved to a file, and a MEDLINE record can be saved in MEDLARS format, which is suitable for entry into personal bibliographic database programs. A sequence port can be opened that gives a simple, linear view of a segmented sequence, converting alphabets, merging exon segments, and dealing with information on both strands of the DNA. This layer also includes some functions to explore the NucProt set. The explore functions visit each individual BioSeq in the set, calling a callback function for each sequence node so that a program can examine feature tables and other information that are associated with the NucProt or SegSets or with the individual sequences. Vibrant is a multi-platform user interface development library that runs on the Macintosh, Microsoft Windows on the PC, or X11 and OSF/Motif on UNIX and VAX computers [separate documentation]. It is used to build the graphical interface for the Entrez application (whose source code is in the browser directory). The philosophy behind Vibrant is that everything in the published user interface guidelines (the generic behavior of windows, menus, buttons, etc.), as well as positioning and sizing of graphical control objects, is taken care of automatically. The program provides callback functions that are notified when the user has manipulated an object. Vibrant and Entrez code are not supported, but are provided on an as-is basis. The advantage of using AsnLib and the object loaders, as they are implemented, is that application program developers merely need to recompile their programs with the new (AsnTool-generated) header files and load the new parse tables (included with the Entrez software) in order to be able to read the new data. This process is straightforward, and will not break existing program code. The application is free to ignore new fields if it does not choose to take advantage of the new kinds of information. When developing new ASN.1 specifications, as of June 1994 it is possible to automatically generate the object loaders and header files for those specifications, using the AsnCode utility. For some complex ASN.1 specifications, however, AsnCode may fail to generate the correct source code. The documentation is currently being brought up to date. The programs in the demo directory are designed to teach the proper use of many of the functions discussed above. Many of these programs are not yet documented. The simplest is testcore.c, which tests various functions in the CoreLib. The most complex is getfeat.c, which takes an accession number of locus name, determines the unique seq ID, retrieves the entry from the Entrez CD-ROM using the data access library, locates all coding region features using the explore functions, and prints the DNA sequences of all exons using sequence port functions. If you cannot extract and print the doc.tar.Z file, please send an email message with your land mailing address and phone number to toolbox@ncbi.nlm.nih.gov, and we will mail a copy to you. The contents of the ncbi directory (the highest level, containing the NCBI Software Development Kit source code in several subdirectories) is shown below. The readme file contains instructions on copying the appropriate make files to be built in the build directory. The makeall file copies headers to the include directory builds four libraries (ncbi, ncbiobj, ncbicdr and vibrant), copying them to the lib directory. The makedemo file builds the demo programs and the Entrez application: api Application Programmer Interface, Sequence Utilities asn ASN.1 specifications for publications and sequences asnlib Source code for AsnLib and asntool asnload AsnLib headers and dynamic parse tables (Mac and PC) asnstat AsnLib headers that use static memory (UNIX and VMS) bin Asntool executable copied here biostruc Source code for Molecular Modelling DataBase functions browser Source code for Entrez application build Empty directory for building tools and libraries cdromlib Access routines for data on the Entrez CD-ROM cn3d Source code for Vibrant-based 3D structure viewer config Configuration files for NCBI software: mac unix vms win corelib Source code for NCBI Core Software Library data Data files used for sequence conversion demo AsnLib and sequence utility demonstration programs desktop Source code for Vibrant-based viewers and editors doc Documentation in Microsoft Word file include Include files required by applications are copied here lib Libraries copied here link Contains several subdirectories with build accessory files: macmet Macintosh Metrowerks/CodeWarrior macmpw Macintosh MPW C mswin Microsoft C and Borland C for Windows make Make files for various systems network Network version of data access apple blast2 encrypt entrez netmanag nsclilib object Functions for reading and writing complex objects sequin Source code for Sequin application tools Source code for alignment and other contributed utilities readme File that contains important building instructions vibrant Source code for Vibrant portable interface package The platforms that are supported (as indicated by the suffix on the relevant ncbilcl.h file) are shown below. Those marked with an asterisk (*) are available as-is: 370* IBM 370 acc SUN acc compiler alf DEC Alpha under OSF/1 aov DEC Alpha under AXP/OpenVMS aux* Macintosh A/UX bor Borland for DOS bwn Borland for Microsoft Windows ccr CenterLine CodeCenter cpp SUN C++ cra* Cray cvx* Convex gcc Gnu gcc (under SunOS, not Solaris) hp * Hewlett Packard lna* Linux on DEC Alpha lnx Linux (RedHat Linux release 5.2 with kernel 2.0.36) met Macintosh Metrowerks compiler mpw Macintosh Programmer's Workshop msc Microsoft C for DOS msw Microsoft for Windows nxt* NeXT r6k* IBM RS 6000 scr CodeCenter under Sun Solaris sgi Silicon Graphics sin Sun Solaris on Intel processors sol Sun Solaris (for cc and gcc) thc THINK C on Macintosh ult DEC ULTRIX vms DEC VAX/VMS Questions or comments can be directed to toolbox@ncbi.nlm.nih.gov. ANSI C: This software requires an ANSI C compiler. This will be no problem at all except to people on Sun machines, where the bundled C compiler, cc, is non-ansi. However, you can use the Sun unbundled compiler, acc, or the Gnu compiler, gcc (which is free) and that works just fine. If you have written applications on the Sun with non-ANSI functions, the ANSI compilers will complain. See the notes below if this is a problem. Installation To build the NCBI toolkit you need to look for platform-dependent instructions: For UNIX: look at the file make/readme.unx For Mac: look at the file make/readme.mac For Microsoft Windows95/98/NT: look at the file make/readme.dos There is some information which may be useful for NCBI tookit building in the file doc/FAQ.txt ALL - change to the directory above ncbi subdirectory Unix tested on Sun Sparc (Solaris 2.6, Sunos 4.1.3), Silicon Graphics IRIX 5.* and 6.*, DEC Alpha with OSF/1 V5.1, Linux (Red Hat Linux release 6.2 with kernel 2.2.16) on Intel, Sun Solaris for Intel (Solaris 2.7). Run the script ncbi/make/makedis.csh keeping it's output in the separate file: for sh or bash: ncbi/make/makedis.csh 2>&1 | tee out.makedis.csh for csh or tcsh: ncbi/make/makedis.csh |& tee out.makedis.csh If that script gives you an error like this: Your platform is not supported. To port ncbi toolkit to your platform consult the files platform/*.ncbi.mk then you should check the script ncbi/make/makedis.csh and add proper platform-dependent ncbi.mk file in ncbi/platform directory. Other UNIX: AIX, ULTRIX, NeXt, Sun acc, Follows models above. Read header in makeall.unx and makedemo.unx for details. for all UNIX, edit .ncbirc as described in section "CONFIGURATION OR SETTINGS FILES". optional edit .login to "setenv NCBI=[path to .ncbirc file]" MS-DOS look at the file make/readme.dos Mac tested on CodeWarrior IDE 2.1, MacOS 8.0 All - copy config:mac:ncbi.cnf to your System Folder, or to the System Folder:Preferences subfolder edit the "ASNLOAD" line in "ncbi.cnf" to point to the ncbi:asnload directory in this release edit the "DATA" line to point to the ncbi/data directory CodeWarrior - raise Preferred Size of Script Editor from 700 to 3000, and raise Preferred Size of CodeWarrior IDE 2.1 by 2000 (e.g., from 8206 to 10206), using Get Info from the Finder. to compile for MC680x0 platform (default is PowerPC), change property MASTER from "PPC" to "68K". run copyhdrs.met run makeall.met run makenet.met run makedemo.met Think C - no longer supported MPW C - no longer supported Changes to VMS make file naming conventions: The old .dcl prefix (last character is a lower case L) was changed to .dc1 (last character is the numeral 1) to allow for different make files for DecWindows 1.1 and DecWindows 1.2. Several new .dc2 files were contributed by David Mathog of CalTech. A synopsis of his additional instructions: VAX C DecWindows 1.1 Use .dcl1 files. DEC C DecWindows 1.1 Use .dcl1 files, but change cc to cc/standard=vaxc VAX C DecWindows 1.2 This combination has not been tested. DEC C DecWindows 1.2 Use .dcl2 files. VMS (without Vibrant) on VAX $set def [ncbi.build] $copy [-.make]*.dc1 *.com $@makeall check ncbi.cfg as described in section "CONFIGURATION OR SETTINGS FILES". edit LOGIN.COM to "define NCBI [path to ncbi.cfg file]" To make demos: $@makedemo VMS (with Vibrant) on VAX $set def [ncbi.build] $copy [-.make]*.dc1 *.com $@viball check ncbi.cfg as described in section "CONFIGURATION OR SETTINGS FILES". edit LOGIN.COM to "define NCBI [path to ncbi.cfg file]" To make demos: $@vibdemo Testing VMS only: look in rundemo.dc1 in [make] to see how to give command line arguments. Not all demo programs are shown. Run at least testcore. All else: In build should be a program called testcore. Type "testcore -" and it should show you some default arguments. Type "testcore" and it will run through a variety of functions in CoreLib, prompting you for responses along the way. It should run without a crash or error report. If you made Vibrant versions all demos will have startup dialog boxes. If not, they take command line arguments. If testcore runs, read the documentation for CoreLib and for AsnLib. In the AsnLib documentation are instructions for running asntool itself. for running a few of the demo programs. There are a large number of demo programs now (including Entrez itself, if you made the Vibrant versions). CONFIGURATION OR SETTINGS FILES: One of the fundamental problems in writing portable software concerns configuration issues. Each individual user's computer will have its own particular hardware and software environment, and each machine will have its disk file hierarchy set up in a unique manner. A program that needs accessory information, such as help files, parse tables, or format converters, must be given a means of finding the data regardless of where the user has placed the files. The difficulty is compounded by the different conventions for naming files and specifying paths on each class of machine. For example, the name of a CD-ROM on the Macintosh is fixed, determined by information on the CD itself, whereas on the PC it is addressed by a drive letter, which can be assigned by the user, but which cannot be reconciled with the name the Macintosh sees. An associated problem is that many programs will want to allow the user to make persistent changes to parameters. These parameters typically involve numbers or font specifications, but may also include paths to data files. Some platforms supply such configuration information in preferences files, others in environment variables. Manipulating these settings is platform dependent, as is the format in which the preference is specified. The NCBI Software Toolkit core library addresses these problems by providing configuration or settings files. These are modeled after the .INI files used by Microsoft Windows. Settings files are plain ASCII text files that may be edited by the user or modified by the program. They are divided into sections, each of which is headed by the section name enclosed in square brackets. Below each section heading is a series of key=value strings, somewhat analogous to the environment variables that are used on many platforms. The ncbi configuration file supplies general purpose configuration information on paths for commonly used data files. The typical file set up for the Entrez application running on the PC under Microsoft Windows is shown below: [NCBI] ROOT=D: ASNLOAD=C:\ENTREZ\ASNLOAD\ DATA=C:\ENTREZ\DATA The only section is entitled NCBI. The ROOT entry refers to the path to the Entrez CD-ROM. In this example, the user has configured the machine to use drive letter D. (On the Macintosh, the name of the disc is SEQDATA, which cannot be changed by the user.) The ASNLOAD specifies the path to the ASN.1 parse tables. These files are required by the AsnLib functions, and all higher-level procedures that call them, including the Object Loader, Sequence Utility, and Data Access functions. Files pointed to by the DATA entry contain information necessary to convert biomolecule sequence data into different alphabets (e.g., unpacking the 2-bit nucleotide code stored on the Entrez CD into standard IUPAC letters). Although the contents of a configuration file is similar regardless of platform, the name of the file and its location is platform dependent. If the base name of the configuration file is xxx, then the actual file name is shown below for each platform: Macintosh xxx.cnf Microsoft Windows xxx.INI MS-DOS (without Windows) xxx.CFG UNIX .xxxrc VMS xxx.cfg Samples of such files are in subdirectories of \config. The UNIX version does not have the leading '.' in filename so you can see it. The location in which these files must reside is also platform dependent, and the functions that manipulate the contents may look in several places to find these files. On the Macintosh, the function first looks in the System Folder, then in the Preferences folder within the System Folder. (See the Mac OS X addendum in the next paragraph). Under Microsoft Windows, the file must be in the Windows directory, along with all of the other .INI files. Under DOS without Windows, the function first looks in the current working directory, then in the directory whose path is specified in the NCBI environment variable. Under UNIX and VMS, the current working directory is first checked, then the user's home directory, and finally the directory specified by the NCBI environment variable. (Under UNIX, when it uses the environment variable, it will check for configuration files first without and then with the initial dot.) On the multi- user platforms (UNIX and VMS), the use of the NCBI environment variable allows a common settings file to be used as the default by multiple users. If such a settings file is changed under program control, it is copied over into the user's home directory, and the new copy is modified. The order of searching for settings files ensures that this new copy is used in all subsequent operations. On Mac OS X, it first looks for xxx.cnf in username/Library/Preferences, then in package/Contents/Resources, where username is the user's home directory and package is the application package. If it does not find the configuration file, it then switches to UNIX style, looking for .xxxrc in the home directory and then in the current directory. This way Mac OS X applications retain the traditional Mac behavior but can also UNIX style configuration files. contents of ASNLOAD are in ncbi/asnload contents of DATA are in ncbi/data Automatic Generation of code to read and write new ASN.1 messages. (Previously, ASNCODE USAGE) 'asntool' can now generate code for use as ASN.1 readers and writers. This functionality used to be in the program called 'asncode'. There is thus no longer any need for the *.l* files. An example of how to generate this code follows: asntool -m YOURSPEC.asn -G -B genYOURSPEC Both genYOURSPEC.h and genYOURSPEC.c will be generated. Within asn ASN.1 definitions, types can be EXPORTed and IMPORTed. If YOURSPEC.asn imports definitions from otherspec.asn then it has to be added to the -m parameter as below. Note that code is only generated for the first file. asntool -m YOURSPEC.asn,otherspec.asn -G -B genYOURSPEC ^ Notice the lack of a blank at the caret (^), above. This is important. MAJOR CHANGES FROM DOCUMENTATION: AsnNode structures have proved to be generally useful and moved from AsnLib to ncbimisc. In addition, some elements of structs used in the object loaders were called "class" to match the ASN.1 names. Class is a C++ reserved word, so all instances of "class" have been changed to "_class". To conform to our naming conventions, we have changed the names appropriately: AsnValue = DataVal AsnNode = ValNode class = _class A global search and replace of your code with these strings (not restricted to words... we want to change AsnNodePtr = ValNodePtr as well) should fix any problems. Field names within structures have not been changed. If your code uses only the object loaders, you may not find these strings in your code at all. DATA ACCESS LIBRARIES cdromlib contains data access routines compatible with release 1.0-6.0 of the Entrez CDROM. The documentation for these functions are out of date. The routines in cdromlib have been split into entrez, sequence, and medline access functions. The interface you should normally program to is defined in accentr.[ch]. The form of this calls has been changed to make them compatible with the NCBI network server, a client/server version of data access. A program written to use these calls can access the the cdrom data, the network data, a combination, or that plus a local database by just fiddling with defines. The form of the api for these functions has also been changed to hide the details of storage and caching more so that the different optimizations done to support cdrom and network access are transparent to the application programmer. The end user tool called "Entrez" now uses these libraries as it's only means of data access (i.e., you can write an application of your own with any or all of Entrez's functionality using just these routines). NETWORK LIBRARIES The toolbox now includes NCBI "Network Services". This includes everything which you need to build your own "Network Entrez" client software. The network libraries include a generic network services library (nsclilib), which is used to contact the network services dispatcher and connect to a desired server. Note that some development platforms require that you obtain a few source modules from external vendors. Look at the README files contained in the network directory (network/*/README) for more details. DOCUMENTATION We are rewriting the documentation to conform with all the new features contained in this software. We will add it to the package as soon as possible. DEMO PROGRAMS As in the tools, there are a number of undocumented programs in the demo directory as well, that use a number of the utility functions in api. There is also a demo program called "getseq" in the cdromlib directory which retrieves a sequence from the cdrom given any valid sequence id. These will be described in more detail in the next set of documentation. Briefly: asn2ff.c converts ASN.1 to GenBank flatfile asn2rpt.c converts ASN.1 to human readable report dosimple.c converts ASN.1 to a "simple sequence" getseq.c gets sequence from Entrez Cdrom using data access library, writes to disk getfeat.c ditto, but writes sequence of any CdRegion features to "test.out" getmesh.c documented getpub.c documented indexpub.c documented seqtest.c reads ASN.1 sequence, converts to iupac, reports segmented sequences, outputs fasta format to seqtest.out testcore.c documented testobj.c tests Medline object loader, demonstrates error checking using NULL asnio stream. entrez If Vibrant is installed, the full Entrez program is made. asndhuff Demonstrates streaming ASN.1 data from the huffman compressed Entrez CDROM (only works on release 1.0 or later). entrcmd Standalone non-interactive tool for accessing Entrez data. Entrcmd is the search engine used for NCBI's Entrez WWW server. asncode Tool for generating object loader source code given a .l file which is the output of AsnTool. cdscan scans entrez cdrom, makes GenBank, GenPept, or FASTA format output. Also has a slot for a replaceable CustomRoutine supplied by you. Has two examples of such routines. CALLBACK CONVENTIONS The CoreLib, AsnLib, and Object Loader routines have been converted to use the LIBCALL and LIBCALLBACK symbols (FAR PASCAL) on the PC for Windows. This will allow us to build dynamic link libraries (DLLs) so that the code can be accessed from languages other than C. Callback functions you write that are of types AsnOptFreeFunc, AsnExpOptFunc, IoFuncType, AsnReadFunc, AsnWriteFunc, and SeqEntryFunc, should be declared using the LIBCALLBACK macro. For example, a callback used as an AsnOptFreeFunc should be declared as follows: static Pointer LIBCALLBACK MyOptFreeFunc (Pointer); The SeqEntryFunc callback used by SeqEntryExplore has not yet been modified to use the LIBCALLBACK type. This will be added in the near future.
0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0092 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0103 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0181 0182 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244 0245 0246 0247 0248 0249 0250 0251 0252 0253 0254 0255 0256 0257 0258 0259 0260 0261 0262 0263 0264 0265 0266 0267 0268 0269 0270 0271 0272 0273 0274 0275 0276 0277 0278 0279 0280 0281 0282 0283 0284 0285 0286 0287 0288 0289 0290 0291 0292 0293 0294 0295 0296 0297 0298 0299 0300 0301 0302 0303 0304 0305 0306 0307 0308 0309 0310 0311 0312 0313 0314 0315 0316 0317 0318 0319 0320 0321 0322 0323 0324 0325 0326 0327 0328 0329 0330 0331 0332 0333 0334 0335 0336 0337 0338 0339 0340 0341 0342 0343 0344 0345 0346 0347 0348 0349 0350 0351 0352 0353 0354 0355 0356 0357 0358 0359 0360 0361 0362 0363 0364 0365 0366 0367 0368 0369 0370 0371 0372 0373 0374 0375 0376 0377 0378 0379 0380 0381 0382 0383 0384 0385 0386 0387 0388 0389 0390 0391 0392 0393 0394 0395 0396 0397 0398 0399 0400 0401 0402 0403 0404 0405 0406 0407 0408 0409 0410 0411 0412 0413 0414 0415 0416 0417 0418 0419 0420 0421 0422 0423 0424 0425 0426 0427 0428 0429 0430 0431 0432 0433 0434 0435 0436 0437 0438 0439 0440 0441 0442 0443 0444 0445 0446 0447 0448 0449 0450 0451 0452 0453 0454 0455 0456 0457 0458 0459 0460 0461 0462 0463 0464 0465 0466 0467 0468 0469 0470 0471 0472 0473 0474 0475 0476 0477 0478 0479 0480 0481 0482 0483 0484 0485 0486 0487 0488 0489 0490 0491 0492 0493 0494 0495 0496 0497 0498 0499 0500 0501 0502 0503 0504 0505 0506 0507 0508 0509 0510 0511 0512 0513 0514 0515 0516 0517 0518 0519 0520 0521 0522 0523 0524 0525 0526 0527 0528 0529 0530 0531 0532 0533 0534 0535 0536 0537 0538 0539 0540 0541 0542 0543 0544 0545 0546 0547 0548 0549 0550 0551 0552 0553 0554 0555 0556 0557 0558 0559 0560 0561 0562 0563 0564 0565 0566 0567 0568 0569 0570 0571 0572 0573 0574 0575 0576 0577 0578 0579 0580 0581 0582 0583 0584 0585 0586 0587 0588 0589 0590 0591 0592 0593 0594 0595 0596 0597 0598 0599 0600 0601 0602 0603 0604 0605 0606 0607 0608 0609 0610 0611 0612 0613 0614 0615 0616 0617 0618 0619 0620 0621 0622 0623 0624 0625 0626 0627 0628 0629 0630 0631 0632 0633 0634 0635 0636 0637 0638 0639 0640 0641 0642 0643 0644 0645 0646 0647 0648 0649 0650 0651 0652 0653 0654 0655 0656 0657 0658 0659 0660 0661 0662 0663 0664 0665 0666 0667 0668 0669 0670 0671 0672 0673 0674 0675 0676 0677 0678 0679 0680 0681 0682 0683 0684 0685 0686 0687 0688 0689 0690 0691 0692 0693 0694 0695 0696 0697 0698 0699 0700 0701 0702 0703 0704 0705 0706 0707 0708 0709 0710 0711 0712 0713 0714 0715 0716 0717 0718 0719 0720 0721 0722 0723 0724 0725 0726 0727 0728 0729 0730 0731 0732 0733 0734 0735 0736 0737 0738 0739 0740 0741 0742 0743 0744 0745 0746 0747 0748 0749 0750 0751 0752 0753 0754 0755 0756 0757 0758 0759 0760 0761 0762 0763 0764 0765 0766 0767 0768 0769 0770 0771 0772 0773 0774 0775 0776 0777 0778 0779 0780 0781 0782 0783 0784 0785 0786 0787 0788 0789 0790 0791 0792 0793 0794 0795 0796 0797 0798 0799 0800 0801 0802 0803 0804 0805 0806 0807 0808 0809 0810 0811 0812 0813 0814 0815 0816 0817 0818 0819 0820 0821 0822 0823 0824 0825 0826 0827 0828 0829 0830 0831 0832 0833 0834 0835 0836 0837 0838 0839 0840 0841 0842 0843 0844 0845 0846 0847 0848 0849 0850 0851 0852 0853 0854 0855 0856 0857 0858 0859 0860 0861 0862 0863 0864 0865 0866 0867 0868 0869 0870 0871 0872 0873 0874 0875 0876 0877 0878 0879 0880 0881 0882 0883 0884 0885 0886 0887 0888 0889 0890 0891 0892 0893 0894 0895 0896 0897 0898 0899 0900 0901 0902 0903 0904 0905 0906 0907 0908 0909 0910 0911 0912 0913 0914 0915 0916 0917 0918 0919 0920 0921 0922 0923 0924 0925 0926 0927 0928 0929 0930 0931 0932 0933 0934 0935 0936 0937 0938 0939 0940 0941 0942 0943 0944 0945 0946 0947 0948 0949 0950 0951 0952 0953 0954 0955 0956 0957 0958 0959 0960 0961 0962 0963 0964 0965 0966 0967 0968 0969 0970 0971 0972 0973 0974 0975 0976 0977 0978 0979 0980 0981 0982 0983 0984 0985 0986 0987 0988 0989 0990 0991 0992 0993 0994 0995 0996 0997 0998 0999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126