/** * Generate a FASTA sequence with the SS annotation letters in the * aminoacid sequence order. * @return String in FASTA sequence format */ public String printFASTA() { StringBuffer buf = new StringBuffer(); String nl = System.getProperty("line.separator"); buf.append(">"+groups[0].getChain().getStructure().getIdentifier()+nl); for (int g = 0; g < groups.length; g++){ buf.append(getSecStrucState(g).getType()); } return buf.toString(); }
private Structure getParentStructure() { Atom[] firstMol = this.molecules.getFirst(); if (firstMol.length==0) { logger.warn("No atoms found in first molecule, can't get parent Structure"); return null; } return firstMol[0].getGroup().getChain().getStructure(); }
/** * This method is provisional and should only be used for coloring Subunits. * A new coloring schema has to be implemented to allow the coloring of * Subunits, without implying one Subunit = one Chain. * * @return A List of the Model number of each Subunit */ public List<Integer> getModelNumbers() { List<Integer> models = new ArrayList<Integer>(getSubunitCount()); // Loop through all subunits in the clusters and fill Lists for (int c = 0; c < clusters.size(); c++) { for (int s = 0; s < clusters.get(c).size(); s++) { Atom[] atoms = clusters.get(c).getAlignedAtomsSubunit(s); // TODO guess them chain and model (very ugly) Chain chain = atoms[0].getGroup().getChain(); int model = 0; for (int m = 0; m < chain.getStructure().nrModels(); m++) { if (chain.getStructure().getModel(m).contains(chain)) { model = m; break; } } models.add(model); } } return models; }
afpChain.setName2(ca2[0].getGroup().getChain().getStructure().getName()); } catch( Exception e) {}
Chain c = g.getChain(); if (c != null) { s = c.getStructure();
Chain c = g.getChain(); if (c != null) { s = c.getStructure();
String pdbId = "?"; if ( chains.size() > 0) { Structure struc = chains.get(0).getStructure(); if ( struc != null) pdbId = struc.getPDBCode();
if (ca2.length!=0 && ca2[0].getGroup().getChain()!=null && ca2[0].getGroup().getChain().getStructure()!=null) { currentAlignment.setName2(ca2[0].getGroup().getChain().getStructure().getName()+" CP="+cp);
/** * Return true if the PDB's chain passes the criteria I.e.: Organism matches */ boolean filterPdbChain(Chain chain) { // note: Compound is replaced by EntityInfo in biojava 5.x for (EntityInfo entityInfo : chain.getStructure().getEntityInfos()) { if (contains(entityInfo.getOrganismCommon(), pdbOrganismCommon) || contains(entityInfo.getOrganismScientific(), pdbOrganismScientific)) { return true; } } return false; }
public void setAa2(AminoAcid aa) { setPdbId(aa.getChain().getStructure().getPDBCode()); pdbChainId2 = aa.getChainId(); aaPos2 = aa.getResidueNumber().getSeqNum() - 1; aa2 = aa.getChemComp().getOne_letter_code().charAt(0); }
public void setAa1(AminoAcid aa) { setPdbId(aa.getChain().getStructure().getPDBCode()); pdbChainId1 = aa.getChainId(); aaPos1 = aa.getResidueNumber().getSeqNum() - 1; aa1 = aa.getChemComp().getOne_letter_code().charAt(0); }
.getStructure().clone();
name = e.getStructureIdentifiers().get(0); } else name = atoms[0].getGroup().getChain().getStructure() .getStructureIdentifier();
Structure s = atoms[0].getGroup().getChain().getStructure(); if (SecStrucTools.getSecStrucInfo(s).isEmpty()) { logger.info("Calculating Secondary Structure...");
if (ca1.length!=0 && ca1[0].getGroup().getChain()!=null && ca1[0].getGroup().getChain().getStructure()!=null) afpChain.setName1(ca1[0].getGroup().getChain().getStructure().getName()); if (ca2.length!=0 && ca2[0].getGroup().getChain()!=null && ca2[0].getGroup().getChain().getStructure()!=null) afpChain.setName2(ca2[0].getGroup().getChain().getStructure().getName());
a.setName1(ca1[0].getGroup().getChain().getStructure().getName()); if(ca2[0].getGroup().getChain().getStructure() != null) { a.setName2(ca2[0].getGroup().getChain().getStructure().getName());
g.getChainId(), g.getResidueNumber().toString(), g.getChain().getStructure().getPDBCode() ); continue;
StructureIdentifier id = atoms[0].getGroup().getChain().getStructure() .getStructureIdentifier(); optimalAFP.setName1(id.getIdentifier());
/** Suggest domains for a set of Calpha atoms * * @param ca an array of Calpha atoms * @return a list of possible domains * @throws StructureException */ public static List<Domain> suggestDomains(Atom[] ca) throws StructureException{ GetDistanceMatrix distMaxCalculator = new GetDistanceMatrix(); PDPDistanceMatrix pdpMatrix = distMaxCalculator.getDistanceMatrix(ca); Domain dom = new Domain(); Chain c = ca[0].getGroup().getChain(); dom.setId("D"+c.getStructure().getPDBCode()+c.getId()+"1"); dom.setSize(ca.length); dom.setNseg(1); dom.getSegmentAtPos(0).setFrom(0); dom.getSegmentAtPos(0).setTo(ca.length-1); CutSites cutSites = new CutSites(); // Do the initial splitting CutDomain cutDomain = new CutDomain(ca,pdpMatrix); cutDomain.cutDomain(dom, cutSites, pdpMatrix); List<Domain> domains = cutDomain.getDomains(); // domains = ClusterDomains.cluster(domains, pdpMatrix); ShortSegmentRemover.cleanup(domains); return domains; }