#include //#include "SubLoc.h" #include "soapH.h" #include "SOAPBinding.nsmap" // example code for illustrate how to writting SubLoc SOAP client using C //for the illustration of functions and paameters, see http://www.bioinfo.tsinghua.edu.cn/~guotao/soapserver.html. int main() { struct soap soap; soap_init(&soap); // for blast search char p1[] = "all"; char p2[] = "full"; char seq[] = "TKRFFNKNNRLNKGYAKTFSINEPDNNFYRKKFEHILPPVDLISEYESIYPGTLQELMHMAQKEQAHKHAIDLKNLKIQERIAKLTRICLLIFGIGLVVLIFLKLLK"; char e[] = "1"; struct ns1__blast_USCOREsearchResponse blast_response; soap_call_ns1__blast_USCOREsearch(&soap, NULL, NULL, p1, p2, seq, e, &blast_response); // get the parsed results printf("%s\n", blast_response.return_->parsed); // get the original outputs of BLAST printf("%s\n", blast_response.return_->plain); // Subcellular Location Prediction by SVM // for more details about the method, please see: // Hua, S. and Sun, Z. (2001). Support vector machine approach for protein subcellular localization prediction. Bioinformatics 17, 721-8. // for eukaryotic organisms struct ns1__eu_USCOREpredictResponse eu_response; soap_call_ns1__eu_USCOREpredict(&soap, NULL, NULL, seq, &eu_response); // get predicted location printf("%s\n", eu_response.return_->Prediction); // get Reliability Index printf("%s\n", eu_response.return_->RI); // get Expected Accuracy printf("%s\n", eu_response.return_->ExpectAcc); // for prokaryotic organisms struct ns1__pro_USCOREpredictResponse pro_response; soap_call_ns1__pro_USCOREpredict(&soap, NULL, NULL, seq, &pro_response); // get predicted location printf("%s\n", pro_response.return_->Prediction); // get Reliability Index printf("%s\n", pro_response.return_->RI); // get Expected Accuracy printf("%s\n", pro_response.return_->ExpectAcc); //################# SubLoc prediction by PSORT // for more details about PSORT, please refer: // Nakai, K. and Horton, P. (1999). PSORT: a program for detecting sorting signals in proteins and // predicting their subcellular localization. Trends Biochem Sci 24, 34-6. struct ns1__psort_USCOREpredictResponse psort_response; soap_call_ns1__psort_USCOREpredict(&soap, NULL, NULL, seq, &psort_response); // get predicted location printf("%s\n", psort_response.return_->Prediction); // get Details printf("%s\n", psort_response.return_->Detail); // name search char query_name[] = "p53"; struct ns1__name_USCOREsearchResponse name_response; soap_call_ns1__name_USCOREsearch(&soap, NULL, NULL, query_name, &name_response); int i, len = name_response.return_->__size; for (i=0; i__ptr)->ID, (*(name_response.return_)->__ptr)->LC, (*(name_response.return_)->__ptr)->CX, (*(name_response.return_)->__ptr)->SQ, (*(name_response.return_)->__ptr)->OS, (*(name_response.return_)->__ptr)->DE ); } // id_search // by SWISSPROT ID char id_class[] = "SWISSPROT"; char query_id[] = "O03978"; //or by DBSubLoc ID //char id_class[] = "DBSubLoc"; //char query_id[] = "10043258"; // or by GO ID //char id_class[] = "GO"; //char query_id[] = "0005739"; struct ns1__id_USCOREsearchResponse id_response; soap_call_ns1__id_USCOREsearch(&soap, NULL, NULL, id_class, query_id, &id_response); len = id_response.return_->__size; for (i=0; i__ptr)->ID, (*(id_response.return_)->__ptr)->LC, (*(id_response.return_)->__ptr)->CX, (*(id_response.return_)->__ptr)->SQ, (*(id_response.return_)->__ptr)->OS, (*(id_response.return_)->__ptr)->DE ); } //feed_entry users coulde submit new sequences to the database by this function struct ns1__feed_USCOREentryResponse feed_response; soap_call_ns1__feed_USCOREentry(&soap,NULL,NULL,"p53","cancer inhibitor","human","nuclear","cross references","Sequences Here: XXXX",&feed_response); //len = feed_response.return_->__size; printf("%s\n", feed_response.return_); return 0; }