1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.ext.ensembl; |
22 |
|
|
23 |
|
import jalview.datamodel.SequenceFeature; |
24 |
|
import jalview.datamodel.SequenceI; |
25 |
|
import jalview.io.gff.SequenceOntologyI; |
26 |
|
|
27 |
|
import java.util.ArrayList; |
28 |
|
import java.util.List; |
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
@author |
36 |
|
|
37 |
|
|
|
|
| 69.2% |
Uncovered Elements: 8 (26) |
Complexity: 9 |
Complexity Density: 0.6 |
|
38 |
|
public class EnsemblGenome extends EnsemblSeqProxy |
39 |
|
{ |
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
private static final EnsemblFeatureType[] FEATURES_TO_FETCH = { |
45 |
|
EnsemblFeatureType.transcript, EnsemblFeatureType.exon, |
46 |
|
EnsemblFeatureType.cds, EnsemblFeatureType.variation }; |
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
51 |
3 |
public EnsemblGenome()... |
52 |
|
{ |
53 |
3 |
super(); |
54 |
|
} |
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
@param |
60 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
61 |
0 |
public EnsemblGenome(String d)... |
62 |
|
{ |
63 |
0 |
super(d); |
64 |
|
} |
65 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
66 |
0 |
@Override... |
67 |
|
public String getDbName() |
68 |
|
{ |
69 |
0 |
return "ENSEMBL (Genomic)"; |
70 |
|
} |
71 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
72 |
0 |
@Override... |
73 |
|
protected EnsemblSeqType getSourceEnsemblType() |
74 |
|
{ |
75 |
0 |
return EnsemblSeqType.GENOMIC; |
76 |
|
} |
77 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
78 |
0 |
@Override... |
79 |
|
protected EnsemblFeatureType[] getFeaturesToFetch() |
80 |
|
{ |
81 |
0 |
return FEATURES_TO_FETCH; |
82 |
|
} |
83 |
|
|
84 |
|
|
85 |
|
|
86 |
|
|
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
91 |
6 |
@Override... |
92 |
|
protected boolean retainFeature(SequenceFeature sf, String accessionId) |
93 |
|
{ |
94 |
6 |
if (isTranscript(sf.getType())) |
95 |
|
{ |
96 |
3 |
return false; |
97 |
|
} |
98 |
3 |
return featureMayBelong(sf, accessionId); |
99 |
|
} |
100 |
|
|
101 |
|
|
102 |
|
|
103 |
|
|
104 |
|
|
105 |
|
|
106 |
|
|
107 |
|
|
108 |
|
|
109 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 2 |
Complexity Density: 0.29 |
|
110 |
2 |
@Override... |
111 |
|
protected List<SequenceFeature> getIdentifyingFeatures(SequenceI seq, |
112 |
|
String accId) |
113 |
|
{ |
114 |
2 |
List<SequenceFeature> result = new ArrayList<>(); |
115 |
2 |
List<SequenceFeature> sfs = seq.getFeatures().getFeaturesByOntology( |
116 |
|
SequenceOntologyI.TRANSCRIPT, |
117 |
|
SequenceOntologyI.NMD_TRANSCRIPT_VARIANT); |
118 |
2 |
for (SequenceFeature sf : sfs) |
119 |
|
{ |
120 |
9 |
String id = (String) sf.getValue(JSON_ID); |
121 |
9 |
if (accId.equals(id)) |
122 |
|
{ |
123 |
6 |
result.add(sf); |
124 |
|
} |
125 |
|
} |
126 |
2 |
return result; |
127 |
|
} |
128 |
|
|
129 |
|
} |