Beispiel #1
0
int main(int argc, char *argv[])
/* Process command line. */
{
char *scoreSchemeFile = NULL;
optionHash(&argc, argv);
if (argc != 5)
    usage();
if (optionExists("fa"))
    {
    qIsFa = TRUE;
    qFaList = faReadAllMixed(argv[3]);
    }
if (optionExists("tfa"))
    {
    tIsFa = TRUE;
    tFaList = faReadAllMixed(argv[2]);
    }
scoreSchemeFile = optionVal("scoreScheme", scoreSchemeFile);
if (scoreSchemeFile != NULL)
    scoreScheme = axtScoreSchemeRead(scoreSchemeFile);
else
    scoreScheme = axtScoreSchemeDefault();
lavToAxt(argv[1], argv[2], argv[3], argv[4]);
return 0;
}
static void seqReaderLoadFasta(struct seqReader *seqReader)
/* load a FASTA file into a seqReader object */
{
seqReader->seqTbl = hashNew(21);
struct dnaSeq *seq, *seqs = faReadAllMixed(seqReader->spec);
while ((seq = slPopHead(&seqs)) != NULL)
    hashAdd(seqReader->seqTbl, seq->name, seq);
}
Beispiel #3
0
void faToNib(int options, char *in, char *out)
/* faToNib - Convert from .fa to .nib format. */
{
struct dnaSeq *seq = faReadAllMixed(in);
if (slCount(seq) > 1)
    errAbort("faToNib only works on fa files containing a single sequence.");
if (optionExists("hardMask"))
    maskLower(seq);
nibWriteMasked(options, seq, out);
}