1 /* biosrc.h 2 * =========================================================================== 3 * 4 * PUBLIC DOMAIN NOTICE 5 * National Center for Biotechnology Information (NCBI) 6 * 7 * This software/database is a "United States Government Work" under the 8 * terms of the United States Copyright Act. It was written as part of 9 * the author's official duties as a United States Government employee and 10 * thus cannot be copyrighted. This software/database is freely available 11 * to the public for use. The National Library of Medicine and the U.S. 12 * Government do not place any restriction on its use or reproduction. 13 * We would, however, appreciate having the NCBI and the author cited in 14 * any work or product based on this material 15 * 16 * Although all reasonable efforts have been taken to ensure the accuracy 17 * and reliability of the software and data, the NLM and the U.S. 18 * Government do not and cannot warrant the performance or results that 19 * may be obtained by using this software or data. The NLM and the U.S. 20 * Government disclaim all warranties, express or implied, including 21 * warranties of performance, merchantability or fitness for any particular 22 * purpose. 23 * 24 * =========================================================================== 25 * 26 * File Name: biosrc.h 27 * 28 * Author: Jonathan Kans 29 * 30 * Version Creation Date: 1/22/95 31 * 32 * $Revision: 6.14 $ 33 * 34 * File Description: 35 * 36 * Modifications: 37 * -------------------------------------------------------------------------- 38 * Date Name Description of modification 39 * ------- ---------- ----------------------------------------------------- 40 * 41 * 42 * ========================================================================== 43 */ 44 45 #ifndef _BIOSRC_ 46 #define _BIOSRC_ 47 48 #include <dlogutil.h> 49 50 51 #ifdef __cplusplus 52 extern "C" { 53 #endif 54 55 #define NUM_GENETIC_CODES 40 56 57 extern Int2 numGeneticCodes; 58 extern Int2 gcIdToIndex [NUM_GENETIC_CODES]; 59 extern Uint1 gcIndexToId [NUM_GENETIC_CODES]; 60 extern CharPtr gcNames [NUM_GENETIC_CODES]; 61 62 extern Boolean LoadOrganismTable (void); 63 extern void FreeOrganismTable (void); 64 65 extern void SetupGeneticCodes (void); 66 extern void FreeGeneticCodes (void); 67 extern ValNodePtr GetGeneticCodeValNodeList (void); 68 69 /* 70 * The BioSourceEditProcsPtr may be registered with a call to SetAppProperty 71 * e.g., SetAppProperty ("BioSourcEditForm", &biosrcprocs), where biosrcprocs 72 * is a persistent structure filled with parameters and callback function 73 * pointers specific for a given application. 74 */ 75 76 typedef Boolean (*LookupTaxonomyProc) PROTO((Uint2 entityID)); 77 78 typedef struct biosrceditprocs { 79 LookupTaxonomyProc lookupTaxonomy; 80 } BioSourceEditProcs, PNTR BioSourceEditProcsPtr; 81 82 #define REGISTER_BIOSOURCE_DESC_EDIT ObjMgrProcLoad(OMPROC_EDIT,"Edit BioSource Desc","Biological Source",OBJ_SEQDESC,Seq_descr_source,OBJ_SEQDESC,Seq_descr_source,NULL,BioSourceGenFunc,PROC_PRIORITY_DEFAULT) 83 #define REGISTER_BIOSOURCE_FEAT_EDIT ObjMgrProcLoad(OMPROC_EDIT,"Edit BioSource Feat","Biological Source",OBJ_SEQFEAT,FEATDEF_BIOSRC,OBJ_SEQFEAT,FEATDEF_BIOSRC,NULL,BioSourceGenFunc,PROC_PRIORITY_DEFAULT) 84 85 extern DialoG CreateSimpleBioSourceDialog (GrouP h, CharPtr title); 86 extern ForM CreateBioSourceDescForm (Int2 left, Int2 top, Int2 width, 87 Int2 height, CharPtr title, ValNodePtr sdp, 88 SeqEntryPtr sep, FormActnFunc actproc, 89 BioSourceEditProcsPtr bepp); 90 extern ForM CreateBioSourceFeatForm (Int2 left, Int2 top, Int2 width, 91 Int2 height, CharPtr title, SeqFeatPtr sfp, 92 SeqEntryPtr sep, FormActnFunc actproc, 93 BioSourceEditProcsPtr bepp); 94 95 extern DialoG BioSourceDialog (GrouP parent); 96 97 extern Int2 LIBCALLBACK BioSourceGenFunc (Pointer data); 98 extern Boolean BioSourceDialogToGenBankDivision (DialoG d, CharPtr div, size_t maxsize); 99 100 extern Boolean SetBioSourceDialogTaxName (DialoG d, CharPtr taxname); 101 102 /* This structure should be passed in as userdata for 103 * RemoveTextFromTextFreeSubSourceModifiers, with the 104 * members all initialized to FALSE. 105 */ 106 typedef struct modtextfix 107 { 108 Boolean remove_this; 109 Boolean move_this; 110 Boolean remove_all_germline; 111 Boolean remove_all_transgenic; 112 Boolean remove_all_environmental; 113 Boolean remove_all_rearranged; 114 Boolean remove_all_metagenomic; 115 Boolean move_all_germline; 116 Boolean move_all_transgenic; 117 Boolean move_all_environmental; 118 Boolean move_all_rearranged; 119 Boolean move_all_metagenomic; 120 } ModTextFixData, PNTR ModTextFixPtr; 121 extern ModTextFixPtr ModTextFixNew (void); 122 extern void RemoveTextFromTextFreeSubSourceModifiers (BioSourcePtr biop, Pointer userdata); 123 extern EnumFieldAssocPtr GetSubSourceAndOrgModEnum (Boolean get_discouraged, Boolean get_discontinued); 124 extern EnumFieldAssocPtr GetModifiersEnum (Boolean get_subsource, Boolean get_orgmod, Boolean get_discouraged, Boolean get_discontinued); 125 126 NLM_EXTERN ValNodePtr GetLocListForBioSource (BioSourcePtr biop); 127 NLM_EXTERN void PopulateGeneticCodePopup (PopuP gc); 128 NLM_EXTERN void DisableStrainForwarding(BioSourcePtr biop, Boolean val); 129 130 #ifdef __cplusplus 131 } 132 #endif 133 134 #endif /* ndef _BIOSRC_ */ 135 136