12 for (indi = 0, len =
str0len(line), previous_is_dot = 0; indi < len; indi++) {
13 if (previous_is_dot) {
14 if (line[indi] ==
'.')
19 writer.
out(line[indi]);
20 if (line[indi] ==
'.')
29 for (
int indi = 0; indi < numofstr; indi++) {
32 cksum = ((cksum + count * toupper(Str[indi])) % 10000);
33 if (count == 57) count = 0;
42 const char *sequence = seq.
get_seq();
44 for (indi = 0, indj = 0, indk = 1; indi < seq.
get_len(); indi++) {
46 if ((indk % 50) == 1) write.
outf(
"%8d ", indk);
47 write.
out(sequence[indi]);
53 if ((indk % 50) == 0) write.
out(
"\n\n");
57 if ((indk % 50) != 1) write.
out(
" \n");
62 write.
outf(
"\n%s Length: %d %s Type: N Check: %d ..\n\n",
79 : gcg_writer(gcg_writer_),
89 const char *
name() const OVERRIDE {
return "comment-writer"; }
108 if (!seq_written) species_name = nulldup(next_name);
109 else warningf(111,
"Species '%s' dropped (GCG allows only 1 sequence per file)", next_name);
137 linebuf[used++] = ch;
152 Macke& macke =
dynamic_cast<Macke&
>(reader.
get_data());
173 write.
out(
"ORIGIN\n");
177 reader->ignore_rest_of_file();
189 if (
EmblParser(embl, seq, reader).parse_entry()) {
CONSTEXPR_INLINE int str0len(const char *str)
static int gcg_checksum(const char *Str, int numofstr)
static void gcg_out_origin(const Seq &seq, Writer &write)
GcgWriter(const char *outname)
virtual bool ok() const =0
void out(char ch) FINAL_OVERRIDE
static void embl_to_gcg(const char *inf, const char *outf)
void warningf(int warning_num, const char *warning_messagef,...) __ATTR__FORMAT(2)
void write_seq_data(const Seq &seq)
void to_gcg(const FormattedFile &in, const char *outf)
static void macke_to_gcg(const char *inf, const char *outf)
static void gcg_seq_out(const Seq &seq, Writer &write, const char *key)
static void genbank_to_gcg(const char *inf, const char *outf)
static void gcg_doc_out(const char *line, Writer &writer)
InputFormat & get_data() OVERRIDE
void ignore_rest_of_file() OVERRIDE
virtual void out(char ch)=0
Writer & comment_writer()
void set_species_name(const char *next_name)
virtual int outf(const char *format,...) __ATTR__FORMAT_MEMBER(1)
const char * gcg_date(const char *input)
void genbank_out_base_count(const Seq &seq, Writer &write)
void throw_conversion_not_supported(Format inType, Format ouType)
void add_comment(const char *comment)
void embl_out_header(const Embl &embl, const Seq &seq, Writer &write)
const char * today_date()
void genbank_out_header(const GenBank &gbk, const Seq &seq, Writer &write)
const char * get_seq() const
bool read_one_entry(Seq &seq) OVERRIDE __ATTR__USERESULT
void macke_seq_info_out(const Macke &macke, Writer &write)