Skip to content

Commit

Permalink
Merge branch '5.9.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
hplahar committed Feb 2, 2021
2 parents b372cd9 + 85bb44c commit c1b870e
Show file tree
Hide file tree
Showing 23 changed files with 283 additions and 281 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ static FeaturedDNASequence sequenceToDNASequence(Sequence sequence, List<Sequenc
}

dnaFeature.setId(sequenceFeature.getId());
dnaFeature.setType(sequenceFeature.getGenbankType());
String type = sequenceFeature.getFeature() != null && !StringUtils.isEmpty(sequenceFeature.getFeature().getGenbankType()) ? sequenceFeature.getFeature().getGenbankType() : sequenceFeature.getGenbankType();
dnaFeature.setType(type);
String name = sequenceFeature.getFeature() != null ? sequenceFeature.getFeature().getName() : sequenceFeature.getName();
dnaFeature.setName(name);
dnaFeature.setStrand(sequenceFeature.getStrand());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public void format(Sequence sequence, OutputStream outputStream) throws IOExcept
Set<SequenceFeature> featureSet = sequence.getSequenceFeatures();
if (featureSet != null) {
for (SequenceFeature sequenceFeature : featureSet) {
String featureLine = sequenceFeature.getName() + " ICE " + sequenceFeature.getGenbankType();
String featureType = sequenceFeature.getFeature() != null && !StringUtils.isEmpty(sequenceFeature.getFeature().getGenbankType()) ? sequenceFeature.getFeature().getGenbankType() : sequenceFeature.getGenbankType();
String featureLine = sequenceFeature.getName() + " ICE " + featureType;

// location
for (AnnotationLocation location : sequenceFeature.getAnnotationLocations()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.jbei.ice.lib.entry.sequence.composers.formatters;

import org.apache.commons.lang3.StringUtils;
import org.biojava.bio.seq.DNATools;
import org.biojava.bio.seq.Feature;
import org.biojava.bio.symbol.Location;
Expand Down Expand Up @@ -229,15 +230,13 @@ protected RichAnnotation getAnnotations(SequenceFeature sequenceFeature) {
* @return Genbank Feature type.
*/
protected String getFeatureType(SequenceFeature sequenceFeature) {
String featureType;
String featureType = sequenceFeature.getFeature() != null && !StringUtils.isEmpty(sequenceFeature.getFeature().getGenbankType()) ? sequenceFeature.getFeature().getGenbankType() : sequenceFeature.getGenbankType();

if (sequenceFeature.getGenbankType() == null || sequenceFeature.getGenbankType().isEmpty()) {
if (StringUtils.isEmpty(featureType)) {
Logger.warn("SequenceFeature by id: " + sequenceFeature.getId()
+ " has invalid genbank type.");

featureType = "misc_feature";
} else {
featureType = sequenceFeature.getGenbankType();
}

return featureType;
Expand Down Expand Up @@ -301,4 +300,4 @@ private String normalizeFeatureValue(String value) {

return result;
}
}
}
8 changes: 4 additions & 4 deletions src/main/java/org/jbei/ice/services/rest/PartResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
@Path("/parts")
public class PartResource extends RestResource {

private EntryController controller = new EntryController();
private Attachments attachments = new Attachments();
private SampleService sampleService = new SampleService();
private RemoteEntries remoteEntries = new RemoteEntries();
private final EntryController controller = new EntryController();
private final Attachments attachments = new Attachments();
private final SampleService sampleService = new SampleService();
private final RemoteEntries remoteEntries = new RemoteEntries();

/**
* Retrieves a part using any of the unique identifiers. e.g. Part number, synthetic id, or
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta charset="utf-8">
<title>ICE - Inventory of Composable Elements</title>

<link rel="stylesheet" type="text/css" href="scripts/lib/open-vector-editor-10.2.4/main.css">
<link rel="stylesheet" type="text/css" href="scripts/lib/open-vector-editor/main.css">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="scripts/lib/handsontable-7.1.0/pikaday.css">
<link rel="stylesheet" media="screen" href="scripts/lib/handsontable-7.1.0/handsontable.full.min.css">
Expand Down Expand Up @@ -97,7 +97,7 @@
</head>

<body>
<script type="text/javascript" src="scripts/lib/open-vector-editor-10.2.4/open-vector-editor.min.js"></script>
<script type="text/javascript" src="scripts/lib/open-vector-editor/open-vector-editor.min.js"></script>

<div id="container">
<div id="body" ui-view></div>
Expand Down
24 changes: 0 additions & 24 deletions src/main/webapp/scripts/lib/open-vector-editor-10.2.4/main.css

This file was deleted.

This file was deleted.

18 changes: 18 additions & 0 deletions src/main/webapp/scripts/lib/open-vector-editor/main.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit c1b870e

Please sign in to comment.