- System.err
- .println(">>>>>>> SIFTs mapping could not be obtained... Now mapping with NW alignment");
- seqToStrucMapping = getNWMappings(seq, pdbFile, maxChainId,
- maxChain, pdb, maxAlignseq);
+ List<StructureMapping> foundSiftsMappings = new ArrayList<StructureMapping>();
+ for (PDBChain chain : pdb.getChains())
+ {
+ try
+ {
+ StructureMapping siftsMapping = getStructureMapping(seq,
+ pdbFile, chain.id, pdb, chain, sqmpping, maxAlignseq);
+ foundSiftsMappings.add(siftsMapping);
+ } catch (SiftsException e)
+ {
+ System.err.println(e.getMessage());
+ }
+ }
+ if (!foundSiftsMappings.isEmpty())
+ {
+ seqToStrucMapping.addAll(foundSiftsMappings);
+ maxChain.makeExactMapping(maxAlignseq, seq);
+ maxChain.transferRESNUMFeatures(seq, null);// FIXME: is this
+ // "IEA:SIFTS" ?
+ maxChain.transferResidueAnnotation(foundSiftsMappings.get(0),
+ sqmpping);
+ ds.addPDBId(sqmpping.getTo().getAllPDBEntries().get(0));
+ }
+ else
+ {
+ StructureMapping nwMapping = getNWMappings(seq, pdbFile,
+ maxChainId, maxChain, pdb, maxAlignseq);
+ seqToStrucMapping.add(nwMapping);
+ maxChain.transferRESNUMFeatures(seq, null); // FIXME: is this
+ // "IEA:Jalview" ?
+ maxChain.transferResidueAnnotation(nwMapping, sqmpping);
+ ds.addPDBId(maxChain.sequence.getAllPDBEntries().get(0));
+ }