Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: jalview/annotation/SeqFeature.java


1   package jalview.annotation;
2   
3   import jalview.seq.SequenceI;
4   
5   public class SeqFeature implements SeqFeatureI {
6   
7       protected long        start;
8       protected long        end;
9       protected String      name;
10      protected String      source_tag;
11      protected String      primary_tag;
12      protected int         strand;
13      protected double      score = 0.0;
14      protected SeqFeatureI refFeature;
15      protected SequenceI   seq;
16      protected String      type;
17  
18      public SeqFeature() {
19      }
20  
21      public SeqFeature(long start, long end, String name) {
22    this.start = start;
23    this.end   = end;
24    this.name  = name;
25      }
26      
27      public void setStart(long start) {
28    this.start = start;
29      }
30      public long getStart() {
31    return start;
32      }
33  
34      public void setEnd(long end) {
35    this.end = end;
36      }
37      public long getEnd() {
38    return end;
39      }
40  
41      public SequenceI getSequenceI() {
42    return seq;
43      }
44      public void setSequenceI(SequenceI sequence) {
45    this.seq = sequence;
46      }
47  
48      public SeqFeatureI getRefFeature() {
49    return refFeature;
50      }
51      public void setRefFeature(SeqFeatureI refFeature) {
52    this.refFeature = refFeature;
53      }
54  
55      public FeatureSetI getProducedFeatures() {
56    return null;
57      }
58      public void setProducedFeatures(FeatureSetI producedFeatures) {
59      }
60  
61      public String getType() {
62    return this.type;
63      }
64      public void setType(String type) {
65    this.type = type;
66      }
67  
68      public void setStrand(int strand) {
69    this.strand = strand;
70      }
71      public int getStrand() {
72    return strand;
73      }
74  
75      public void setName(String name) {
76    this.name = name;
77      }
78      public String getName() {
79    return name;
80      }
81  
82      public double getScore() {
83    return score;
84      }
85      public void setScore(double score) {
86    this.score = score;
87      }
88  
89      public boolean overlaps(SeqFeatureI se) {
90    if (getStart() <= se.getEnd() && getEnd() >= se.getStart()) {
91        return true;
92    }
93    return false;
94      }
95      public OverlapI findOverlap(SeqFeatureI feature) {
96    return null;
97      }
98  
99      public String toString() {
100   return getName() + " " + getStart() + " " + getEnd();
101     }
102 }
103 
104 
105 
106 
107 
108 
109 
110 
111