Question: Query SwissProt using Java based on Annotation Score and Publication Number
1
gravatar for taojincs
16 months ago by
taojincs20
taojincs20 wrote:

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
ADD COMMENTlink modified 16 months ago • written 16 months ago by taojincs20

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.

ADD REPLYlink written 16 months ago by Pierre Lindenbaum122k

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

ADD REPLYlink modified 16 months ago • written 16 months ago by taojincs20
0
gravatar for taojincs
16 months ago by
taojincs20
taojincs20 wrote:

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.

ADD COMMENTlink modified 16 months ago • written 16 months ago by taojincs20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1043 users visited in the last hour