ex.printStackTrace();
return null;
}
-
+
String targetChain;
for (int s = 0; s < sequence.length; s++)
{
+ boolean infChain = true;
if (targetChains != null && targetChains[s] != null)
+ {
+ infChain = false;
targetChain = targetChains[s];
+ }
else if (sequence[s].getName().indexOf("|") > -1)
{
targetChain = sequence[s].getName().substring(
sequence[s].getName().lastIndexOf("|") + 1);
+ if (targetChain.length() > 1)
+ {
+ if (targetChain.trim().length() == 0)
+ {
+ targetChain = " ";
+ }
+ else
+ {
+ // not a valid chain identifier
+ targetChain = "";
+ }
+ }
}
else
targetChain = "";
boolean first = true;
for (int i = 0; i < pdb.chains.size(); i++)
{
- // TODO: re http://issues.jalview.org/browse/JAL-583 : this patch may
- // need to be revoked
PDBChain chain = ((PDBChain) pdb.chains.elementAt(i));
- if (targetChain.length() > 0 && !targetChain.equals(chain.id))
+ if (targetChain.length() > 0 && !targetChain.equals(chain.id) && !infChain)
{
continue; // don't try to map chains don't match.
}
- // end of patch for limiting computed mappings
// TODO: correctly determine sequence type for mixed na/peptide
// structures
AlignSeq as = new AlignSeq(sequence[s],