private enum ResidueDetailType
{
- NAME_SEC_STRUCTURE("nameSecondaryStructure"), CODE_SEC_STRUCTURE(
- "codeSecondaryStructure"), ANNOTATION("Annotation");
+ NAME_SEC_STRUCTURE("nameSecondaryStructure"),
+ CODE_SEC_STRUCTURE("codeSecondaryStructure"), ANNOTATION("Annotation");
private String code;
private ResidueDetailType(String code)
try
{
attr = Files.readAttributes(filePath, BasicFileAttributes.class);
- diffInDays = (int) ((new Date().getTime() - attr.lastModifiedTime()
- .toMillis()) / (1000 * 60 * 60 * 24));
+ diffInDays = (int) ((new Date().getTime()
+ - attr.lastModifiedTime().toMillis())
+ / (1000 * 60 * 60 * 24));
// System.out.println("Diff in days : " + diffInDays);
} catch (IOException e)
{
* @throws SiftsException
* @throws IOException
*/
- public static File downloadSiftsFile(String pdbId) throws SiftsException,
- IOException
+ public static File downloadSiftsFile(String pdbId)
+ throws SiftsException, IOException
{
if (pdbId.contains(".cif"))
{
}
outputStream.close();
inputStream.close();
-// System.out.println(">>> File downloaded : " + downloadedSiftsFile
-// + " took " + (System.currentTimeMillis() - now) + "ms");
+ // System.out.println(">>> File downloaded : " + downloadedSiftsFile
+ // + " took " + (System.currentTimeMillis() - now) + "ms");
return new File(downloadedSiftsFile);
}
{
continue;
}
- String canonicalSource = DBRefUtils.getCanonicalName(dbRef
- .getSource());
+ String canonicalSource = DBRefUtils
+ .getCanonicalName(dbRef.getSource());
if (isValidDBRefEntry(dbRef)
- && (canonicalSource.equalsIgnoreCase(DBRefSource.UNIPROT) || canonicalSource
- .equalsIgnoreCase(DBRefSource.PDB)))
+ && (canonicalSource.equalsIgnoreCase(DBRefSource.UNIPROT)
+ || canonicalSource.equalsIgnoreCase(DBRefSource.PDB)))
{
return dbRef;
}
int orignalSeqStart = seq.getStart();
if (orignalSeqStart >= 1)
{
- int subSeqStart = (seqStart >= orignalSeqStart) ? seqStart
- - orignalSeqStart : 0;
+ int subSeqStart = (seqStart >= orignalSeqStart)
+ ? seqStart - orignalSeqStart
+ : 0;
int subSeqEnd = seqEnd - (orignalSeqStart - 1);
subSeqEnd = originalSeq.length() < subSeqEnd ? originalSeq.length()
: subSeqEnd;
{
pdbRefDb = cRefDb;
}
- if (cRefDb.getDbCoordSys()
- .equalsIgnoreCase(seqCoordSys.getName())
+ if (cRefDb.getDbCoordSys().equalsIgnoreCase(seqCoordSys.getName())
&& isAccessionMatched(cRefDb.getDbAccessionId()))
{
- currSeqIndex = getLeadingIntegerValue(
- cRefDb.getDbResNum(), UNASSIGNED);
+ currSeqIndex = getLeadingIntegerValue(cRefDb.getDbResNum(),
+ UNASSIGNED);
if (pdbRefDb != null)
{
break;// exit loop if pdb and uniprot are already found
if (currSeqIndex >= seq.getStart() && currSeqIndex <= seq.getEnd())
{
- int resNum = (pdbRefDb == null) ? getLeadingIntegerValue(
- residue.getDbResNum(), UNASSIGNED)
+ int resNum = (pdbRefDb == null)
+ ? getLeadingIntegerValue(residue.getDbResNum(),
+ UNASSIGNED)
: getLeadingIntegerValue(pdbRefDb.getDbResNum(),
UNASSIGNED);
omitNonObserved.add(currSeqIndex);
++nonObservedShiftIndex;
}
- mapping.put(currSeqIndex - nonObservedShiftIndex, new int[] {
- Integer.valueOf(resNum), UNASSIGNED });
+ mapping.put(currSeqIndex - nonObservedShiftIndex,
+ new int[]
+ { Integer.valueOf(resNum), UNASSIGNED });
}
}
}
return failValue;
}
-
/**
*
* @param chainId
*/
public Entity getEntityByMostOptimalMatchedId(String chainId)
{
- // System.out.println("---> advanced greedy entityId matching block entered..");
+ // System.out.println("---> advanced greedy entityId matching block
+ // entered..");
List<Entity> entities = siftsEntry.getEntity();
SiftsEntitySortPojo[] sPojo = new SiftsEntitySortPojo[entities.size()];
int count = 0;
return null;
}
- private class SiftsEntitySortPojo implements
- Comparable<SiftsEntitySortPojo>
+ private class SiftsEntitySortPojo
+ implements Comparable<SiftsEntitySortPojo>
{
public String entityId;
private int nonObservedShiftIndex;
- public SegmentHelperPojo(SequenceI seq,
- HashMap<Integer, int[]> mapping,
+ public SegmentHelperPojo(SequenceI seq, HashMap<Integer, int[]> mapping,
TreeMap<Integer, String> resNumMap,
List<Integer> omitNonObserved, int nonObservedShiftIndex)
{
// output mappings
StringBuilder output = new StringBuilder(512);
output.append(NEWLINE);
- output.append("Sequence \u27f7 Structure mapping details").append(
- NEWLINE);
+ output.append("Sequence \u27f7 Structure mapping details")
+ .append(NEWLINE);
output.append("Method: SIFTS");
output.append(NEWLINE).append(NEWLINE);
for (int j = 0; j < nochunks; j++)
{
// Print the first aligned sequence
- output.append(new Format("%" + (maxid) + "s").form(seqName)).append(
- " ");
+ output.append(new Format("%" + (maxid) + "s").form(seqName))
+ .append(" ");
for (int i = 0; i < len; i++)
{
{
throw new SiftsException(">>> Low PID detected for SIFTs mapping...");
}
- output.append("Length of alignment = " + seqRes.length()).append(
- NEWLINE);
+ output.append("Length of alignment = " + seqRes.length())
+ .append(NEWLINE);
output.append(new Format("Percentage ID = %2.2f").form(pid));
return output;
}