import java.util.List;
import java.util.Vector;
-import MCview.PDBChain;
+import mc_view.PDBChain;
public abstract class StructureFile extends AlignFile
{
private boolean pdbIdAvailable;
- public StructureFile(String inFile, DataSourceType sourceType)
+ public StructureFile(Object inFile, DataSourceType sourceType)
throws IOException
{
super(inFile, sourceType);
}
- public StructureFile(boolean parseImmediately, String dataObject,
+ public StructureFile(boolean parseImmediately, Object dataObject,
DataSourceType sourceType) throws IOException
{
super(parseImmediately, dataObject, sourceType);
pdbSequence.setName(getId() + "|" + pdbSequence.getName());
PDBEntry entry = new PDBEntry();
entry.setId(getId());
+ entry.setFakedPDBId(!isPPDBIdAvailable());
entry.setType(getStructureFileType());
if (chain.id != null)
{
StructureImportSettings.setShowSeqFeatures(true);
}
- public PDBChain findChain(String id) throws Exception
+ /**
+ * Answers the first PDBChain found matching the given id, or null if none is
+ * found
+ *
+ * @param id
+ * @return
+ */
+ public PDBChain findChain(String id)
{
for (PDBChain chain : getChains())
{
return chain;
}
}
- throw new Exception("PDB chain not Found!");
+ return null;
}
public void makeResidueList()
public static boolean isRNA(SequenceI seq)
{
- for (char c : seq.getSequence())
+ int length = seq.getLength();
+ for (int i = 0; i < length; i++)
{
+ char c = seq.getCharAt(i);
if ((c != 'A') && (c != 'C') && (c != 'G') && (c != 'U'))
{
return false;