本文整理汇总了C++中FASTAReader::ConcatenateNext方法的典型用法代码示例。如果您正苦于以下问题:C++ FASTAReader::ConcatenateNext方法的具体用法?C++ FASTAReader::ConcatenateNext怎么用?C++ FASTAReader::ConcatenateNext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FASTAReader
的用法示例。
在下文中一共展示了FASTAReader::ConcatenateNext方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
++argi;
}
if (inFiles.size() == 0) {
//
// Special use case: the input file is a fasta file. Write to that file + .sa
//
inFiles.push_back(saFile);
saFile = saFile + ".sa";
}
VectorIndex inFileIndex;
FASTASequence seq;
CompressedSequence<FASTASequence> compSeq;
if (read4BitCompressed == 0) {
for (inFileIndex = 0; inFileIndex < inFiles.size(); ++inFileIndex) {
FASTAReader reader;
reader.Init(inFiles[inFileIndex]);
reader.SetSpacePadding(111);
if (saBuildType == kark) {
//
// The Karkkainen sa building method requires a little extra
// space at the end of the dna sequence so that counting may
// be done mod 3 without adding extra logic for boundaries.
//
}
if (inFileIndex == 0) {
reader.ReadAllSequencesIntoOne(seq);
reader.Close();
}
else {
while(reader.ConcatenateNext(seq)) {
cout << "added " << seq.title << endl;
}
}
}
seq.ToThreeBit();
//seq.ToUpper();
}
else {
assert(inFiles.size() == 1);
cout << "reading compressed sequence." << endl;
compSeq.Read(inFiles[0]);
seq.seq = compSeq.seq;
seq.length = compSeq.length;
compSeq.RemoveCompressionCounts();
cout << "done." << endl;
}
//
// For now, do not allow creation of suffix arrays on sequences > 4G.
//
if (seq.length >= UINT_MAX) {
cout << "ERROR, references greater than " << UINT_MAX << " bases are not supported." << endl;
cout << "Consider breaking the reference into multiple files, running alignment. " << endl;
cout << "against each file, and merging the result." << endl;
exit(1);
}
vector<int> alphabet;
SuffixArray<Nucleotide, vector<int> > sa;
// sa.InitTwoBitDNAAlphabet(alphabet);
// sa.InitAsciiCharDNAAlphabet(alphabet);
sa.InitThreeBitDNAAlphabet(alphabet);