~ubuntu-branches/ubuntu/edgy/ncbi-tools6/edgy

« back to all changes in this revision

Viewing changes to tools/readdb.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2005-09-27 15:38:20 UTC
  • mfrom: (1.1.3 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050927153820-1t1sta0qirjpxaar
Tags: 6.1.20050429-1ubuntu1
GL/GLU Transition

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
*
42
42
* Version Creation Date:   3/21/95
43
43
*
44
 
* $Revision: 6.153 $
 
44
* $Revision: 6.157 $
45
45
*
46
46
* File Description: 
47
47
*       Functions to rapidly read databases from files produced by formatdb.
56
56
*
57
57
* RCS Modification History:
58
58
* $Log: readdb.h,v $
 
59
* Revision 6.157  2005/02/22 14:15:48  camacho
 
60
* Pass bioseq data type by reference to FDBAddBioseq
 
61
*
 
62
* Revision 6.156  2004/12/04 03:41:09  camacho
 
63
* Add extra enum for fastacmd -D option for error checking
 
64
*
 
65
* Revision 6.155  2004/12/03 04:57:57  camacho
 
66
* Fix name conflict in enumeration for fastacmd dump types
 
67
*
 
68
* Revision 6.154  2004/12/02 20:37:31  camacho
 
69
* + fastacmd feature to dump list of gis
 
70
*
59
71
* Revision 6.153  2004/09/27 16:29:34  madden
60
72
* Make title on SI_Record dynamically allocated
61
73
*
1626
1638
 
1627
1639
/* For database version FORMATDB_VER (or greater), only the first 5 parameters
1628
1640
 * are used, the latter are kept for the FORMATDB_VER_TEXT version of the BLAST
1629
 
 * databases */
 
1641
 * databases. Please note that the seq_data and seq_data_type will be changed
 
1642
 * if the data passed in doesn't match the format that is required for the
 
1643
 * BLAST database format (ncbistdaa for proteins, ncbi2na for nucleotides) */
1630
1644
Int2 FDBAddSequence (FormatDBPtr fdbp,  BlastDefLinePtr bdp, 
1631
 
                     Uint1 seq_data_type, ByteStorePtr *seq_data, 
 
1645
                     Uint1* seq_data_type, ByteStorePtr *seq_data, 
1632
1646
                     Int4 SequenceLen, 
1633
1647
                     CharPtr seq_id, CharPtr title, 
1634
1648
                     Int4 gi, Int4 tax_id, CharPtr div, Int4 owner, Int4 date);
1636
1650
/**
1637
1651
 * FDBAddSequence2: is an interface to add "non-redundant sequence", i.e
1638
1652
 * common sequence data and multiple sequence information block (1 per gi)
 
1653
 * This function will NOT alter the seq_data field, it assumes that the data is
 
1654
 * already provided in the required format
1639
1655
 * @param fdbp target blast db [in]
1640
1656
 * @param srp linked list of sequence information for each gi [in]
1641
1657
 * @param seq_data_type type of the parameter below [in]
1649
1665
Int2 FDBAddSequence2 (FormatDBPtr  fdbp,
1650
1666
                      SI_RecordPtr srp,
1651
1667
                      Uint1 seq_data_type,
1652
 
                      ByteStorePtr *seq_data,
 
1668
                      const ByteStorePtr *seq_data,
1653
1669
                      Int4 SequenceLen,
1654
1670
                      Uint4Ptr  AmbCharPtr,
1655
1671
                      Int4 pig_id, 
1778
1794
/* Fastacmd_Search and Fastacmd_Search_ex return non-zero on failure */
1779
1795
Int2 Fastacmd_Search (CharPtr searchstr, CharPtr database,
1780
1796
        CharPtr batchfile, Boolean dupl, Int4 linelen, FILE *out);
 
1797
 
 
1798
/* Used to specify which kind of data to dump using fastacmd */
 
1799
typedef enum EBlastDbDumpType {
 
1800
    eNoDump = 0,        /* Don't dump any data from the database, the default for
 
1801
                           fastacmd */
 
1802
    eFasta,             /* dump contents of database as FASTA */
 
1803
    eGi,                /* List of gis in the database */
 
1804
    eDumpTypeMax        /* not really a dump type, needed for error checking */
 
1805
} EBlastDbDumpType;
 
1806
 
1781
1807
Int2 Fastacmd_Search_ex (CharPtr searchstr, CharPtr database, Uint1 is_prot,
1782
1808
        CharPtr batchfile, Boolean dupl, Int4 linelen, FILE *out, 
1783
 
        Boolean use_target, Boolean use_ctrlAs, Boolean dump_db, 
 
1809
        Boolean use_target, Boolean use_ctrlAs, EBlastDbDumpType dump_db, 
1784
1810
    CharPtr seqlocstr, Uint1 strand, Boolean taxonomy_info_only, 
1785
1811
    Boolean dbinfo_only, Int4 pig);
1786
1812
 
1787
 
Int2 BlastDBToFasta(ReadDBFILEPtr rdfp, FILE *fp, Int4 line_length, 
1788
 
                    Boolean use_ctrlAs);
 
1813
/**
 
1814
 * @param rdfp Blast database handle [in]
 
1815
 * @param fp output FILE pointer [in]
 
1816
 * @param linelen number of characters to print per line [in]
 
1817
 * @param use_ctrlAs use Ctrl-A to separate non-redundant deflines? [in]
 
1818
 * @param dump_type type of information to dump [in]
 
1819
 */
 
1820
Int2 DumpBlastDB(const ReadDBFILEPtr rdfp, FILE *fp, Int4 line_length, 
 
1821
                         Boolean use_ctrlAs, EBlastDbDumpType dump_type);
1789
1822
 
1790
1823
Int4 LIBCALL readdb_MakeGiFileBinary PROTO((CharPtr input_file, CharPtr
1791
1824
                                            output_file));