1 /*-------------------------------------------------------------------------- 2 * Copyright 2009 utgenome.org 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 *--------------------------------------------------------------------------*/ 16 //-------------------------------------- 17 // utgb-core Project 18 // 19 // GenomeKeywordEntry.java 20 // Since: 2010/05/19 21 // 22 // $URL$ 23 // $Author$ 24 //-------------------------------------- 25 package org.utgenome.format.keyword; 26 27 /** 28 * Keyword associated to a genome region 29 * 30 * @author leo 31 * 32 */ 33 public class GenomeKeywordEntry { 34 35 public String ref; // reference sequence ID (e.g. hg19, ut-medaka-1.0) 36 public String chr; // chromosome/contig/scaffold name 37 public String text; // text containing keywords 38 public int start; // start position 39 public int end; // end position 40 41 public GenomeKeywordEntry(String ref, String chr, String text, int start, int end) { 42 this.ref = ref; 43 this.chr = chr; 44 this.text = text; 45 46 if (end <= start) { 47 int tmp = start; 48 start = end; 49 end = tmp; 50 } 51 52 this.start = start; 53 this.end = end; 54 } 55 56 /** 57 * Alias is a keyword 58 * 59 * @author leo 60 * 61 */ 62 public static class KeywordAlias { 63 public String keyword; // the keyword to redirect 64 public String alias; // aliases 65 66 public KeywordAlias(String keyword, String alias) { 67 this.keyword = keyword; 68 this.alias = alias; 69 } 70 71 } 72 73 }