.
The Open Protein Structure Annotation Network
PDB Keyword
.

Template:Taxon

    Table of contents
    No headers

    var offsetVal = 0;
    var limitVal = 20;
    var totalVal; 
    var taxonID = $("#taxonid").val();
    function tableDraw() {	
    
            
            var prefixStr = "PREFIX owl:<http://www.w3.org/2002/07/owl#> PREFIX mind:<http://mindtouch.com/schema#> PREFIX core:<http://purl.uniprot.org/core/>";
    	    
    	var selectStr = "select * where { ?page mind:pageID ?pageID . ?page mind:pagePath ?path . ?page owl:sameAs ?link . ?link core:organism <http://purl.uniprot.org/taxonomy/" + taxonID + "> . OPTIONAL { ?link core:encodedBy ?gene . ?gene core:locusName ?locus . } OPTIONAL { ?link core:mnemonic ?mnemonic } } GROUP BY ?page ";
    
    	var queryStr = prefixStr + " " + selectStr + " LIMIT " + limitVal + " OFFSET " + offsetVal;
    	$.get( '/@api/deki/site/services/=note/proxy/sparql', { 'format' : 'json', 'query' : queryStr },
    		function (data) {
    			var table = $("#table");
    			table.empty();
                            table.append("<tr><td>TOPSAN Page</td><td>UNIPROT Page</td><td></td><td>Mnemonic</td></tr>");
    			for ( var row in data["results"]["bindings"] ) {                             
                                 var uri = data.results.bindings[row].path.value;
                                 var li = uri.lastIndexOf("/");
                                 var pdbid = uri.substr(li+1, uri.length-(li+1));
                                 var pathflag = uri.indexOf("Proteins");
                                 
                                 var link = data.results.bindings[row].link.value;
                                 var locus = data.results.bindings[row].locus != null ? data.results.bindings[row].locus.value : "" ;
                                 var mnemonic = data.results.bindings[row].mnemonic.value;
    
                                 var urlstr = "";
                                 if (pathflag != -1 && pdbid.length == 4)
                                 {
                                    var imageurl = "http://www.rcsb.org/pdb/images/" + pdbid + "_bio_r_250.jpg?bioNum=1";
                                    urlstr = "<div style=\"width: 100px;\"><a href=\"http://www.topsan.org/" + uri + "\" title = \"" + uri + "\"><img style=\"image-orientation: 90deg\" width=\"100px\" src=\"" + imageurl + "\" title=\"args.pdbid\"/></a></div>";
                                 }
                                 else 
                                 {
                                    urlstr = "<div style=\"width: 100px; height: 40px;\"><a href=\"http://www.topsan.org/" + uri + "\">" + uri + "</a></div>";
                                 }
                                 table.append( "<tr valign=\"top\"><td>" + urlstr + "</td><td>" +
                                       "<a href=\"" + link + "\">" + link + "</a></td><td>" +
                                       "</td><td>" +
                                       mnemonic + "</td></tr>" );
                            }
    
    			var tableLabel = $("#tableLabel");
    			tableLabel.empty();
                            var spanVal = offsetVal + limitVal;
    			tableLabel.append( " " + (offsetVal+1) + "-" + spanVal + " " );
    		}
    	);
    };
    
    function scrollUp() {
    	offsetVal -= limitVal;
    	if ( offsetVal < 0 ) {
    		offsetVal = 0;
    	}
    	tableDraw();
    }
    
    function scrollDown() {
    	offsetVal += limitVal;
    	tableDraw();
    }
    
    $(document).ready( tableDraw );
    

    << >>

      

    Reviews

    References

     

    No references found.

    Tag page
    • No tags

    Files (0)

     
    You must login to post a comment.
    All content on this site is licensed under a Creative Commons Attribution 3.0 License
    Powered by MindTouch