X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fapi%2FSiftsClientI.java;fp=src%2Fjalview%2Fapi%2FSiftsClientI.java;h=35cb57fc509dfb9eed9a951b92cad5710c45604c;hb=605217afe6b4bb56ddd2e5925941ed8fa1bc9d32;hp=0000000000000000000000000000000000000000;hpb=a7c333565f975ce40069334efe291d035580c253;p=jalview.git diff --git a/src/jalview/api/SiftsClientI.java b/src/jalview/api/SiftsClientI.java new file mode 100644 index 0000000..35cb57f --- /dev/null +++ b/src/jalview/api/SiftsClientI.java @@ -0,0 +1,143 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ +package jalview.api; + +import jalview.datamodel.SequenceI; +import jalview.structure.StructureMapping; +import jalview.ws.sifts.MappingOutputPojo; +import jalview.ws.sifts.SiftsException; +import jalview.xml.binding.sifts.Entry.Entity; + +import java.util.HashSet; + +public interface SiftsClientI +{ + /** + * Get the DB Accession Id for the SIFTs Entry + * + * @return + */ + public String getDbAccessionId(); + + /** + * Get DB Coordinate system for the SIFTs Entry + * + * @return + */ + public String getDbCoordSys(); + + /** + * Get DB Evidence for the SIFTs Entry + * + * @return + */ + public String getDbEvidence(); + + /** + * Get DB Source for the SIFTs Entry + * + * @return + */ + public String getDbSource(); + + /** + * Get DB version for the SIFTs Entry + * + * @return + */ + public String getDbVersion(); + + /** + * Get Number of Entities available in the SIFTs Entry + * + * @return + */ + public int getEntityCount(); + + /** + * Get a unique Entity by its Id + * + * @param id + * ID of the entity to fetch + * @return Entity + * @throws Exception + */ + public Entity getEntityById(String id) throws SiftsException; + + /** + * Get all accession Ids available in the current SIFTs entry + * + * @return a unique set of discovered accession strings + */ + public HashSet getAllMappingAccession(); + + /** + * Check if the accessionId is available in current SIFTs Entry + * + * @param accessionId + * @return + */ + public boolean isFoundInSiftsEntry(String accessionId); + + /** + * Get the standard DB referenced by the SIFTs Entry + * + * @return + */ + public String[] getEntryDBs(); + + /** + * + * @param mop + * MappingOutputPojo + * @return Sequence<->Structure mapping as int[][] + * @throws SiftsException + */ + public StringBuffer getMappingOutput(MappingOutputPojo mop) + throws SiftsException; + + /** + * + * @param seq + * sequence to generate mapping against the structure + * @param pdbFile + * PDB file for the mapping + * @param chain + * the chain of the entry to use for mapping + * @return StructureMapping + * @throws SiftsException + */ + public StructureMapping getSiftsStructureMapping(SequenceI seq, + String pdbFile, String chain) throws SiftsException; + + /** + * Get residue by residue mapping for a given Sequence and SIFTs entity + * + * @param entityId + * Id of the target entity in the SIFTs entry + * @param seq + * SequenceI + * @return generated mapping + * @throws Exception + */ + public int[][] getGreedyMapping(String entityId, SequenceI seq, + java.io.PrintStream os) throws SiftsException; +} \ No newline at end of file