8 if (strpbrk(Str,
"*(){/,;_=:\\\'")) {
15 for (; indi < len; indi++, index++) {
16 temp[index] = Str[indi];
17 if (Str[indi] ==
'\'') temp[++index] =
'\'';
33 const char *
id = seq.
get_id();
34 for (indi = 0; indi < 10 &&
id[indi]; indi++)
38 for (; indi < 11; indi++) write.
out(
' ');
40 const char *sequence = seq.
get_seq();
43 for (indi = indj = 0; indi <
length; indi++) {
44 if ((offset + indi) < seq.
get_len()) {
45 write.
out(sequence[offset + indi]);
47 if (indj == 10 && indi < (length - 1) && (indi + offset) < (seq.
get_len() - 1)) {
58 write.
outf(
" [%d - %d]", offset + 1, (offset + indi));
64 write.
out(
"#NEXUS\n");
65 write.
outf(
"[! RDP - the Ribosomal Database Project, (%s).]\n",
today_date());
66 write.
out(
"[! To get started, send HELP to rdp@info.mcs.anl.gov ]\n");
67 write.
out(
"BEGIN DATA;\n DIMENSIONS\n");
71 write.
outf(
" NTAX = %6s\n NCHAR = %6s\n ;\n",
"",
"");
74 write.
outf(
" NTAX = %6d\n NCHAR = %6d\n ;\n", total_seq, maxsize);
82 write.
out(
" FORMAT\n LABELPOS = LEFT\n");
83 write.
outf(
" MISSING = .\n EQUATE = \"%s\"\n", paup.
equate);
84 write.
outf(
" INTERLEAVE\n DATATYPE = RNA\n GAP = %c\n ;\n", paup.
gap);
85 write.
out(
" OPTIONS\n GAPMODE = MISSING\n ;\n MATRIX\n");
102 for (
int i = 0; i<ali.
get_count(); ++i) {
106 seq->replace_id(name);
115 while (maxsize > current) {
117 for (
int indi = 0; indi < total_seq; indi++) {
118 if (current < ali.
get_len(indi))
127 if (maxsize > current) write.
out(
'\n');
130 write.
out(
" ;\nENDBLOCK;\n");
CONSTEXPR_INLINE int str0len(const char *str)
void out(char ch) FINAL_OVERRIDE
char * ARB_strdup(const char *str)
int get_len(int idx) const
const char * get_id() const
void to_paup(const FormattedFile &in, const char *outf)
SeqPtr getSeqPtr(int idx)
virtual void out(char ch)=0
CONSTEXPR_INLINE bool is_input_format(Format inType)
virtual int outf(const char *format,...) __ATTR__FORMAT_MEMBER(1)
static void paup_print_line(const Seq &seq, int offset, int first_line, Writer &write)
const Seq & get(int idx) const
void throw_conversion_not_supported(Format inType, Format ouType)
static void paup_verify_name(char *&Str)
const char * today_date()
static void paup_print_header(const Paup &paup, Writer &write)
static void paup_print_headerstart(Writer &write)
static void paup_print_header_counters(Writer &write)
void read_alignment(Alignment &ali, const FormattedFile &in)
const char * get_seq() const