1 /*
2  * Copyright (C) 2009  Genome Research Limited
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17  *
18  */
19 package uk.ac.sanger.artemis.circular.digest;
20 
21 public class CutSite
22 {
23 	private String enzymeName;
24 	private int fivePrime;
25 	private int threePrime;
26 	private int fivePrimeRev;
27 	private int threePrimeRev;
28 	private boolean forward = false;
29   private boolean highlighted = false;
30 
CutSite(final String enzymeName, String fivePrimeStr, String threePrimeStr, String fivePrimeRevStr, String threePrimeRevStr, String strand)31 	CutSite(final String enzymeName,
32 			    String fivePrimeStr, String threePrimeStr,
33 			    String fivePrimeRevStr, String threePrimeRevStr,
34 			    String strand)
35 	{
36 		this.enzymeName = enzymeName;
37 		this.fivePrime  = Integer.parseInt(fivePrimeStr);
38 		this.threePrime = Integer.parseInt(threePrimeStr);
39 		if(!fivePrimeRevStr.equals("."))
40 			fivePrimeRev = Integer.parseInt(fivePrimeRevStr);
41 		if(!threePrimeRevStr.equals("."))
42 			threePrimeRev = Integer.parseInt(threePrimeRevStr);
43 
44 		if(strand.equals("+"))
45 			forward = true;
46 	}
47 
getThreePrime()48 	public int getThreePrime()
49 	{
50 		return threePrime;
51 	}
52 
getFivePrime()53 	public int getFivePrime()
54 	{
55 		return fivePrime;
56 	}
57 
getFivePrimeRev()58 	public int getFivePrimeRev()
59 	{
60 		return fivePrimeRev;
61 	}
62 
getThreePrimeRev()63 	public int getThreePrimeRev()
64 	{
65 		return threePrimeRev;
66 	}
67 
isForward()68 	public boolean isForward()
69 	{
70 		return forward;
71 	}
72 
isHighlighted()73 	public boolean isHighlighted()
74 	{
75 		return highlighted;
76 	}
77 
setHighlighted(boolean highlighted)78 	public void setHighlighted(boolean highlighted)
79 	{
80 		this.highlighted = highlighted;
81 	}
82 
getEnzymeName()83 	public String getEnzymeName()
84 	{
85 		return enzymeName;
86 	}
87 }
88