import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
+import java.util.Set;
import java.util.Vector;
import jalview.analysis.AlignSeq;
import jalview.io.DataSourceType;
import jalview.io.StructureFile;
import jalview.structure.StructureImportSettings.TFType;
+import jalview.struture.PDBEntryUtils;
import jalview.util.MapList;
import jalview.util.MappingUtils;
import jalview.util.MessageManager;
{
ds = ds.getDatasetSequence();
}
-
+ List <PDBEntry> putativePDBe = PDBEntryUtils.selectPutativePDBe(seq,ds, pdb);
+
if (targetChainIds != null && targetChainIds[s] != null)
{
infChain = false;
targetChainId = targetChainIds[s];
}
- else if (seq.getName().indexOf("|") > -1)
- {
- targetChainId = seq.getName()
- .substring(seq.getName().lastIndexOf("|") + 1);
- if (targetChainId.length() > 1)
- {
- if (targetChainId.trim().length() == 0)
- {
- targetChainId = " ";
- }
- else
- {
- // not a valid chain identifier
- targetChainId = "";
- }
- }
- }
- else
- {
- targetChainId = "";
+ else {
+ targetChainId = PDBEntryUtils.inferChainId(seq);
}
/*
{
continue; // don't try to map chains don't match.
}
+ PDBEntry putativeChain = null;
+ if (!putativePDBe.isEmpty() && (putativeChain = PDBEntryUtils
+ .selectPutativePDBEntry(putativePDBe, chain)) == null)
+ {
+ continue;
+ }
// TODO: correctly determine sequence type for mixed na/peptide
// structures
final String type = chain.isNa ? AlignSeq.DNA : AlignSeq.PEP;
}
else
{
+ if (maxAlignseq.getS1Coverage()<0.15 && maxAlignseq.getS2Coverage()<0.15)
+ {
+ // skip this - the NW alignment is spurious
+ continue;
+ }
// Construct a needleman wunsch mapping instead.
if (progress != null)
{