- private ArrayList<StructureMapping> getNWMappings(SequenceI seq,
- String pdbFile,
- String maxChainId, PDBChain maxChain, PDBfile pdb,
+ private boolean isCIFFile(String filename)
+ {
+ String fileExt = filename.substring(filename.lastIndexOf(".") + 1,
+ filename.length());
+ return "cif".equalsIgnoreCase(fileExt);
+ }
+
+ /**
+ * retrieve a mapping for seq from SIFTs using associated DBRefEntry for
+ * uniprot or PDB
+ *
+ * @param seq
+ * @param pdbFile
+ * @param targetChainId
+ * @param pdb
+ * @param maxChain
+ * @param sqmpping
+ * @param maxAlignseq
+ * @return
+ * @throws SiftsException
+ */
+ private StructureMapping getStructureMapping(SequenceI seq,
+ String pdbFile, String targetChainId, StructureFile pdb,
+ PDBChain maxChain, jalview.datamodel.Mapping sqmpping,
+ AlignSeq maxAlignseq) throws SiftsException
+ {
+ StructureMapping curChainMapping = siftsClient
+ .getSiftsStructureMapping(seq, pdbFile, targetChainId);
+ try
+ {
+ PDBChain chain = pdb.findChain(targetChainId);
+ if (chain != null)
+ {
+ chain.transferResidueAnnotation(curChainMapping, sqmpping);
+ }
+ } catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ return curChainMapping;
+ }
+
+ private StructureMapping getNWMappings(SequenceI seq, String pdbFile,
+ String maxChainId, PDBChain maxChain, StructureFile pdb,