-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGeneInfo.java
executable file
·51 lines (44 loc) · 1.16 KB
/
GeneInfo.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import java.util.*;
import java.io.*;
public class GeneInfo{
String name;
String newName;
int chrNumber;
int positionStart;
int positionEnd;
String orientation;
int genomeIndex;
int ploidyNumber = 1;
public GeneInfo(String gn, int gi){
name = gn;
genomeIndex = gi;
}
public GeneInfo(){
}
public GeneInfo(GeneInfo g){
name = g.name;
newName = g.newName;
chrNumber = g.chrNumber;
positionStart = g.positionStart;
positionEnd = g.positionEnd;
orientation = g.orientation;
genomeIndex=g.genomeIndex;
ploidyNumber = g.ploidyNumber;
}
public boolean sameGene(GeneInfo ag){
if(genomeIndex==ag.genomeIndex){
//if(ag.chrNumber==chrNumber){
if(name.equals(ag.name)){
//if(chrNumber!=ag.chrNumber || positionStart!=ag.positionStart || positionEnd!=ag.positionEnd){
// System.out.println("same name, different position");this.printGene();ag.printGene();
// System.out.print("&");
//}
return true;
//}
}}
return false;
}
public void print(){
System.out.println(name + "\t" + newName+ "\t" + chrNumber + "\t" + positionStart + "\t" + positionEnd+"\t" + orientation+"\t"+genomeIndex+"\t"+ploidyNumber);
}
}