void pslCoverage(char *inLst, char *inPsl, double aliRatio, int trimSize, char *outName, char *misAsmName) /* Analyse inName and put best alignments for eacmRNA in estAliName. * Put repeat info in repName. */ { struct lineFile *in = pslFileOpen(inPsl); FILE *out = mustOpen(outName, "a"); FILE *misAsm = mustOpen(misAsmName, "w"); struct psl *pslList = NULL, *psl; char lastName[256]; int threshold = round((1.0 - (1.0 - aliRatio)*2)*1000); struct hash *probeHash; struct probe *probeList; readProbeList(inLst, &probeList, &probeHash); printf("Found %d probes in %s\n", slCount(probeList), inLst); printf("Processing %s percent ID %f%% threshold %d\n", inPsl, aliRatio*100, threshold); strcpy(lastName, ""); while ((psl = pslNext(in)) != NULL) { if (!sameString(lastName, psl->qName)) { doOneAcc(lastName, pslList, threshold, trimSize, probeHash, misAsm); finishList(&pslList); strcpy(lastName, psl->qName); } slAddHead(&pslList, psl); } doOneAcc(lastName, pslList, threshold, trimSize, probeHash, misAsm); finishList(&pslList); lineFileClose(&in); summarizeProbeList(probeList, trimSize, aliRatio, out, misAsm); fclose(out); }
//---------------------------------------------------------- void PdBase::sendList(const std::string& dest, const List& list) { PdContext& context = PdContext::instance(); if(context.bMsgInProgress) { cerr << "Pd: Can not send list, message in progress" << endl; return; } _LOCK(); libpd_start_message(list.len()); _UNLOCK(); context.bMsgInProgress = true; // step through list for(int i = 0; i < list.len(); ++i) { if(list.isFloat(i)) addFloat(list.getFloat(i)); else if(list.isSymbol(i)) addSymbol(list.getSymbol(i)); } finishList(dest); }
PdBase& PdBase::operator<<(const FinishList& var) { finishList(var.dest); return *this; }