001/** 002 * Copyright (C) 2010-2015 The Roslin Institute <contact andy.law@roslin.ed.ac.uk> 003 * 004 * This file is part of JEnsembl: a Java API to Ensembl data sources developed by the 005 * Bioinformatics Group at The Roslin Institute, The Royal (Dick) School of 006 * Veterinary Studies, University of Edinburgh. 007 * 008 * Project hosted at: http://jensembl.sourceforge.net 009 * 010 * This is free software: you can redistribute it and/or modify 011 * it under the terms of the GNU General Public License (version 3) as published by 012 * the Free Software Foundation. 013 * 014 * This software is distributed in the hope that it will be useful, 015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 017 * GNU General Public License for more details. 018 * 019 * You should have received a copy of the GNU General Public License 020 * in this software distribution. If not, see: http://opensource.org/licenses/gpl-3.0.html 021 */ 022package uk.ac.roslin.ensembl.model.core; 023 024import java.util.HashMap; 025import java.util.List; 026import org.biojava3.core.sequence.compound.NucleotideCompound; 027import org.biojava3.core.sequence.template.Sequence; 028import uk.ac.roslin.ensembl.exception.DAOException; 029import uk.ac.roslin.ensembl.exception.RangeException; 030import uk.ac.roslin.ensembl.model.Coordinate.Strand; 031import uk.ac.roslin.ensembl.model.*; 032import uk.ac.roslin.ensembl.model.variation.Variation; 033 034/** 035 * 036 * @author paterson 037 */ 038public interface DNASequence extends CoreObject, MappableObject, Sequence<NucleotideCompound> { 039 040 public Integer getDBSeqLength() ; 041 042 public void setDBSeqLength(Integer seqLength) ; 043 044 public CoordinateSystem getCoordSystem() ; 045 046 public void setCoordSystem(CoordinateSystem coordSystem) ; 047 048 public String getName() ; 049 050 public void setName(String name) ; 051 052 public List<? extends Gene> getGenesOnRegion(Coordinate coord) throws DAOException ; 053 054 public List<? extends Gene> getGenesOnRegion(Integer start, Integer stop) throws DAOException ; 055 056 public List<? extends Gene> getGenesOnRegion(Integer start, Integer stop, Strand strand) throws DAOException ; 057 058 /** 059 * Specifies method to retrieve all potential regions of conserved synteny 060 * (i.e. multiple chromosome regions) in the specified target Species 061 * @param range 062 * @param target 063 * @return a HashMap of each DNASequence discovered against the MappingSet of Homologous genes 064 * @throws DAOException 065 */ 066 public HashMap<? extends DNASequence, MappingSet> getRegionsOfConservedSynteny(Coordinate range, 067 Species target) throws DAOException; 068 069 /** 070 * Specifies method to retrieve a single potential region of conserved synteny 071 * for the named chromosome in the specified target Species. In effect a filter 072 * on the full query, for efficiency where the target chromosome is already known. 073 * @param range 074 * @param target 075 * @param chrName 076 * @return a HashMap of each DNASequence discovered against the MappingSet of Homologous genes 077 * @throws DAOException 078 */ 079 public HashMap<? extends DNASequence, MappingSet> getRegionsOfConservedSynteny(Coordinate range, 080 Species target, String chrName) throws DAOException; 081 082 public List<? extends Variation> getVariationsOnRegion(Coordinate coord) throws DAOException ; 083 public List<? extends Mapping> getVariationMappingsOnRegion(Coordinate coord) throws DAOException ; 084 085 public List<? extends Variation> getVariationsOnRegion(Integer start, Integer stop) throws DAOException ; 086 public List<? extends Mapping> getVariationMappingsOnRegion(Integer start, Integer stop) throws DAOException ; 087 088 public String getSequenceAsString(Integer begin, Integer end) throws RangeException ; 089 public String getPaddedSequenceAsString(Integer begin, Integer end) ; 090 091 public String getReverseComplementSequenceAsString(Integer begin, Integer end) throws RangeException ; 092 public String getPaddedReverseComplementSequenceAsString(Integer begin, Integer end) ; 093 094 public String getReverseComplementSequenceAsString() ; 095 096 public HashMap<ObjectType, ? extends MappingSet> getObjectTypeMappings() ; 097 098 public HashMap<ObjectType, CoordinateSet> getMappedRegions() ; 099 100 public Integer getCodonTableID(); 101 102}