void cdwMakeRepeatQa(int startFileId, int endFileId) /* cdwMakeRepeatQa - Figure out what proportion of things align to repeats.. */ { struct sqlConnection *conn = cdwConnectReadWrite(); struct cdwFile *ef, *efList = cdwFileAllIntactBetween(conn, startFileId, endFileId); for (ef = efList; ef != NULL; ef = ef->next) { struct cdwValidFile *vf = cdwValidFileFromFileId(conn, ef->id); if (vf != NULL) { if (sameString(vf->format, "fastq")) fastqRepeatQa(conn, ef, vf); } } sqlDisconnect(&conn); }
void cdwMakePairedEndQa(unsigned startId, unsigned endId) /* cdwMakePairedEndQa - Do alignments of paired-end fastq files and calculate distrubution of * insert size. */ { struct sqlConnection *conn = cdwConnectReadWrite(); struct cdwFile *ef, *efList = cdwFileAllIntactBetween(conn, startId, endId); for (ef = efList; ef != NULL; ef = ef->next) { struct cdwValidFile *vf = cdwValidFileFromFileId(conn, ef->id); if (vf != NULL) { if (sameString(vf->format, "fastq") && !isEmpty(vf->pairedEnd)) pairedEndQa(conn, ef, vf); } } sqlDisconnect(&conn); }
void cdwMakeEnrichments(int startFileId, int endFileId) /* cdwMakeEnrichments - Scan through database and make a makefile to calc. enrichments and store * in database. */ { /* Make list with all files in ID range */ struct sqlConnection *conn = sqlConnect(cdwDatabase); struct cdwFile *ef, *efList = cdwFileAllIntactBetween(conn, startFileId, endFileId); /* Make up a hash for targets keyed by assembly name. */ struct hash *assemblyToTarget = hashNew(0); for (ef = efList; ef != NULL; ef = ef->next) { char path[PATH_LEN]; safef(path, sizeof(path), "%s%s", cdwRootDir, ef->cdwFileName); verbose(1, "%lld processing %s aka %s\n", (long long)ef->id, ef->submitFileName, path); if (ef->tags) // All ones we care about have tags doEnrichments(conn, ef, path, assemblyToTarget); } sqlDisconnect(&conn); }