Query SwissProt using Java based on Annotation Score and Publication Number
Entering edit mode
3.1 years ago
taojincs ▴ 50

I am using Java to do the query based on the protein name, the output should meet 3 conditions: 1. reviewed; 2. the annotation score >=4; 3. it has more than 3 publications related to it (the size of its PubMed ID list > 3). The output I desire is the publications related to this protein if all these three conditions are satisfied.

This is the documentation I referred to https://www.ebi.ac.uk/uniprot/japi/usage.html#uniprot_query, but there is no info on how to query based on annotation score and PubMed ID list size and then extract the publications.

Below is my attempted code but it doesn't include the annotation score part and the publication number part. Basically, I want to return the PubMed ID list from this query and then the publications. For example, "sarcosine oxidase subunit beta" is the target protein name. If its annotation score < 4, then nothing will be returned and I will ignore this protein name. Otherwise, it PubMed ID list should be returned and then I will look into the publications.

ServiceFactory serviceFactoryInstance =    Client.getServiceFactoryInstance();
// UniProtService
UniProtService uniProtService = serviceFactoryInstance.getUniProtQueryService();
* After you obtain a service, you will need to call start() to connect to the server
* before you can use the service to retrieve data
uniProtService.start();  // Build the query         
// Search for all Swiss-Prot entries.
Query swissProtQuery = UniProtQueryBuilder.swissprot(); // [reviewed]
String name = "sarcosine oxidase subunit beta";
Query finalquery = UniProtQueryBuilder.proteinName(name).and(swissProtQuery); // i should add more here
query swissprot java annotation protein • 801 views
Entering edit mode

Hello taojincs!

It appears that your post has been cross-posted to another site: https://stackoverflow.com/questions/49579801/

This is typically not recommended as it runs the risk of annoying people in both communities.

Entering edit mode

I deleted the one on the stackoverflow just now. Thank you so much for letting me know about this!

Entering edit mode
3.0 years ago
taojincs ▴ 50

I solved this question by myself today.

I knew how to do it based on https://www.ebi.ac.uk/uniprot/japi/

However, I didn't find the way to query based on annotation score. So I use Java to read the webpage source and extract that part.


Login before adding your answer.

Traffic: 2349 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6