\n", seqId);
hPrintf("\n");
hPrintf("%c%s", '>', seqId);
hPrintf("%s%s", " | ", sampleId);
hPrintf("%s%s", " | ", subjId);
hPrintf("%s%s", " | ", gene);
chp = seq;
for (i=0; i");
fflush(stdout);
row = sqlNextRow(sr);
}
sqlFreeResult(&sr);
printf("Protein Sequences
");
safef(query, sizeof(query),
//"select dnaSeqId, seq from gisaidXref, dnaSeq where sampleId = '%s' and id = dnaSeqId order by dnaSeqId", sampleId);
//"select aaSeqId, seq from gisaidXref, aaSeq where sampleId = '%s' order by aaSeqId", sampleId);
//"select seqId, seq from h1n1SeqXref, dnaSeq where islId = '%s' and id = seqId order by seqId", sampleId);
"select aaSeqId, seq, strain from h1n1SeqXref i, gisaidXref, aaSeq where islId = '%s' and i.seqId=dnaSeqId and aaSeqId = id order by aaSeqId", sampleId);
sr = sqlMustGetResult(conn, query);
row = sqlNextRow(sr);
if (row == NULL) printf("
Not available.
");
while (row != NULL)
{
seqId = row[0];
seq = row[1];
subjId = row[2];
l =strlen(seq);
hPrintf("\n", seqId);
hPrintf("\n");
hPrintf("%c%s", '>', seqId);
hPrintf("%s%s", " | ", sampleId);
hPrintf("%s%s", " | ", subjId);
//hPrintf("\n", seqId);
//hPrintf(">', seqId);
//hPrintf("");
//hPrintf("%c%s", ':', sampleId);
chp = seq;
for (i=0; i");
fflush(stdout);
row = sqlNextRow(sr);
}
sqlFreeResult(&sr);
return;
}
struct section *sequenceSection(struct sqlConnection *conn,
struct hash *sectionRa)
/* Create sequence section. */
{
struct section *section = sectionNew(sectionRa, "sequence");
section->exists = sequenceExists;
section->print = sequencePrint;
return section;
}