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
62
* Revision 6.156 2004/12/04 03:41:09 camacho
63
* Add extra enum for fastacmd -D option for error checking
65
* Revision 6.155 2004/12/03 04:57:57 camacho
66
* Fix name conflict in enumeration for fastacmd dump types
68
* Revision 6.154 2004/12/02 20:37:31 camacho
69
* + fastacmd feature to dump list of gis
59
71
* Revision 6.153 2004/09/27 16:29:34 madden
60
72
* Make title on SI_Record dynamically allocated
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
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);
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]
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);
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
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 */
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);
1787
Int2 BlastDBToFasta(ReadDBFILEPtr rdfp, FILE *fp, Int4 line_length,
1788
Boolean use_ctrlAs);
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]
1820
Int2 DumpBlastDB(const ReadDBFILEPtr rdfp, FILE *fp, Int4 line_length,
1821
Boolean use_ctrlAs, EBlastDbDumpType dump_type);
1790
1823
Int4 LIBCALL readdb_MakeGiFileBinary PROTO((CharPtr input_file, CharPtr