NCBI C++ ToolKit
Classes | Macros | Typedefs | Functions
add.cpp File Reference
#include <ncbi_pch.hpp>
#include "ftacpp.hpp"
#include <objects/seq/Seq_gap.hpp>
#include <objects/general/User_object.hpp>
#include <objects/general/User_field.hpp>
#include <objects/general/Object_id.hpp>
#include <objects/seq/Seq_descr.hpp>
#include <objects/seqloc/Seq_interval.hpp>
#include <objects/seq/MolInfo.hpp>
#include <objects/seq/Seq_inst.hpp>
#include <objects/seq/Seq_ext.hpp>
#include <objects/seq/Seq_hist.hpp>
#include <objects/seq/Seq_hist_rec.hpp>
#include <objects/seqalign/Seq_align.hpp>
#include <objects/seqalign/Dense_seg.hpp>
#include <objects/general/Dbtag.hpp>
#include <objects/seqalign/Seq_align_set.hpp>
#include <objects/seq/Seq_annot.hpp>
#include <objects/seqfeat/Imp_feat.hpp>
#include <objects/seq/seqport_util.hpp>
#include <objects/seq/Delta_ext.hpp>
#include <objects/seq/Delta_seq.hpp>
#include <objects/seq/Seq_literal.hpp>
#include <objects/seqloc/Seq_point.hpp>
#include <objects/seqloc/Seq_loc_equiv.hpp>
#include <objects/seqset/Bioseq_set.hpp>
#include <objects/seq/seq_id_handle.hpp>
#include "index.h"
#include "genbank.h"
#include "embl.h"
#include <objtools/flatfile/flatdefn.h>
#include "ftanet.h"
#include "ftaerr.hpp"
#include "indx_blk.h"
#include "asci_blk.h"
#include "utilfun.h"
+ Include dependency graph for add.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  SeqLocIds
 
struct  FTATpaBlock
 
struct  FTATpaSpan
 

Macros

#define THIS_FILE   "add.cpp"
 
#define HTG_GAP   100
 
#define SHORT_GAP   20
 

Typedefs

using SeqLocIdsPtr = SeqLocIds *
 
using FTATpaBlockPtr = FTATpaBlock *
 
using FTATpaSpanPtr = FTATpaSpan *
 

Functions

 USING_SCOPE (objects)
 
static void fta_tpa_block_free (FTATpaBlockPtr ftbp)
 
char * tata_save (char *str)
 
bool no_date (Parser::EFormat format, const TSeqdescList &descrs)
 
bool no_reference (const CBioseq &bioseq)
 
bool check_cds (const DataBlk &entry, Parser::EFormat format)
 
void err_install (const Indexblk *ibp, bool accver)
 
static void CreateSeqGap (CSeq_literal &seq_lit, GapFeatsPtr gfp)
 
void AssemblyGapsToDelta (CBioseq &bioseq, GapFeatsPtr gfp, bool *drop)
 
void GapsToDelta (CBioseq &bioseq, GapFeatsPtr gfp, bool *drop)
 
void SeqToDelta (CBioseq &bioseq, Int2 tech)
 
static bool fta_ranges_to_hist (const CGB_block::TExtra_accessions &extra_accs)
 
static bool s_IsConOrScaffold (CBioseq_Handle bsh)
 
static bool s_IsAccession (const CSeq_id &id)
 
bool g_DoesNotReferencePrimary (const CDelta_ext &delta_ext, const CSeq_id &primary, CScope &scope)
 
static int sGetPrefixLength (const CTempString &accession)
 
void fta_add_hist (ParserPtr pp, CBioseq &bioseq, CGB_block::TExtra_accessions &extra_accs, Parser::ESource source, CSeq_id::E_Choice acctype, bool pricon, const char *acc)
 
bool fta_strings_same (const char *s1, const char *s2)
 
bool fta_check_htg_kwds (TKeywordList &kwds, IndexblkPtr ibp, CMolInfo &mol_info)
 
static void fta_check_tpa_tsa_coverage (FTATpaBlockPtr ftbp, Int4 length, bool tpa)
 
bool fta_number_is_huge (const Char *s)
 
bool fta_parse_tpa_tsa_block (CBioseq &bioseq, char *offset, char *acnum, Int2 vernum, size_t len, Int2 col_data, bool tpa)
 
char * StringRStr (char *where, const char *what)
 
CRef< CSeq_locfta_get_seqloc_int_whole (CSeq_id &seq_id, size_t len)
 
static void fta_validate_assembly (char *name)
 
static bool fta_validate_bioproject (char *name, Parser::ESource source)
 
static ValNodePtr fta_tokenize_project (char *str, Parser::ESource source, bool newstyle)
 
void fta_get_project_user_object (TSeqdescList &descrs, char *offset, Parser::EFormat format, bool *drop, Parser::ESource source)
 
bool fta_if_valid_sra (const Char *id, bool dblink)
 
bool fta_if_valid_biosample (const Char *id, bool dblink)
 
static ValNodePtr fta_tokenize_dblink (char *str, Parser::ESource source)
 
void fta_get_dblink_user_object (TSeqdescList &descrs, char *offset, size_t len, Parser::ESource source, bool *drop, CRef< CUser_object > &dbuop)
 
CMolInfo::TTech fta_check_con_for_wgs (CBioseq &bioseq)
 
static void fta_fix_seq_id (CSeq_loc &loc, CSeq_id &id, IndexblkPtr ibp, char *location, const char *name, SeqLocIdsPtr slip, bool iscon, Parser::ESource source)
 
static void fta_do_fix_seq_loc_id (TSeqLocList &locs, IndexblkPtr ibp, char *location, const char *name, SeqLocIdsPtr slip, bool iscon, Parser::ESource source)
 
Int4 fta_fix_seq_loc_id (TSeqLocList &locs, ParserPtr pp, char *location, const char *name, bool iscon)
 
static ValNodePtr fta_vnp_structured_comment (char *buf)
 
static CRef< CUser_objectfta_build_structured_comment (char *tag, char *buf)
 
void fta_parse_structured_comment (char *str, bool &bad, TUserObjVector &objs)
 
string GetQSFromFile (FILE *fd, const Indexblk *ibp)
 
void fta_remove_cleanup_user_object (CSeq_entry &seq_entry)
 
void fta_tsa_tls_comment_dblink_check (const CBioseq &bioseq, bool is_tsa)
 
void fta_set_molinfo_completeness (CBioseq &bioseq, const Indexblk *ibp)
 
void fta_create_far_fetch_policy_user_object (CBioseq &bsp, Int4 num)
 
void xStripECO (string &instr)
 
void StripECO (char *str)
 
bool fta_dblink_has_sra (const CRef< CUser_object > &uop)
 

Macro Definition Documentation

◆ HTG_GAP

#define HTG_GAP   100

Definition at line 81 of file add.cpp.

◆ SHORT_GAP

#define SHORT_GAP   20

Definition at line 82 of file add.cpp.

◆ THIS_FILE

#define THIS_FILE   "add.cpp"

Definition at line 79 of file add.cpp.

Typedef Documentation

◆ FTATpaBlockPtr

Definition at line 117 of file add.cpp.

◆ FTATpaSpanPtr

Definition at line 124 of file add.cpp.

◆ SeqLocIdsPtr

Definition at line 104 of file add.cpp.

Function Documentation

◆ AssemblyGapsToDelta()

void AssemblyGapsToDelta ( CBioseq bioseq,
GapFeatsPtr  gfp,
bool drop 
)

◆ check_cds()

bool check_cds ( const DataBlk entry,
Parser::EFormat  format 
)

◆ CreateSeqGap()

static void CreateSeqGap ( CSeq_literal seq_lit,
GapFeatsPtr  gfp 
)
static

◆ err_install()

void err_install ( const Indexblk ibp,
bool  accver 
)

◆ fta_add_hist()

void fta_add_hist ( ParserPtr  pp,
CBioseq bioseq,
CGB_block::TExtra_accessions extra_accs,
Parser::ESource  source,
CSeq_id::E_Choice  acctype,
bool  pricon,
const char *  acc 
)

◆ fta_build_structured_comment()

static CRef<CUser_object> fta_build_structured_comment ( char *  tag,
char *  buf 
)
static

◆ fta_check_con_for_wgs()

CMolInfo::TTech fta_check_con_for_wgs ( CBioseq bioseq)

◆ fta_check_htg_kwds()

bool fta_check_htg_kwds ( TKeywordList kwds,
IndexblkPtr  ibp,
CMolInfo mol_info 
)

◆ fta_check_tpa_tsa_coverage()

static void fta_check_tpa_tsa_coverage ( FTATpaBlockPtr  ftbp,
Int4  length,
bool  tpa 
)
static

◆ fta_create_far_fetch_policy_user_object()

void fta_create_far_fetch_policy_user_object ( CBioseq bsp,
Int4  num 
)

◆ fta_dblink_has_sra()

bool fta_dblink_has_sra ( const CRef< CUser_object > &  uop)

◆ fta_do_fix_seq_loc_id()

static void fta_do_fix_seq_loc_id ( TSeqLocList locs,
IndexblkPtr  ibp,
char *  location,
const char *  name,
SeqLocIdsPtr  slip,
bool  iscon,
Parser::ESource  source 
)
static

◆ fta_fix_seq_id()

static void fta_fix_seq_id ( CSeq_loc loc,
CSeq_id id,
IndexblkPtr  ibp,
char *  location,
const char *  name,
SeqLocIdsPtr  slip,
bool  iscon,
Parser::ESource  source 
)
static

◆ fta_fix_seq_loc_id()

Int4 fta_fix_seq_loc_id ( TSeqLocList locs,
ParserPtr  pp,
char *  location,
const char *  name,
bool  iscon 
)

◆ fta_get_dblink_user_object()

void fta_get_dblink_user_object ( TSeqdescList descrs,
char *  offset,
size_t  len,
Parser::ESource  source,
bool drop,
CRef< CUser_object > &  dbuop 
)

◆ fta_get_project_user_object()

void fta_get_project_user_object ( TSeqdescList descrs,
char *  offset,
Parser::EFormat  format,
bool drop,
Parser::ESource  source 
)

◆ fta_get_seqloc_int_whole()

CRef<CSeq_loc> fta_get_seqloc_int_whole ( CSeq_id seq_id,
size_t  len 
)

◆ fta_if_valid_biosample()

bool fta_if_valid_biosample ( const Char id,
bool  dblink 
)

Definition at line 1729 of file add.cpp.

References ERR_FORMAT_IncorrectDBLINK, ErrPostEx, SEV_REJECT, and StringLen().

Referenced by fta_tokenize_dblink(), and GetEmblBlockXref().

◆ fta_if_valid_sra()

bool fta_if_valid_sra ( const Char id,
bool  dblink 
)

Definition at line 1708 of file add.cpp.

References ERR_FORMAT_IncorrectDBLINK, ErrPostEx, SEV_REJECT, and StringLen().

Referenced by fta_tokenize_dblink(), and GetEmblBlockXref().

◆ fta_number_is_huge()

bool fta_number_is_huge ( const Char s)

Definition at line 1031 of file add.cpp.

References i, and StringLen().

Referenced by DbxrefQualToDbtag(), and fta_parse_tpa_tsa_block().

◆ fta_parse_structured_comment()

void fta_parse_structured_comment ( char *  str,
bool bad,
TUserObjVector objs 
)

◆ fta_parse_tpa_tsa_block()

bool fta_parse_tpa_tsa_block ( CBioseq bioseq,
char *  offset,
char *  acnum,
Int2  vernum,
size_t  len,
Int2  col_data,
bool  tpa 
)

◆ fta_ranges_to_hist()

static bool fta_ranges_to_hist ( const CGB_block::TExtra_accessions extra_accs)
static

Definition at line 595 of file add.cpp.

References ch1, ch2, fta_if_wgs_acc(), compile_time_bits::range(), and StringChr.

Referenced by fta_add_hist().

◆ fta_remove_cleanup_user_object()

void fta_remove_cleanup_user_object ( CSeq_entry seq_entry)

◆ fta_set_molinfo_completeness()

void fta_set_molinfo_completeness ( CBioseq bioseq,
const Indexblk ibp 
)

◆ fta_strings_same()

bool fta_strings_same ( const char *  s1,
const char *  s2 
)

◆ fta_tokenize_dblink()

static ValNodePtr fta_tokenize_dblink ( char *  str,
Parser::ESource  source 
)
static

◆ fta_tokenize_project()

static ValNodePtr fta_tokenize_project ( char *  str,
Parser::ESource  source,
bool  newstyle 
)
static

◆ fta_tpa_block_free()

static void fta_tpa_block_free ( FTATpaBlockPtr  ftbp)
static

Definition at line 127 of file add.cpp.

References FTATpaBlock::accession, MemFree(), next(), and FTATpaBlock::next.

Referenced by fta_parse_tpa_tsa_block().

◆ fta_tsa_tls_comment_dblink_check()

void fta_tsa_tls_comment_dblink_check ( const CBioseq bioseq,
bool  is_tsa 
)

◆ fta_validate_assembly()

static void fta_validate_assembly ( char *  name)
static

Definition at line 1443 of file add.cpp.

References ERR_DBLINK_InvalidIdentifier, ErrPostEx, SEV_WARNING, and StringLen().

Referenced by fta_tokenize_dblink().

◆ fta_validate_bioproject()

static bool fta_validate_bioproject ( char *  name,
Parser::ESource  source 
)
static

◆ fta_vnp_structured_comment()

static ValNodePtr fta_vnp_structured_comment ( char *  buf)
static

◆ g_DoesNotReferencePrimary()

bool g_DoesNotReferencePrimary ( const CDelta_ext delta_ext,
const CSeq_id primary,
CScope scope 
)

◆ GapsToDelta()

void GapsToDelta ( CBioseq bioseq,
GapFeatsPtr  gfp,
bool drop 
)

◆ GetQSFromFile()

string GetQSFromFile ( FILE *  fd,
const Indexblk ibp 
)

Definition at line 2673 of file add.cpp.

References buf, fseek, Indexblk::qslength, and Indexblk::qsoffset.

Referenced by EmblAscii(), GenBankAsciiOrig(), and XMLAscii().

◆ no_date()

bool no_date ( Parser::EFormat  format,
const TSeqdescList descrs 
)

Definition at line 178 of file add.cpp.

References format, and Parser::GenBank.

Referenced by GenBankAsciiOrig(), CFlexibleDatePanel::GetDate(), and XMLAscii().

◆ no_reference()

bool no_reference ( const CBioseq bioseq)

◆ s_IsAccession()

static bool s_IsAccession ( const CSeq_id id)
static

◆ s_IsConOrScaffold()

static bool s_IsConOrScaffold ( CBioseq_Handle  bsh)
static

◆ SeqToDelta()

void SeqToDelta ( CBioseq bioseq,
Int2  tech 
)

◆ sGetPrefixLength()

static int sGetPrefixLength ( const CTempString accession)
static

Definition at line 769 of file add.cpp.

References _ASSERT, CTempString::begin(), CTempString::end(), int, and isalpha().

Referenced by fta_add_hist().

◆ StringRStr()

char* StringRStr ( char *  where,
const char *  what 
)

Definition at line 1410 of file add.cpp.

References i, StringEquN(), and StringLen().

Referenced by check_book_tit().

◆ StripECO()

void StripECO ( char *  str)

Definition at line 2834 of file add.cpp.

References fta_StringCpy(), str(), StringChr, and StringStr.

Referenced by GetSPDescrTitle(), SPFeatGeneRef(), and SPFeatProtRef().

◆ tata_save()

char* tata_save ( char *  str)

Definition at line 147 of file add.cpp.

References fta_StringCpy(), isspace(), str(), StringLen(), and StringSave().

Referenced by GetSPDescrTitle(), GetTheQualValue(), StripCDSComment(), and XMLRefs().

◆ USING_SCOPE()

USING_SCOPE ( objects  )

◆ xStripECO()

void xStripECO ( string instr)

Definition at line 2816 of file add.cpp.

Referenced by GetSequenceOfKeywords().

Modified on Wed Feb 28 07:11:24 2024 by modify_doxy.py rev. 669887