16 #define AW_RENAME_SKIP_GUI
28 if (strcmp(ali_name,
"ali_genom") != 0)
throw "Alignment has to be 'ali_genom'";
30 FILE *in = fopen(file_name,
"rb");
31 if (!in)
throw GBS_global_string(
"Can't read file '%s' (Reason: %s)", file_name, strerror(errno));
36 DBwriter db_writer(session, ali_name);
45 else throw flatfile.
lineError(
"Wrong format. Expected 'LOCUS' or 'ID'");
53 catch (
const char *err) { error = err; }
54 catch (...) { error =
"Unknown exception during import (program error)"; }
83 void TEST_SLOW_import_genome_flatfile() {
98 const char *savename =
"AB735678.arb";
99 const char *expected =
"AB735678_expected.arb";
102 #if defined(TEST_AUTO_UPDATE)
103 TEST_COPY_FILE(savename, expected);
106 #endif // TEST_AUTO_UPDATE
GBDATA * GB_open(const char *path, const char *opent)
static void deleteStaticData()
bool getLine(string &line)
static ArbImporter * importer
const char * GBS_global_string(const char *templat,...)
int GB_unlink(const char *path)
void showFilenameInLineError(bool show)
UniqueNameDetector * und_species
void backLine(const string &line)
GB_ERROR GB_save_as(GBDATA *gbd, const char *path, const char *savetype)
string lineError(const string &msg) const
static void error(const char *msg)
GB_ERROR GI_importGenomeFile(ImportSession &session, const char *file_name, const char *ali_name)
#define TEST_EXPECT_ZERO_OR_SHOW_ERRNO(iocond)
bool beginsWith(const std::string &str, const std::string &start)
GBDATA * GBT_find_or_create(GBDATA *father, const char *key, long delete_level)
const char * GBS_static_string(const char *str)
#define TEST_EXPECT_NO_ERROR(call)
ImportSession(GBDATA *gb_species_data_, int estimated_genomes_count)
GB_transaction ta(gb_var)
AW_repeated_question * ok_to_ignore_wrong_start_codon
#define TEST_EXPECT_TEXTFILES_EQUAL(fgot, fwant)
void GB_close(GBDATA *gbd)