public abstract class StructureFile extends AlignFile
{
-
private String id;
- public enum StructureFileType
- {
- PDB, MMCIF, MMTF
- };
-
private PDBEntry.Type dbRefType;
/**
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;
* make a friendly ID string.
*
* @param dataName
- * @return truncated dataName to after last '/'
+ * @return truncated dataName to after last '/' and pruned .extension if
+ * present
*/
protected String safeName(String dataName)
{
{
dataName = dataName.substring(p + 1);
}
+ if(dataName.indexOf(".") > -1){
+ dataName = dataName.substring(0, dataName.lastIndexOf("."));
+ }
return dataName;
}
{
this.pdbIdAvailable = pdbIdAvailable;
}
-
- public static boolean isStructureFile(String fileType)
- {
- if (fileType == null)
- {
- return false;
- }
- for (StructureFileType sfType : StructureFileType.values())
- {
- if (sfType.name().equalsIgnoreCase(fileType))
- {
- return true;
- }
- }
- return false;
- }
}