9 #define MACKELIMIT 10000
22 for (++reader; reader.
line(); ++reader) {
42 freedup(var, reader.
line() + index);
49 for (; reader.
line(); ++reader) {
59 seqabbr = nulldup(name);
64 int scanned = sscanf(reader.
line() + index,
"%d%s", &seqnum, data);
67 for (
int indj = seq.
get_len(); indj < seqnum; indj++) seq.
add(
'.');
68 for (
int indj = 0; data[indj] !=
'\n' && data[indj] !=
'\0'; indj++) seq.
add(data[indj]);
80 write.
out(
"#-\n#-\n#-\teditor\n");
82 write.
outf(
"#-\t%s\n#-\n#-\n", date);
88 write.
outf(
"#-\tReference sequence: %s\n", macke.seqabbr);
89 write.
out(
"#-\tAttributes:\n");
93 if (write.
out(macke.seqabbr)<8) write.
out(
'\t');
94 write.
out(
"\tin out vis prt ord ");
96 write.
out(
"pro lin n>c");
99 write.
out(macke.rna_or_dna ==
'r' ?
"rna" :
"dna");
100 write.
out(
" lin 5>3");
103 if (first_sequence) write.
out(
" ref");
116 sprintf(prefix,
"#:%s:%s:", macke.seqabbr, tag);
140 "Sequencing methods",
155 char first[
LINESIZE]; sprintf(first,
"#:%s:rem:", macke.seqabbr);
157 const char *remark = macke.get_rem(index);
179 for (
int indi = 0; indi < macke.get_rem_count(); indi++) {
193 return len ? index+len+1 : index;
204 const char *sequence = seq.
get_seq();
205 for (indk = indj = 0; indk < seq.
get_len(); indk++) {
207 write.
outf(
"%s%6d ", macke.seqabbr, indk);
209 write.
out(sequence[indk]);
223 void MackeReader::read_to_start() {
247 delete *using_reader; *using_reader =
NULp;
251 delete r3; r3 =
NULp;
252 delete r2; r2 =
NULp;
253 delete r1; r1 =
NULp;
271 bool MackeReader::macke_in(Macke& macke) {
291 freedup(macke.seqabbr, oldname);
292 seqabbr = macke.seqabbr;
340 macke.add_remark(r1->
line()+index);
344 warningf(144,
"Unidentified AE2 key word #%s#", key);
358 if (!macke_in(data) || !read_seq_data(seq)) abort();
359 seq.
set_id(data.get_id());
static bool macke_is_genbank_entry_comment(const char *Str)
void macke_seq_display_out(const Macke &macke, Writer &write, Format inType, bool first_sequence)
void throw_errorf(int error_num, const char *error_messagef,...) __ATTR__FORMAT(2) __ATTR__NORETURN
void warningf(int warning_num, const char *warning_messagef,...) __ATTR__FORMAT(2)
char * ARB_strdup(const char *str)
void macke_seq_data_out(const Seq &seq, const Macke &macke, Writer &write)
static void macke_print_prefixed_line(const Macke &macke, Writer &write, const char *tag, const char *content)
const char * get_msg() const
static const char * genbankEntryComments[]
int macke_key_word(const char *line, int index, char *key)
CONSTEXPR_INLINE bool isMackeSeqInfo(const char *line)
CONSTEXPR_INLINE bool has_content(const char *field)
static bool macke_print_prefixed_line_if_content(const Macke &macke, Writer &write, const char *tag, const char *content)
MackeReader(const char *inName_)
void parse_section() OVERRIDE
void macke_origin(Seq &seq, char *&seqabbr, Reader &reader)
void macke_out_header(Writer &write)
void print(Writer &write, const char *first_prefix, const char *other_prefix, const char *content, int max_width) const
static void macke_print_line(Writer &write, const char *prefix, const char *content)
static void macke_print_keyword_rem(const Macke &macke, int index, Writer &write)
virtual void out(char ch)=0
static void macke_read_seq(Seq &seq, char *&seqabbr, Reader &reader)
void skip_eolnl_and_append_spaced(char *&string1, const char *string2)
virtual int outf(const char *format,...) __ATTR__FORMAT_MEMBER(1)
static void macke_continue_line(const char *key, char *oldname, char *&var, Reader &reader)
static void macke_one_entry_in(Reader &reader, const char *key, char *oldname, char *&var, int index)
static int macke_abbrev(const char *line, char *key, int index)
void replace_msg(const char *new_msg) const
int Skip_white_space(const char *line, int index)
static const Convaln_exception * exception_thrown()
const char * today_date()
#define lookup_keyword(keyword, table)
CONSTEXPR_INLINE bool str_equal(const char *s1, const char *s2)
virtual const char * name() const =0
CONSTEXPR_INLINE bool isMackeSeqHeader(const char *line)
const char * line() const
#define RDP_SUBKEY_INDENT
int parse_key_word(const char *line, char *key, const char *separator)
const char * get_seq() const
void set_id(const char *id_)
bool read_one_entry(Seq &seq) OVERRIDE __ATTR__USERESULT
MackeParser(Macke &macke_, Seq &seq_, Reader &reader_)
CONSTEXPR_INLINE bool isMackeNonSeq(const char *line)
void macke_seq_info_out(const Macke &macke, Writer &write)
void skipOverLinesThat(const PRED &match_condition)