Пример #1
0
/**
 * @brief FIXME add doc
 *
 */
void
PrintUserOpts(FILE *prFile, cmdline_opts_t *opts) {
    
    /* keep in same order as in struct. FIXME could this be derived from argtable?
     */
    fprintf(prFile, "seq-type = %s\n", SeqTypeToStr(opts->iSeqType));
    fprintf(prFile, "seq-in-fmt = %s\n", SeqfileFormat2String(opts->iSeqInFormat));
    fprintf(prFile, "option: seq-in = %s\n", 
            NULL != opts->pcSeqInfile? opts->pcSeqInfile: "(null)");
    fprintf(prFile, "option: dealign = %d\n", opts->bDealignInputSeqs);
    fprintf(prFile, "option: profile1 = %s\n", 
            NULL != opts->pcProfile1Infile? opts->pcProfile1Infile: "(null)");
    fprintf(prFile, "option: profile2 = %s\n",
            NULL != opts->pcProfile2Infile? opts->pcProfile2Infile: "(null)");
    fprintf(prFile, "option: max-num-seq = %d\n", opts->iMaxNumSeq);
    fprintf(prFile, "option: max-seq-len = %d\n", opts->iMaxSeqLen);
    fprintf(prFile, "option: aln-out-file = %s\n", 
            NULL != opts->pcAlnOutfile? opts->pcAlnOutfile: "(null)");
    fprintf(prFile, "option: aln-out-format = %s\n", SeqfileFormat2String(opts->iAlnOutFormat));
    fprintf(prFile, "option: force-file-overwrite = %d\n", opts->bForceFileOverwrite);
    fprintf(prFile, "option: threads = %d\n", opts->iThreads);
    fprintf(prFile, "option: logFile = %s\n", opts->pcLogFile);
}
Пример #2
0
/* Function: MSAFileFormat()
 * Date:     SRE, Fri Jun 18 14:26:49 1999 [Sanger Centre]
 *
 * Purpose:  (Attempt to) determine the format of an alignment file.
 *           Since it rewinds the file pointer when it's done,
 *           cannot be used on a pipe or gzip'ed file. Works by
 *           calling SeqfileFormat() from sqio.c, then making sure
 *           that the format is indeed an alignment. If the format
 *           comes back as FASTA, it assumes that the format as A2M 
 *           (e.g. aligned FASTA).
 *
 * Args:     fname   - file to evaluate
 *
 * Returns:  format code; e.g. MSAFILE_STOCKHOLM
 */
int
MSAFileFormat(MSAFILE *afp)
{
  int fmt;

  fmt = SeqfileFormat(afp->f);

  if (fmt == SQFILE_FASTA) fmt = MSAFILE_A2M;

  if (fmt != MSAFILE_UNKNOWN && ! IsAlignmentFormat(fmt)) 
    Die("File %s does not appear to be an alignment file;\n\
rather, it appears to be an unaligned file in %s format.\n\
I'm expecting an alignment file in this context.\n",
	afp->fname,
	SeqfileFormat2String(fmt));
  return fmt;
}