1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.ws.dbsources; |
22 |
|
|
23 |
|
import java.util.Locale; |
24 |
|
|
25 |
|
import com.stevesoft.pat.Regex; |
26 |
|
|
27 |
|
import jalview.bin.Cache; |
28 |
|
import jalview.datamodel.DBRefSource; |
29 |
|
import jalview.util.Platform; |
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
@author |
37 |
|
|
38 |
|
|
|
|
| 0% |
Uncovered Elements: 23 (23) |
Complexity: 10 |
Complexity Density: 0.77 |
|
39 |
|
abstract public class Pfam extends Xfam |
40 |
|
{ |
41 |
|
public static final String FULL = "full", RP35 = "rp35", RP15 = "rp15", |
42 |
|
RP75 = "rp75", RP55 = "rp55", SEED = "seed", UNIPROT = "uniprot"; |
43 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
44 |
0 |
public String getPfamDownloadURL(String id, String alType)... |
45 |
|
{ |
46 |
0 |
String url = Cache.getDefault(PFAM_BASEURL_KEY, DEFAULT_PFAM_BASEURL); |
47 |
0 |
url = url.replace("$PFAMID$", id); |
48 |
0 |
url = url.replace("$ALTYPE$", alType); |
49 |
0 |
return url; |
50 |
|
} |
51 |
|
|
52 |
|
static final String PFAM_BASEURL_KEY = "PFAM_INTERPRO_URL_TEMPLATE"; |
53 |
|
|
54 |
|
protected String alignmentType; |
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
private static final String DEFAULT_PFAM_BASEURL = "https://www.ebi.ac.uk/interpro/api/entry/pfam/$PFAMID$/?annotation=alignment:$ALTYPE$"; |
60 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
61 |
0 |
static... |
62 |
|
{ |
63 |
0 |
Platform.addJ2SDirectDatabaseCall(DEFAULT_PFAM_BASEURL); |
64 |
|
} |
65 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
66 |
0 |
public Pfam()... |
67 |
|
{ |
68 |
0 |
super(); |
69 |
|
} |
70 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
71 |
0 |
@Override... |
72 |
|
String getURL(String queries) |
73 |
|
{ |
74 |
0 |
return getPfamDownloadURL(queries.trim().toUpperCase(Locale.ROOT), |
75 |
|
alignmentType); |
76 |
|
} |
77 |
|
|
78 |
|
|
79 |
|
|
80 |
|
|
81 |
|
@see |
82 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
83 |
0 |
@Override... |
84 |
|
public String getAccessionSeparator() |
85 |
|
{ |
86 |
0 |
return null; |
87 |
|
} |
88 |
|
|
89 |
|
|
90 |
|
|
91 |
|
|
92 |
|
@see |
93 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
94 |
0 |
@Override... |
95 |
|
public Regex getAccessionValidator() |
96 |
|
{ |
97 |
0 |
return null; |
98 |
|
} |
99 |
|
|
100 |
|
|
101 |
|
|
102 |
|
|
103 |
|
@see |
104 |
|
|
105 |
|
|
106 |
|
|
107 |
|
|
108 |
|
|
109 |
|
|
110 |
|
|
111 |
|
|
112 |
|
|
113 |
|
@see |
114 |
|
|
115 |
|
|
116 |
|
|
117 |
|
|
118 |
|
|
119 |
|
|
120 |
|
|
121 |
|
|
122 |
|
@see |
123 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
124 |
0 |
@Override... |
125 |
|
public String getDbVersion() |
126 |
|
{ |
127 |
0 |
return null; |
128 |
|
} |
129 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
130 |
0 |
@Override... |
131 |
|
protected String getURLPrefix() |
132 |
|
{ |
133 |
0 |
return Cache.getDefault(PFAM_BASEURL_KEY, DEFAULT_PFAM_BASEURL); |
134 |
|
} |
135 |
|
|
136 |
|
|
137 |
|
|
138 |
|
|
139 |
|
@see |
140 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
141 |
0 |
@Override... |
142 |
|
public boolean isValidReference(String accession) |
143 |
|
{ |
144 |
0 |
return accession.indexOf("PF") == 0; |
145 |
|
} |
146 |
|
|
147 |
|
|
148 |
|
|
149 |
|
|
150 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
151 |
0 |
@Override... |
152 |
|
public String getXfamSource() |
153 |
|
{ |
154 |
0 |
return DBRefSource.PFAM; |
155 |
|
} |
156 |
|
} |