void htmlLinkOut(char *db, struct altSpliceSite *as, FILE *out) { fprintf(out,"<tr><td><a target=\"browser\" " "href=\"http://hgwdev-sugnet.gi.ucsc.edu/cgi-bin/hgTracks?db=%s&position=%s:%d-%d&altGraphXCon=full\">", db, as->chrom, as->chromStart-50, maxInArray(as->altStarts, as->altCount)+50); fprintf(out,"%s (%d)</a></td>", as->agName, as->altCount-1); fprintf(out,"<td>%s</td>", nameForType(as)); if(as->altCount == 2) fprintf(out,"<td>%d</td></tr>\n", as->altBpEnds[1] - as->altBpStarts[1]); else fprintf(out,"<td>N/A</td></tr>\n"); }
void bedViewOut(struct altSpliceSite *as, FILE *out) { struct bed *bed = NULL; AllocVar(bed); bed->chrom = cloneString(as->chrom); bed->chromStart = as->chromStart; bed->chromEnd = maxInArray(as->altStarts, as->altCount); AllocArray(bed->chromStarts, 2); AllocArray(bed->blockSizes, 2); bed->thickStart = as->altBpStarts[1]; bed->thickEnd = as->altBpEnds[1]; bed->blockCount = 2; bed->chromStarts[0] = 0; bed->chromStarts[1] = bed->chromEnd - bed->chromStart -1; bed->blockSizes[0] = bed->blockSizes[1] = 1; bed->name = cloneString(as->agName); bed->score = as->spliceTypes[1]; safef(bed->strand, sizeof(bed->strand), "%s", as->strand); bedTabOutN(bed, 12, out); bedFree(&bed); }
int main(int argc, char** argv) { printf("\nHomework 3\n"); int array[256]; for (int i = 0; i < 256; ++i) { array[i] = 0; } int N; scanf("%i", &N); for (int i = 0; i < N; ++i) { scanf("%i", &array[i]); } int max = maxInArray(array, N); printf("Array: %i\n", max); return 0; }