- Alignment al;
- if (format.equals("FASTA"))
- {
- alignFile = new FastaFile(inFile, type);
- }
- else if (format.equals("MSF"))
- {
- alignFile = new MSFfile(inFile, type);
- }
- else if (format.equals("PileUp"))
- {
- alignFile = new PileUpfile(inFile, type);
- }
- else if (format.equals("CLUSTAL"))
- {
- alignFile = new ClustalFile(inFile, type);
- }
- else if (format.equals("BLC"))
- {
- alignFile = new BLCFile(inFile, type);
- }
- else if (format.equals("PIR"))
- {
- alignFile = new PIRFile(inFile, type);
- }
- else if (format.equals("PFAM"))
- {
- alignFile = new PfamFile(inFile, type);
- }
- else if (format.equals("JnetFile"))
- {
- alignFile = new JPredFile(inFile, type);
- ((JPredFile) alignFile).removeNonSequences();
- }
- else if (format.equals("PDB"))
- {
- alignFile = new MCview.PDBfile(annotFromStructure,
- localSecondaryStruct, serviceSecondaryStruct, inFile, type);
- // Uncomment to test Jmol data based PDB processing: JAL-1213
- // afile = new jalview.ext.jmol.PDBFileWithJmol(inFile, type);
- }
- else if (format.equals("STH"))
- {
- alignFile = new StockholmFile(inFile, type);
- }
- else if (format.equals("SimpleBLAST"))
- {
- alignFile = new SimpleBlastFile(inFile, type);
- }
- else if (format.equals(PhylipFile.FILE_DESC))
- {
- alignFile = new PhylipFile(inFile, type);
- }
- else if (format.equals(JSONFile.FILE_DESC))
- {
- alignFile = new JSONFile(inFile, type);
- al = new Alignment(alignFile.getSeqsAsArray());
- alignFile.addAnnotations(al);
- ((JSONFile) alignFile).setViewport(viewport);
- for (SequenceGroup sg : alignFile.getSeqGroups())
+ if (fileFormat.isStructureFile())
+ {
+ String structureParser = StructureImportSettings
+ .getDefaultPDBFileParser();
+ boolean isParseWithJMOL = structureParser.equalsIgnoreCase(
+ StructureImportSettings.StructureParser.JMOL_PARSER
+ .toString());
+ StructureImportSettings.addSettings(annotFromStructure,
+ localSecondaryStruct, serviceSecondaryStruct);
+ if (isParseWithJMOL)