*/
package jalview.renderer;
+import java.awt.Color;
+import java.awt.Graphics;
+
import jalview.api.AlignViewportI;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.Annotation;
import jalview.datamodel.HiddenColumns;
import jalview.renderer.api.AnnotationRowRendererI;
-import java.awt.Color;
-import java.awt.Graphics;
-
/**
* @author jprocter
*
@Override
public void renderRow(Graphics g, int charWidth, int charHeight,
- boolean hasHiddenColumns, AlignViewportI viewport, HiddenColumns hiddenColumns,
- ColumnSelection columnSelection, AlignmentAnnotation _aa,
- Annotation[] aa_annotations, int sRes, int eRes, float min,
- float max, int y)
+ boolean hasHiddenColumns, AlignViewportI viewport,
+ HiddenColumns hiddenColumns, ColumnSelection columnSelection,
+ AlignmentAnnotation _aa, Annotation[] aa_annotations, int sRes,
+ int eRes, float min, float max, int y)
{
if (sRes > aa_annotations.length)
{
*/
package jalview.ws.dbsources;
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import com.stevesoft.pat.Regex;
+
import jalview.api.FeatureSettingsModelI;
-import jalview.bin.Cache;
import jalview.bin.Console;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
-import jalview.datamodel.ContactMatrix;
import jalview.datamodel.ContactMatrixI;
import jalview.datamodel.DBRefEntry;
-import jalview.datamodel.DBRefSource;
import jalview.datamodel.PDBEntry;
-import jalview.datamodel.PDBEntry.Type;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
-import jalview.datamodel.features.SequenceFeaturesI;
import jalview.io.DataSourceType;
import jalview.io.FileFormat;
import jalview.io.FileFormatI;
import jalview.io.FormatAdapter;
import jalview.io.PDBFeatureSettings;
-import jalview.javascript.json.JSON;
-import jalview.structure.StructureImportSettings;
-import jalview.util.HttpUtils;
import jalview.util.MessageManager;
import jalview.util.Platform;
import jalview.ws.datamodel.alphafold.PAEContactMatrix;
-import jalview.ws.ebi.EBIFetchClient;
import jalview.ws.utils.UrlDownloadClient;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.jmol.adapter.readers.simple.JSONReader;
-
-import com.stevesoft.pat.Regex;
-
/**
* @author JimP
*
try
{
File tmpFile = File.createTempFile(id, ".cif");
- Console.debug("Retrieving structure file for "+id+" from "+alphaFoldCif);
+ Console.debug("Retrieving structure file for " + id + " from "
+ + alphaFoldCif);
UrlDownloadClient.download(alphaFoldCif, tmpFile);
// may not need this check ?
if (retrievalUrl != null)
{
// manufacture the PAE url from a url like ...-model-vN.cif
- paeURL = retrievalUrl.replace("model","predicted_aligned_error").replace(".cif",".json");
+ paeURL = retrievalUrl.replace("model", "predicted_aligned_error")
+ .replace(".cif", ".json");
}
- Console.debug("Downloading pae from " + paeURL
- + " to " + pae.toString() + "");
+ Console.debug("Downloading pae from " + paeURL + " to "
+ + pae.toString() + "");
- try {
- UrlDownloadClient.download(paeURL, pae);
- if (!importPaeJSONAsContactMatrix(pdbAlignment, pae))
+ try
{
- Console.warn("Couln't import contact matrix from " + paeURL
- + " (stored in " + pae.toString() + ")");
- }
- } catch (Exception pae_ex) {
- Console.debug("Couldn't download PAE",pae_ex);
+ UrlDownloadClient.download(paeURL, pae);
+ if (!importPaeJSONAsContactMatrix(pdbAlignment, pae))
+ {
+ Console.warn("Couln't import contact matrix from " + paeURL
+ + " (stored in " + pae.toString() + ")");
+ }
+ } catch (Exception pae_ex)
+ {
+ Console.debug("Couldn't download PAE", pae_ex);
}
} catch (Exception ex) // Problem parsing PDB file
{
FileInputStream pae_input = new FileInputStream(pae);
- List<Object> pae_obj = (List<Object>) Platform
- .parseJSON(pae_input);
+ List<Object> pae_obj = (List<Object>) Platform.parseJSON(pae_input);
if (pae_obj == null)
{
return false;
}
ContactMatrixI matrix = new PAEContactMatrix(
- pdbAlignment.getSequenceAt(0), (Map<String, Object>)pae_obj.get(0));
+ pdbAlignment.getSequenceAt(0),
+ (Map<String, Object>) pae_obj.get(0));
- pdbAlignment.getSequenceAt(0).addAlignmentAnnotation(pdbAlignment.addContactList(matrix));
+ pdbAlignment.getSequenceAt(0)
+ .addAlignmentAnnotation(pdbAlignment.addContactList(matrix));
return true;
}
import static org.testng.AssertJUnit.assertSame;
import static org.testng.AssertJUnit.assertTrue;
-import jalview.analysis.AlignmentGenerator;
-import jalview.datamodel.AlignedCodonFrame.SequenceToSequenceMapping;
-import jalview.gui.JvOptionPane;
-import jalview.io.DataSourceType;
-import jalview.io.FileFormat;
-import jalview.io.FileFormatI;
-import jalview.io.FormatAdapter;
-import jalview.util.Comparison;
-import jalview.util.MapList;
-
import java.io.IOException;
import java.util.Arrays;
import java.util.Iterator;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
+import jalview.analysis.AlignmentGenerator;
+import jalview.datamodel.AlignedCodonFrame.SequenceToSequenceMapping;
+import jalview.gui.JvOptionPane;
+import jalview.io.DataSourceType;
+import jalview.io.FileFormat;
+import jalview.io.FileFormatI;
+import jalview.io.FormatAdapter;
+import jalview.util.Comparison;
+import jalview.util.MapList;
+
/**
* Unit tests for Alignment datamodel.
*