示例#1
0
void printSequenceAnnotation(const SequenceAnnotation* ann, int tabs) {
    if (!ann)
        return;
    indent(tabs); printf("%s\n", getSequenceAnnotationURI(ann));
    //int start = ann->genbankStart;
	int start = getSequenceAnnotationStart(ann);
    //int end = ann->genbankEnd;
	int end = getSequenceAnnotationEnd(ann);
    if (start != -1 || end != -1) { /// @todo is 0 valid?
    	indent(tabs+1); printf("%i --> %i\n", start, end);
    }
    char strand = polarityToChar( getPolarityProperty(ann->strand) );
    indent(tabs+1); printf("strand: %c\n", strand);
    if (ann->subComponent) {
        indent(tabs+1); printf("subComponent: %s\n", getDNAComponentURI(ann->subComponent));
    }
    int num = getNumPrecedes(ann);
    if (num > 0) {
        indent(tabs+1); printf("%i precedes:\n", num);
        int i;
        for (i=0; i<num; i++) {
            indent(tabs+2); printf("%s\n", getSequenceAnnotationURI(getNthPrecedes(ann, i)));
        }
    }
}
示例#2
0
int getSequenceAnnotationStrand(const SequenceAnnotation* ann) {
	if (ann)
		return getPolarityProperty(ann->strand);
	else
		return -1;
}