X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2FMCview%2FPDBChain.js;h=727e98e8cf1e142bee111fc1930772f8ca1e0a9c;hp=b58d3ddf64780b6f6406ed07e4d00fe864674ccf;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/MCview/PDBChain.js b/site/j2s/MCview/PDBChain.js index b58d3dd..727e98e 100644 --- a/site/j2s/MCview/PDBChain.js +++ b/site/j2s/MCview/PDBChain.js @@ -1,286 +1,286 @@ -Clazz.declarePackage ("MCview"); -Clazz.load (["java.util.Vector"], "MCview.PDBChain", ["MCview.Bond", "$.Residue", "jalview.datamodel.AlignmentAnnotation", "$.Annotation", "$.Sequence", "$.SequenceFeature", "jalview.schemes.ResidueProperties", "java.awt.Color", "java.lang.StringBuilder"], function () { -c$ = Clazz.decorateAsClass (function () { -this.id = null; -this.bonds = null; -this.atoms = null; -this.residues = null; -this.offset = 0; -this.sequence = null; -this.shadow = null; -this.isNa = false; -this.isVisible = true; -this.pdbstart = 0; -this.pdbend = 0; -this.seqstart = 0; -this.seqend = 0; -this.pdbid = ""; -this.newline = null; -this.shadowMap = null; -Clazz.instantialize (this, arguments); -}, MCview, "PDBChain"); -Clazz.prepareFields (c$, function () { -this.bonds = new java.util.Vector (); -this.atoms = new java.util.Vector (); -this.residues = new java.util.Vector (); -this.newline = System.getProperty ("line.separator"); -}); -Clazz.makeConstructor (c$, -function (pdbid, id) { -this.pdbid = pdbid.toLowerCase (); -this.id = id; -}, "~S,~S"); -Clazz.defineMethod (c$, "setNewlineString", -function (nl) { -this.newline = nl; -}, "~S"); -Clazz.defineMethod (c$, "getNewlineString", -function () { -return this.newline; -}); -Clazz.defineMethod (c$, "print", -function () { -var tmp = new StringBuilder (256); -for (var b, $b = this.bonds.iterator (); $b.hasNext () && ((b = $b.next ()) || true);) { -tmp.append (b.at1.resName).append (" ").append (b.at1.resNumber).append (" ").append (this.offset).append (this.newline); -} -return tmp.toString (); -}); -Clazz.defineMethod (c$, "makeExactMapping", -function (as, s1) { -var pdbpos = as.getSeq2Start () - 2; -var alignpos = s1.getStart () + as.getSeq1Start () - 3; -for (var atom, $atom = this.atoms.iterator (); $atom.hasNext () && ((atom = $atom.next ()) || true);) { -atom.alignmentMapping = -1; -} -for (var i = 0; i < as.astr1.length; i++) { -if (as.astr1.charAt (i) != '-') { -alignpos++; -}if (as.astr2.charAt (i) != '-') { -pdbpos++; -}if (as.astr1.charAt (i) == as.astr2.charAt (i)) { -var res = this.residues.elementAt (pdbpos); -for (var atom, $atom = res.atoms.iterator (); $atom.hasNext () && ((atom = $atom.next ()) || true);) { -atom.alignmentMapping = alignpos; -} -}} -}, "jalview.analysis.AlignSeq,jalview.datamodel.SequenceI"); -Clazz.defineMethod (c$, "transferRESNUMFeatures", -function (seq, status) { -var sq = seq; -while (sq != null && sq.getDatasetSequence () != null) { -sq = sq.getDatasetSequence (); -if (sq === this.sequence) { -return null; -}} -if (status == null) { -status = "IEA:jalview"; -}var features = this.sequence.getSequenceFeatures (); -for (var i = 0; i < features.length; i++) { -if (features[i].getFeatureGroup ().equals (this.pdbid)) { -var tx = new jalview.datamodel.SequenceFeature (features[i]); -tx.setBegin (1 + this.residues.elementAt (tx.getBegin () - this.offset).atoms.elementAt (0).alignmentMapping); -tx.setEnd (1 + this.residues.elementAt (tx.getEnd () - this.offset).atoms.elementAt (0).alignmentMapping); -tx.setStatus (status + ((tx.getStatus () == null || tx.getStatus ().length == 0) ? "" : ":" + tx.getStatus ())); -if (tx.begin != 0 && tx.end != 0) { -sq.addSequenceFeature (tx); -}}} -return features; -}, "jalview.datamodel.SequenceI,~S"); -Clazz.defineMethod (c$, "makeCaBondList", -function () { -var na = false; -var numNa = 0; -for (var i = 0; i < (this.residues.size () - 1); i++) { -var tmpres = this.residues.elementAt (i); -var tmpres2 = this.residues.elementAt (i + 1); -var at1 = tmpres.findAtom ("CA"); -var at2 = tmpres2.findAtom ("CA"); -na = false; -if ((at1 == null) && (at2 == null)) { -na = true; -at1 = tmpres.findAtom ("P"); -at2 = tmpres2.findAtom ("P"); -}if ((at1 != null) && (at2 != null)) { -if (at1.chain.equals (at2.chain)) { -if (na) { -numNa++; -}this.makeBond (at1, at2); -}} else { -System.out.println ("not found " + i); -}} -if (this.residues.size () > 0 && (Clazz.doubleToInt (numNa / (this.residues.size () - 1)) > 0.99)) { -this.isNa = true; -}}); -Clazz.defineMethod (c$, "makeBond", -function (at1, at2) { -this.bonds.addElement ( new MCview.Bond (at1, at2)); -}, "MCview.Atom,MCview.Atom"); -Clazz.defineMethod (c$, "makeResidueList", -function (visibleChainAnnotation) { -var count = 0; -var symbol; -var deoxyn = false; -var nucleotide = false; -var seq = new StringBuilder (256); -var resFeatures = new java.util.Vector (); -var resAnnotation = new java.util.Vector (); -var i; -var iSize = this.atoms.size () - 1; -var resNumber = -1; -for (i = 0; i <= iSize; i++) { -var tmp = this.atoms.elementAt (i); -resNumber = tmp.resNumber; -var res = resNumber; -if (i == 0) { -this.offset = resNumber; -}var resAtoms = new java.util.Vector (); -while ((resNumber == res) && (i < this.atoms.size ())) { -resAtoms.add (this.atoms.elementAt (i)); -i++; -if (i < this.atoms.size ()) { -resNumber = this.atoms.elementAt (i).resNumber; -} else { -resNumber++; -}} -i--; -this.residues.addElement ( new MCview.Residue (resAtoms, resNumber - 1, count)); -var tmpres = this.residues.lastElement (); -var tmpat = tmpres.atoms.get (0); -var sf = new jalview.datamodel.SequenceFeature ("RESNUM", tmpat.resName + ":" + tmpat.resNumIns + " " + this.pdbid + this.id, "", this.offset + count, this.offset + count, this.pdbid); -resFeatures.addElement (sf); -resAnnotation.addElement ( new jalview.datamodel.Annotation (tmpat.tfactor)); -if ((symbol = jalview.schemes.ResidueProperties.getAA3Hash ().get (tmpat.resName)) == null) { -var nucname = tmpat.resName.trim (); -deoxyn = nucname.length == 2 && jalview.schemes.ResidueProperties.aaIndex[nucname.charCodeAt (0)] == jalview.schemes.ResidueProperties.aaIndex['D'.charCodeAt (0)]; -if (tmpat.name.equalsIgnoreCase ("CA") || jalview.schemes.ResidueProperties.nucleotideIndex[nucname.charCodeAt ((deoxyn ? 1 : 0))] == -1) { -seq.append ("X"); -} else { -nucleotide = true; -seq.append (nucname.charAt ((deoxyn ? 1 : 0))); -}} else { -if (nucleotide) { -System.err.println ("Warning: mixed nucleotide and amino acid chain.. its gonna do bad things to you!"); -}seq.append (jalview.schemes.ResidueProperties.aa[(symbol).intValue ()]); -}count++; -} -if (this.id.length < 1) { -this.id = " "; -}this.isNa = nucleotide; -this.sequence = new jalview.datamodel.Sequence (this.id, seq.toString (), this.offset, resNumber - 1); -for (i = 0, iSize = resFeatures.size (); i < iSize; i++) { -this.sequence.addSequenceFeature (resFeatures.elementAt (i)); -resFeatures.setElementAt (null, i); -} -if (visibleChainAnnotation) { -var annots = new Array (resAnnotation.size ()); -var max = 0; -for (i = 0, iSize = annots.length; i < iSize; i++) { -annots[i] = resAnnotation.elementAt (i); -if (annots[i].value > max) { -max = annots[i].value; -}resAnnotation.setElementAt (null, i); -} -var tfactorann = new jalview.datamodel.AlignmentAnnotation ("Temperature Factor", "Temperature Factor for " + this.pdbid + this.id, annots, 0, max, 2); -tfactorann.setSequenceRef (this.sequence); -this.sequence.addAlignmentAnnotation (tfactorann); -}}, "~B"); -Clazz.defineMethod (c$, "setChargeColours", -function () { -for (var b, $b = this.bonds.iterator (); $b.hasNext () && ((b = $b.next ()) || true);) { -if (b.at1 != null && b.at2 != null) { -b.startCol = MCview.PDBChain.getChargeColour (b.at1.resName); -b.endCol = MCview.PDBChain.getChargeColour (b.at2.resName); -} else { -b.startCol = java.awt.Color.gray; -b.endCol = java.awt.Color.gray; -}} -}); -c$.getChargeColour = Clazz.defineMethod (c$, "getChargeColour", -function (resName) { -var result = java.awt.Color.lightGray; -if ("ASP".equals (resName) || "GLU".equals (resName)) { -result = java.awt.Color.red; -} else if ("LYS".equals (resName) || "ARG".equals (resName)) { -result = java.awt.Color.blue; -} else if ("CYS".equals (resName)) { -result = java.awt.Color.yellow; -}return result; -}, "~S"); -Clazz.defineMethod (c$, "setChainColours", -function (cs) { -var index; -for (var b, $b = this.bonds.iterator (); $b.hasNext () && ((b = $b.next ()) || true);) { -try { -index = jalview.schemes.ResidueProperties.aa3Hash.get (b.at1.resName).intValue (); -b.startCol = cs.findColour (jalview.schemes.ResidueProperties.aa[index].charAt (0)); -index = jalview.schemes.ResidueProperties.aa3Hash.get (b.at2.resName).intValue (); -b.endCol = cs.findColour (jalview.schemes.ResidueProperties.aa[index].charAt (0)); -} catch (e) { -if (Clazz.exceptionOf (e, Exception)) { -b.startCol = java.awt.Color.gray; -b.endCol = java.awt.Color.gray; -} else { -throw e; -} -} -} -}, "jalview.schemes.ColourSchemeI"); -Clazz.defineMethod (c$, "setChainColours", -function (col) { -for (var b, $b = this.bonds.iterator (); $b.hasNext () && ((b = $b.next ()) || true);) { -b.startCol = col; -b.endCol = col; -} -}, "java.awt.Color"); -Clazz.defineMethod (c$, "transferResidueAnnotation", -function (mapping, sqmpping) { -var sq = mapping.getSequence (); -var dsq = sq; -if (sq != null) { -while (dsq.getDatasetSequence () != null) { -dsq = dsq.getDatasetSequence (); -} -if (this.shadow != null && this.shadow.getAnnotation () != null) { -for (var ana, $ana = 0, $$ana = this.shadow.getAnnotation (); $ana < $$ana.length && ((ana = $$ana[$ana]) || true); $ana++) { -var transfer = sq.getAlignmentAnnotations (ana.getCalcId (), ana.label); -if (transfer == null || transfer.size () == 0) { -ana = new jalview.datamodel.AlignmentAnnotation (ana); -ana.liftOver (this.sequence, this.shadowMap); -ana.liftOver (dsq, sqmpping); -dsq.addAlignmentAnnotation (ana); -} else { -continue; -}} -} else { -if (this.sequence != null && this.sequence.getAnnotation () != null) { -for (var ana, $ana = 0, $$ana = this.sequence.getAnnotation (); $ana < $$ana.length && ((ana = $$ana[$ana]) || true); $ana++) { -var transfer = sq.getAlignmentAnnotations (ana.getCalcId (), ana.label); -if (transfer == null || transfer.size () == 0) { -ana = new jalview.datamodel.AlignmentAnnotation (ana); -ana.liftOver (dsq, sqmpping); -} else { -continue; -}} -}}if (false) { -var min = -1; -var max = 0; -var an = new Array (sq.getEnd () - sq.getStart () + 1); -for (var i = sq.getStart (), j = sq.getEnd (), k = 0; i <= j; i++, k++) { -var prn = mapping.getPDBResNum (k + 1); -an[k] = new jalview.datamodel.Annotation (prn); -if (min == -1) { -min = k; -max = k; -} else { -if (min > k) { -min = k; -} else if (max < k) { -max = k; -}}} -sq.addAlignmentAnnotation ( new jalview.datamodel.AlignmentAnnotation ("PDB.RESNUM", "PDB Residue Numbering for " + this.pdbid + ":" + this.id, an, min, max, 2)); -}}}, "jalview.structure.StructureMapping,jalview.datamodel.Mapping"); -Clazz.defineStatics (c$, -"PDBFILEFEATURE", "PDBFile", -"IEASTATUS", "IEA:jalview"); -}); +Clazz.declarePackage ("MCview"); +Clazz.load (["java.util.Vector"], "MCview.PDBChain", ["MCview.Bond", "$.Residue", "jalview.datamodel.AlignmentAnnotation", "$.Annotation", "$.Sequence", "$.SequenceFeature", "jalview.schemes.ResidueProperties", "java.awt.Color", "java.lang.StringBuilder"], function () { +c$ = Clazz.decorateAsClass (function () { +this.id = null; +this.bonds = null; +this.atoms = null; +this.residues = null; +this.offset = 0; +this.sequence = null; +this.shadow = null; +this.isNa = false; +this.isVisible = true; +this.pdbstart = 0; +this.pdbend = 0; +this.seqstart = 0; +this.seqend = 0; +this.pdbid = ""; +this.newline = null; +this.shadowMap = null; +Clazz.instantialize (this, arguments); +}, MCview, "PDBChain"); +Clazz.prepareFields (c$, function () { +this.bonds = new java.util.Vector (); +this.atoms = new java.util.Vector (); +this.residues = new java.util.Vector (); +this.newline = System.getProperty ("line.separator"); +}); +Clazz.makeConstructor (c$, +function (pdbid, id) { +this.pdbid = pdbid.toLowerCase (); +this.id = id; +}, "~S,~S"); +Clazz.defineMethod (c$, "setNewlineString", +function (nl) { +this.newline = nl; +}, "~S"); +Clazz.defineMethod (c$, "getNewlineString", +function () { +return this.newline; +}); +Clazz.defineMethod (c$, "print", +function () { +var tmp = new StringBuilder (256); +for (var b, $b = this.bonds.iterator (); $b.hasNext () && ((b = $b.next ()) || true);) { +tmp.append (b.at1.resName).append (" ").append (b.at1.resNumber).append (" ").append (this.offset).append (this.newline); +} +return tmp.toString (); +}); +Clazz.defineMethod (c$, "makeExactMapping", +function (as, s1) { +var pdbpos = as.getSeq2Start () - 2; +var alignpos = s1.getStart () + as.getSeq1Start () - 3; +for (var atom, $atom = this.atoms.iterator (); $atom.hasNext () && ((atom = $atom.next ()) || true);) { +atom.alignmentMapping = -1; +} +for (var i = 0; i < as.astr1.length; i++) { +if (as.astr1.charAt (i) != '-') { +alignpos++; +}if (as.astr2.charAt (i) != '-') { +pdbpos++; +}if (as.astr1.charAt (i) == as.astr2.charAt (i)) { +var res = this.residues.elementAt (pdbpos); +for (var atom, $atom = res.atoms.iterator (); $atom.hasNext () && ((atom = $atom.next ()) || true);) { +atom.alignmentMapping = alignpos; +} +}} +}, "jalview.analysis.AlignSeq,jalview.datamodel.SequenceI"); +Clazz.defineMethod (c$, "transferRESNUMFeatures", +function (seq, status) { +var sq = seq; +while (sq != null && sq.getDatasetSequence () != null) { +sq = sq.getDatasetSequence (); +if (sq === this.sequence) { +return null; +}} +if (status == null) { +status = "IEA:jalview"; +}var features = this.sequence.getSequenceFeatures (); +for (var i = 0; i < features.length; i++) { +if (features[i].getFeatureGroup ().equals (this.pdbid)) { +var tx = new jalview.datamodel.SequenceFeature (features[i]); +tx.setBegin (1 + this.residues.elementAt (tx.getBegin () - this.offset).atoms.elementAt (0).alignmentMapping); +tx.setEnd (1 + this.residues.elementAt (tx.getEnd () - this.offset).atoms.elementAt (0).alignmentMapping); +tx.setStatus (status + ((tx.getStatus () == null || tx.getStatus ().length == 0) ? "" : ":" + tx.getStatus ())); +if (tx.begin != 0 && tx.end != 0) { +sq.addSequenceFeature (tx); +}}} +return features; +}, "jalview.datamodel.SequenceI,~S"); +Clazz.defineMethod (c$, "makeCaBondList", +function () { +var na = false; +var numNa = 0; +for (var i = 0; i < (this.residues.size () - 1); i++) { +var tmpres = this.residues.elementAt (i); +var tmpres2 = this.residues.elementAt (i + 1); +var at1 = tmpres.findAtom ("CA"); +var at2 = tmpres2.findAtom ("CA"); +na = false; +if ((at1 == null) && (at2 == null)) { +na = true; +at1 = tmpres.findAtom ("P"); +at2 = tmpres2.findAtom ("P"); +}if ((at1 != null) && (at2 != null)) { +if (at1.chain.equals (at2.chain)) { +if (na) { +numNa++; +}this.makeBond (at1, at2); +}} else { +System.out.println ("not found " + i); +}} +if (this.residues.size () > 0 && (Clazz.doubleToInt (numNa / (this.residues.size () - 1)) > 0.99)) { +this.isNa = true; +}}); +Clazz.defineMethod (c$, "makeBond", +function (at1, at2) { +this.bonds.addElement ( new MCview.Bond (at1, at2)); +}, "MCview.Atom,MCview.Atom"); +Clazz.defineMethod (c$, "makeResidueList", +function (visibleChainAnnotation) { +var count = 0; +var symbol; +var deoxyn = false; +var nucleotide = false; +var seq = new StringBuilder (256); +var resFeatures = new java.util.Vector (); +var resAnnotation = new java.util.Vector (); +var i; +var iSize = this.atoms.size () - 1; +var resNumber = -1; +for (i = 0; i <= iSize; i++) { +var tmp = this.atoms.elementAt (i); +resNumber = tmp.resNumber; +var res = resNumber; +if (i == 0) { +this.offset = resNumber; +}var resAtoms = new java.util.Vector (); +while ((resNumber == res) && (i < this.atoms.size ())) { +resAtoms.add (this.atoms.elementAt (i)); +i++; +if (i < this.atoms.size ()) { +resNumber = this.atoms.elementAt (i).resNumber; +} else { +resNumber++; +}} +i--; +this.residues.addElement ( new MCview.Residue (resAtoms, resNumber - 1, count)); +var tmpres = this.residues.lastElement (); +var tmpat = tmpres.atoms.get (0); +var sf = new jalview.datamodel.SequenceFeature ("RESNUM", tmpat.resName + ":" + tmpat.resNumIns + " " + this.pdbid + this.id, "", this.offset + count, this.offset + count, this.pdbid); +resFeatures.addElement (sf); +resAnnotation.addElement ( new jalview.datamodel.Annotation (tmpat.tfactor)); +if ((symbol = jalview.schemes.ResidueProperties.getAA3Hash ().get (tmpat.resName)) == null) { +var nucname = tmpat.resName.trim (); +deoxyn = nucname.length == 2 && jalview.schemes.ResidueProperties.aaIndex[nucname.charCodeAt (0)] == jalview.schemes.ResidueProperties.aaIndex['D'.charCodeAt (0)]; +if (tmpat.name.equalsIgnoreCase ("CA") || jalview.schemes.ResidueProperties.nucleotideIndex[nucname.charCodeAt ((deoxyn ? 1 : 0))] == -1) { +seq.append ("X"); +} else { +nucleotide = true; +seq.append (nucname.charAt ((deoxyn ? 1 : 0))); +}} else { +if (nucleotide) { +System.err.println ("Warning: mixed nucleotide and amino acid chain.. its gonna do bad things to you!"); +}seq.append (jalview.schemes.ResidueProperties.aa[(symbol).intValue ()]); +}count++; +} +if (this.id.length < 1) { +this.id = " "; +}this.isNa = nucleotide; +this.sequence = new jalview.datamodel.Sequence (this.id, seq.toString (), this.offset, resNumber - 1); +for (i = 0, iSize = resFeatures.size (); i < iSize; i++) { +this.sequence.addSequenceFeature (resFeatures.elementAt (i)); +resFeatures.setElementAt (null, i); +} +if (visibleChainAnnotation) { +var annots = new Array (resAnnotation.size ()); +var max = 0; +for (i = 0, iSize = annots.length; i < iSize; i++) { +annots[i] = resAnnotation.elementAt (i); +if (annots[i].value > max) { +max = annots[i].value; +}resAnnotation.setElementAt (null, i); +} +var tfactorann = new jalview.datamodel.AlignmentAnnotation ("Temperature Factor", "Temperature Factor for " + this.pdbid + this.id, annots, 0, max, 2); +tfactorann.setSequenceRef (this.sequence); +this.sequence.addAlignmentAnnotation (tfactorann); +}}, "~B"); +Clazz.defineMethod (c$, "setChargeColours", +function () { +for (var b, $b = this.bonds.iterator (); $b.hasNext () && ((b = $b.next ()) || true);) { +if (b.at1 != null && b.at2 != null) { +b.startCol = MCview.PDBChain.getChargeColour (b.at1.resName); +b.endCol = MCview.PDBChain.getChargeColour (b.at2.resName); +} else { +b.startCol = java.awt.Color.gray; +b.endCol = java.awt.Color.gray; +}} +}); +c$.getChargeColour = Clazz.defineMethod (c$, "getChargeColour", +function (resName) { +var result = java.awt.Color.lightGray; +if ("ASP".equals (resName) || "GLU".equals (resName)) { +result = java.awt.Color.red; +} else if ("LYS".equals (resName) || "ARG".equals (resName)) { +result = java.awt.Color.blue; +} else if ("CYS".equals (resName)) { +result = java.awt.Color.yellow; +}return result; +}, "~S"); +Clazz.defineMethod (c$, "setChainColours", +function (cs) { +var index; +for (var b, $b = this.bonds.iterator (); $b.hasNext () && ((b = $b.next ()) || true);) { +try { +index = jalview.schemes.ResidueProperties.aa3Hash.get (b.at1.resName).intValue (); +b.startCol = cs.findColour (jalview.schemes.ResidueProperties.aa[index].charAt (0)); +index = jalview.schemes.ResidueProperties.aa3Hash.get (b.at2.resName).intValue (); +b.endCol = cs.findColour (jalview.schemes.ResidueProperties.aa[index].charAt (0)); +} catch (e) { +if (Clazz.exceptionOf (e, Exception)) { +b.startCol = java.awt.Color.gray; +b.endCol = java.awt.Color.gray; +} else { +throw e; +} +} +} +}, "jalview.schemes.ColourSchemeI"); +Clazz.defineMethod (c$, "setChainColours", +function (col) { +for (var b, $b = this.bonds.iterator (); $b.hasNext () && ((b = $b.next ()) || true);) { +b.startCol = col; +b.endCol = col; +} +}, "java.awt.Color"); +Clazz.defineMethod (c$, "transferResidueAnnotation", +function (mapping, sqmpping) { +var sq = mapping.getSequence (); +var dsq = sq; +if (sq != null) { +while (dsq.getDatasetSequence () != null) { +dsq = dsq.getDatasetSequence (); +} +if (this.shadow != null && this.shadow.getAnnotation () != null) { +for (var ana, $ana = 0, $$ana = this.shadow.getAnnotation (); $ana < $$ana.length && ((ana = $$ana[$ana]) || true); $ana++) { +var transfer = sq.getAlignmentAnnotations (ana.getCalcId (), ana.label); +if (transfer == null || transfer.size () == 0) { +ana = new jalview.datamodel.AlignmentAnnotation (ana); +ana.liftOver (this.sequence, this.shadowMap); +ana.liftOver (dsq, sqmpping); +dsq.addAlignmentAnnotation (ana); +} else { +continue; +}} +} else { +if (this.sequence != null && this.sequence.getAnnotation () != null) { +for (var ana, $ana = 0, $$ana = this.sequence.getAnnotation (); $ana < $$ana.length && ((ana = $$ana[$ana]) || true); $ana++) { +var transfer = sq.getAlignmentAnnotations (ana.getCalcId (), ana.label); +if (transfer == null || transfer.size () == 0) { +ana = new jalview.datamodel.AlignmentAnnotation (ana); +ana.liftOver (dsq, sqmpping); +} else { +continue; +}} +}}if (false) { +var min = -1; +var max = 0; +var an = new Array (sq.getEnd () - sq.getStart () + 1); +for (var i = sq.getStart (), j = sq.getEnd (), k = 0; i <= j; i++, k++) { +var prn = mapping.getPDBResNum (k + 1); +an[k] = new jalview.datamodel.Annotation (prn); +if (min == -1) { +min = k; +max = k; +} else { +if (min > k) { +min = k; +} else if (max < k) { +max = k; +}}} +sq.addAlignmentAnnotation ( new jalview.datamodel.AlignmentAnnotation ("PDB.RESNUM", "PDB Residue Numbering for " + this.pdbid + ":" + this.id, an, min, max, 2)); +}}}, "jalview.structure.StructureMapping,jalview.datamodel.Mapping"); +Clazz.defineStatics (c$, +"PDBFILEFEATURE", "PDBFile", +"IEASTATUS", "IEA:jalview"); +});