static void writeFastaSequence(FILE * outfile, const char * str) { size_t length = strlen(str); size_t start; for (start = 0; start < length; start += 60) velvetFprintf(outfile, "%.60s\n", &str[start]); }
static void writeSeqName(char*seq_name, SequencesWriter *seqWriteInfo, Category cat, IDnum *sequenceIndex) { char name[5001]; if (isCreateBinary()) { cnySeqInsertStart(seqWriteInfo); sprintf(name, ">%s", seq_name); cnySeqInsertSequenceName(name, (long) ((*sequenceIndex)++), seqWriteInfo, cat); } else { velvetFprintf(seqWriteInfo->m_pFile,">%s\t%ld\t%d\n", seq_name, (long) ((*sequenceIndex)++), (int) cat); } }
static void writeSequence(char*seq, SequencesWriter *seqWriteInfo) { char str[100]; velvetifySequence(seq, seqWriteInfo); if (isCreateBinary()) { cnySeqInsertNucleotideString(seq, seqWriteInfo); cnySeqInsertEnd(seqWriteInfo); } else { Coordinate start = 0; while (start <= strlen(seq)) { strncpy(str, seq + start, 60); str[60] = '\0'; velvetFprintf(seqWriteInfo->m_pFile, "%s\n", str); start += 60; } } }
static void writeBuffers(FILE *outFile, int nbThreads) { int i; for (i = 0; i < nbThreads; i++) { StringBuffer *b; char *s; b = annotationBufferW[i]; #pragma omp flush(b) s = b->str; #pragma omp flush(s) if (*s) { velvetFprintf(outFile, "%s", annotationBufferW[i]->str); resetStringBuffer(annotationBufferW[i]); } } }