Java Code Examples for org.biojava.nbio.structure.symmetry.utils.BlastClustReader

The following examples show how to use org.biojava.nbio.structure.symmetry.utils.BlastClustReader. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: mmtf-spark   Source File: BlastClusters.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Filters representative PDB structures
 * 
 * @param Sequence
 *            identity (100, 95, 90, 70, 50, 40, 30)
 * @throws IOException
 */
public BlastClusters(int sequenceIdentity) throws IOException {
    if (!clusterLevels.contains(sequenceIdentity)) {
        throw new IllegalArgumentException("ERROR: invalid sequence identity: " + sequenceIdentity
                + ". Choose one of the following values: " + clusterLevels);
    }

    pdbIds = new HashSet<>();
    BlastClustReader reader = new BlastClustReader(sequenceIdentity);
    for (List<String> cluster : reader.getPdbChainIdClusters()) {
        pdbIds.add(cluster.get(0)); // add PDB ID.ChainId
        pdbIds.add(cluster.get(0).substring(0, 4)); // add PDB ID
    }
}
 
Example 2
public ProteinComplexSignature(String pdbId, List<String> chainIds, BlastClustReader blastClust) {
	this.pdbId = pdbId;
	this.chainIds = chainIds;
	this.blastClust = blastClust;

	getChainSignatures();
}
 
Example 3
Source Project: symmetry   Source File: ScanSymmetry.java    License: GNU Lesser General Public License v2.1 4 votes vote down vote up
private void printToCsv(BlastClustReader reader95,
		BlastClustReader reader30, PrintWriter out, String pdbId,
		int bioAssemblyId, int time, List<QuatSymmetryResults> resultsList,
		SpaceGroup spaceGroup) {

	for (QuatSymmetryResults results : resultsList) {
		ProteinComplexSignature s95 = new ProteinComplexSignature(pdbId,
				new QuatSymmetrySubunits(results.getSubunitClusters())
						.getChainIds(), reader95);
		String signature95 = s95.getComplexSignature();
		String stoich95 = s95.getComplexStoichiometry();
		ProteinComplexSignature s30 = new ProteinComplexSignature(pdbId,
				new QuatSymmetrySubunits(results.getSubunitClusters())
						.getChainIds(), reader30);
		String signature30 = s30.getComplexSignature();
		String stoich30 = s30.getComplexStoichiometry();
		int order = 1;
		if (!results.getSymmetry().equals("H")) {
			order = results.getRotationGroup().getOrder();
		}

		out.println("PDB"
				+ pdbId
				+ ","
				+ bioAssemblyId
				+ ","
				+ results.isLocal()
				+ ","
				+ results.isPseudoStoichiometric()
				+ ","
				+ results.getStoichiometry()
				+ ","
				+ results.getSymmetry()
				+ ","
				+ order
				+ ","
				+ isLowSymmetry(results)
				+ ","
				+ Math.round(100)// results.getSubunits().getMinSequenceIdentity()
									// * 100.0)
				+ ","
				+ Math.round(100) // results.getSubunits().getMaxSequenceIdentity()
									// * 100.0)
				+ ","
				+ (float) results.getScores().getRmsdCenters()
				+ ","
				+ (float) results.getScores().getRmsd()
				+ ","
				+ (float) results.getScores().getTm()
				+ ","
				+ (float) results.getScores().getMinRmsd()
				+ ","
				+ (float) results.getScores().getMaxRmsd()
				+ ","
				+ (float) results.getScores().getMinTm()
				+ ","
				+ (float) results.getScores().getMaxTm()
				+ ","
				+ (float) results.getScores().getRmsdIntra()
				+ ","
				+ (float) results.getScores().getTmIntra()
				+ ","
				+ (float) results.getScores().getSymDeviation()
				+ ","
				+ results.getSubunitClusters().size()
				+ ",NA"
				+ ","
				+ new QuatSymmetrySubunits(results.getSubunitClusters())
						.getCalphaCount() + "," + time + "," + signature95
				+ "," + stoich95 + "," + signature30 + "," + stoich30 + ","
				+ spaceGroup);
	}
}