Clover icon

Coverage Report

  1. Project Clover database Thu Dec 4 2025 16:11:35 GMT
  2. Package jalview.ws.rest.clientdefs

File ShmrRestClient.java

 

Coverage histogram

../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
16
1
1
54
35
1
0.06
16
1
1

Classes

Class Line # Actions
ShmrRestClient 10 16 1
1.0100%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package jalview.ws.rest.clientdefs;
2   
3    import jalview.io.packed.DataProvider.JvDataType;
4    import jalview.util.MessageManager;
5    import jalview.ws.rest.InputType;
6    import jalview.ws.rest.RestClient;
7    import jalview.ws.rest.RestServiceDescription;
8    import java.util.Hashtable;
9   
 
10    public class ShmrRestClient
11    {
12   
 
13  13 toggle public static RestClient makeShmmrRestClient()
14    {
15  13 String action = "Analysis", description = "Sequence Harmony and Multi-Relief (Brandt et al. 2010)", name = MessageManager
16    .getString("label.multiharmony");
17  13 Hashtable<String, InputType> iparams = new Hashtable<String, InputType>();
18  13 jalview.ws.rest.params.JobConstant toolp;
19    // toolp = new jalview.ws.rest.JobConstant("tool","jalview");
20    // iparams.put(toolp.token, toolp);
21    // toolp = new jalview.ws.rest.params.JobConstant("mbjob[method]","shmr");
22    // iparams.put(toolp.token, toolp);
23    // toolp = new
24    // jalview.ws.rest.params.JobConstant("mbjob[description]","step 1");
25    // iparams.put(toolp.token, toolp);
26    // toolp = new jalview.ws.rest.params.JobConstant("start_search","1");
27    // iparams.put(toolp.token, toolp);
28    // toolp = new jalview.ws.rest.params.JobConstant("blast","0");
29    // iparams.put(toolp.token, toolp);
30   
31  13 jalview.ws.rest.params.Alignment aliinput = new jalview.ws.rest.params.Alignment();
32    // SHMR server has a 65K limit for content pasted into the 'ali' parameter,
33    // so we always upload our files.
34  13 aliinput.token = "ali_file";
35  13 aliinput.writeAsFile = true;
36  13 iparams.put(aliinput.token, aliinput);
37  13 jalview.ws.rest.params.SeqGroupIndexVector sgroups = new jalview.ws.rest.params.SeqGroupIndexVector();
38  13 sgroups.setMinsize(2);
39  13 sgroups.min = 2;// need at least two group defined to make a partition
40  13 iparams.put("groups", sgroups);
41  13 sgroups.token = "groups";
42  13 sgroups.sep = " ";
43  13 RestServiceDescription shmrService = new RestServiceDescription(
44    action,
45    description,
46    name,
47    "https://zeus.few.vu.nl/programs/shmrwww/index.php?tool=jalview",// ?tool=jalview&mbjob[method]=shmr&mbjob[description]=step1",
48    "?tool=jalview", iparams, true, false, '-');
49    // a priori knowledge of the data returned from the service
50  13 shmrService.addResultDatatype(JvDataType.ANNOTATION);
51  13 return new RestClient(shmrService);
52    }
53   
54    }