Skip to content

Commit

Permalink
Merge pull request #2267 from intermine/dev
Browse files Browse the repository at this point in the history
Release 4.2.0
  • Loading branch information
Daniela Butano committed Jun 11, 2020
2 parents aeec0ab + 3a93544 commit d2707ea
Show file tree
Hide file tree
Showing 81 changed files with 7,723 additions and 435 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ InterMine

Master: [![Build Status: master][travis-badge-master]][ci]
Dev: [![Build Status: dev][travis-badge-dev]][ci]
[![Version](http://img.shields.io/badge/version-4.1.3-blue.svg?style=flat)](https://github.com/intermine/intermine/releases)
[![Version](http://img.shields.io/badge/version-4.2.0-blue.svg?style=flat)](https://github.com/intermine/intermine/releases)
[![License](http://img.shields.io/badge/license-LGPL_2.1-blue.svg?style=flat)](https://github.com/intermine/intermine/blob/master/LICENSE)
[![Research software impact](http://depsy.org/api/package/pypi/intermine/badge.svg)](http://depsy.org/package/python/intermine)
[![Conda](https://anaconda.org/anaconda/conda-build/badges/installer/conda.svg)](https://anaconda.org/bioconda/intermine)
Expand Down Expand Up @@ -63,6 +63,11 @@ See [LICENSE](LICENSE) file for licensing information.
This product includes software developed by the
[Apache Software Foundation][apache]

InterMine Development Roadmap
-----------------------------

For more information about the upcoming releases, please visit the [InterMine Development Roadmap](https://intermine.readthedocs.io/en/latest/intermine/roadmap/#intermine-development-roadmap). For the roadmap, please see [here](https://github.com/intermine/intermine/projects/7).

Please cite
------------------------

Expand Down
26 changes: 26 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,32 @@
* information or http://www.gnu.org/copyleft/lesser.html.
*
*/
InterMine 4.2.0 (June 2020)

#1650 - Need way to upgrade anonymous sessions via web service
#1969 - FAIR: add profile Gene and Protein markup to the report page
#2099 - Need webservice endpoint that identifies if superuser
#2142 - Create a new logout service
#2144 - Update the /user endpoint to allow to change password
#2148 - Add PUT method to the /lists webservice to update the description
#2149 - Update the /users endpoint to attach to the user just created the lists created anonymously
#2155 - FAIR: adopt DataRecord type in the report page
#2199 - Invalid JSON response to POST /user/queries
#2205 - Update change password webservice to require current password
#2207 - Add clearLocation() to removeFeature() (thanks @sammyjava)
#2215 - Fix organism short name formation (thanks @ahmedihafez)
#2236 - Remove BioEntity.ontologyAnnotations because redundant (thanks @sammyjava)
#2237 - Editing a Date filter on the results table shows Service failed message
#2239 - BAR ThaleMine - 6: Fixed a minor bug in reports page long fields (thanks @asherpasha)
#2240 - BAR ThaleMine - 7: go-annotation loader (thanks @asherpasha)
#2242 - /service/templates is missing optional constraint if format=json
#2246 - Issues related to fields with type Date
#2252 - Added a new bio source to load ISA files in json format
#2253 - src.data.dir.includes and src.data.dir in project.xml not always work as expected
#2255 - Added BioChemEntity (via configuration) markup
#2259 - UniProtFastaLoader doesn't extract the organism name composed by more than 2 words
#2264 - Add licence to the OboConverter

InterMine 4.1.3 (March 2020)

#2208 Delete a template -> it's still displayed on the Templates tab
Expand Down
8 changes: 4 additions & 4 deletions bio/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {

subprojects {
group = 'org.intermine'
version = '4.1.3'
version = '4.2.0'

apply plugin: "java"
apply plugin: "maven"
Expand Down Expand Up @@ -127,9 +127,9 @@ subprojects {
vcsUrl = 'https://github.com/intermine/intermine.git'
publicDownloadNumbers = true
version {
name = '4.1.3'
desc = 'InterMine 4.1.3'
vcsTag = 'intermine-4.1.3'
name = '4.2.0'
desc = 'InterMine 4.2.0'
vcsTag = 'intermine-4.2.0'
}
}
configurations = ['archives']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,16 @@ protected Item getFeature() {
}

/**
* Remove the feature item that was set with setFeature() and associated synonyms
* Remove the feature item that was set with setFeature() and associated synonyms,
* as well as the associated Location.
*/
protected void removeFeature() {
items.remove("_feature");
for (Item synonym : synonyms) {
items.remove(synonym.getIdentifier());
}
synonyms.clear();
clearLocation();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Arrays;

import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
Expand Down Expand Up @@ -199,10 +200,11 @@ private void storeDataset(Item ontology) throws ObjectStoreException {
Item datasetItem = createItem("DataSet");
datasetItem.setAttribute("name", dataset);
if (licence != null) {
datasetItem.setAttribute("licence", licence);
datasetItem.setAttributeIfNotNull("licence", licence);
}
datasetItem.setReference("dataSource", datasourceItem);
store(datasetItem);
ontology.setCollection("dataSets", Arrays.asList(datasetItem.getIdentifier()));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,14 @@ public void setTermClass(String termClass) {
this.termClass = termClass;
}


/**
* Set the licence retrieved from the {bio-source}.properties file
*
* @param licence the licence
*/
public void setLicence(String licence) {
this.licence = licence;
}

/**
* Run the task
Expand Down Expand Up @@ -106,6 +113,9 @@ public void execute() {
OboConverter converter;
if (file.endsWith(".obo")) {
converter = new OboConverter(writer, model, file, ontologyName, url, termClass);
if (licence != null) {
converter.setLicence(licence);
}
} else {
throw new IllegalArgumentException("Don't know how to deal with file " + file);
}
Expand Down
1 change: 1 addition & 0 deletions bio/core/src/test/resources/OboConverterTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<item id="0_1" class="Ontology">
<attribute name="name" value="SO"/>
<attribute name="url" value="http://www.flymine.org"/>
<collection name="dataSets"><reference ref_id="2_1"/></collection>
</item>
<item id="5_2" class="OntologyRelation">
<attribute name="direct" value="false"/>
Expand Down
4 changes: 2 additions & 2 deletions bio/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
systemProp.imVersion=4.1.+
systemProp.bioVersion=4.1.+
systemProp.imVersion=4.2.+
systemProp.bioVersion=4.2.+

# some unit tests need additional classes that aren't in the core model.
# we use flymine's model. don't touch!
Expand Down
1 change: 0 additions & 1 deletion bio/model/core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
<reference name="organism" referenced-type="Organism"/>
<collection name="locatedFeatures" referenced-type="Location" reverse-reference="locatedOn"/>
<collection name="locations" referenced-type="Location" reverse-reference="feature" />
<collection name="ontologyAnnotations" referenced-type="OntologyAnnotation" reverse-reference="subject"/>
<collection name="synonyms" referenced-type="Synonym" reverse-reference="subject"/>
<collection name="dataSets" referenced-type="DataSet" reverse-reference="bioEntities"/>
<collection name="crossReferences" referenced-type="CrossReference" reverse-reference="subject"/>
Expand Down
2 changes: 1 addition & 1 deletion bio/postprocess-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ext {

subprojects {
group = 'org.intermine'
version = '4.1.3'
version = '4.2.0'

apply plugin: 'java'
apply plugin: 'maven'
Expand Down
4 changes: 2 additions & 2 deletions bio/postprocess-test/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
systemProp.imVersion=4.1.+
systemProp.bioVersion=4.1.+
systemProp.imVersion=4.2.+
systemProp.bioVersion=4.2.+

systemProp.flymineVersion=4.0.+

Expand Down
8 changes: 4 additions & 4 deletions bio/postprocess/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ext {

subprojects {
group = 'org.intermine'
version = '4.1.3'
version = '4.2.0'

apply plugin: 'java'
apply plugin: 'maven'
Expand Down Expand Up @@ -171,9 +171,9 @@ subprojects {
vcsUrl = 'https://github.com/intermine/intermine.git'
publicDownloadNumbers = true
version {
name = '4.1.3'
desc = 'InterMine 4.1.3'
vcsTag = 'intermine-4.1.3'
name = '4.2.0'
desc = 'InterMine 4.2.0'
vcsTag = 'intermine-4.2.0'
}
}
configurations = ['archives']
Expand Down
4 changes: 2 additions & 2 deletions bio/postprocess/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
systemProp.imVersion=4.1.+
systemProp.bioVersion=4.1.+
systemProp.imVersion=4.2.+
systemProp.bioVersion=4.2.+

systemProp.javax.xml.stream.XMLOutputFactory = com.sun.xml.internal.stream.XMLOutputFactoryImpl
14 changes: 10 additions & 4 deletions bio/sources/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ext {

subprojects {
group = 'org.intermine'
version = '4.1.3'
version = '4.2.0'

apply plugin: 'java'
apply plugin: 'maven'
Expand Down Expand Up @@ -59,6 +59,12 @@ subprojects {
testCompile group: "org.intermine", name: "intermine-integrate", version: System.getProperty("imVersion"), classifier: "testClasses"
testCompile group: 'xmlunit', name: 'xmlunit', version: '1.0'
mergeModel group : "org.intermine", name: "intermine-objectstore", version: System.getProperty("imVersion")

// JAX-B dependencies for JDK 9+
implementation "jakarta.xml.bind:jakarta.xml.bind-api:2.3.2"
implementation "org.glassfish.jaxb:jaxb-runtime:2.3.2"
implementation "javax.annotation:javax.annotation-api:1.3.2"

}

dbModelConfig {
Expand Down Expand Up @@ -194,9 +200,9 @@ subprojects {
vcsUrl = 'https://github.com/intermine/intermine.git'
publicDownloadNumbers = true
version {
name = '4.1.3'
desc = 'InterMine 4.1.3'
vcsTag = 'intermine-4.1.3'
name = '4.2.0'
desc = 'InterMine 4.2.0'
vcsTag = 'intermine-4.2.0'
}
}
configurations = ['archives']
Expand Down
1 change: 1 addition & 0 deletions bio/sources/do/do.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ obo.ontology.url = http://www.disease-ontology.org
# this class in a do_additions.xml file for this source
obo.term.class = DOTerm

obo.ontology.licence = https://creativecommons.org/publicdomain/zero/1.0/
1 change: 1 addition & 0 deletions bio/sources/eco/eco.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ obo.ontology.url = http://www.evidenceontology.org/
# this class in a eco_additions.xml file for this source
obo.term.class = ECOTerm

obo.ontology.licence = https://creativecommons.org/publicdomain/zero/1.0/
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,14 @@ public void endElement(String uri, String localName, String qName) {
text.substring(0, spaceIndex));
organism.setAttribute("species",
text.substring(spaceIndex + 1));
organism.setAttribute("shortName", text.charAt(0)
+ ". " + text.substring(spaceIndex + 1));
// Organism name could have [] in it , as a result the shortname
// will start with [. toFix : check if it does not start with [
String shortName = text.charAt(0)
+ ". " + text.substring(spaceIndex + 1);
if (text.startsWith("[") ) {
shortName = text.charAt(1) + ". " + text.substring(spaceIndex + 1);
}
organism.setAttribute("shortName", shortName);
}
}
} else if ("CommonName".equals(name)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.biojava.nbio.core.sequence.ProteinSequence;
import org.intermine.model.bio.Organism;
import org.intermine.objectstore.ObjectStoreException;
import org.apache.commons.lang.StringUtils;

/**
* Code for loading fasta for uniprot proteins.
Expand All @@ -31,11 +32,12 @@ public class UniProtFastaLoaderTask extends FastaLoaderTask
@Override
protected Organism getOrganism(ProteinSequence bioJavaSequence) throws ObjectStoreException {
String header = bioJavaSequence.getOriginalHeader();
final String regexp = "OS\\=\\w+\\s\\w+";
final String regexp = "OS\\=(\\w+(\\s)*)*";
Pattern p = Pattern.compile(regexp);
Matcher m = p.matcher(header);
if (m.find()) {
header = m.group();
header = cleanHeader(header);
String[] bits = header.split("=");
if (bits.length != 2) {
return null;
Expand All @@ -55,4 +57,21 @@ protected Organism getOrganism(ProteinSequence bioJavaSequence) throws ObjectSto
}
return null;
}

/**
* the header might end with OX, GN, PE or SV (due to the new regular expression)
* Example: OS=Severe acute respiratory syndrome coronavirus 2 OX
*
* @param header a partial header
* @return the header without suffix
*/
private String cleanHeader(String header) {
String[] suffixes = {" OX", " GN", " PE", " SV"};
for (String suffix : suffixes) {
if (StringUtils.endsWith(header, suffix)) {
return StringUtils.removeEnd(header, suffix);
}
}
return header;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#10090.typeAnnotated=gene

# Arabidopsis
3702.identifier=symbol
3702.readColumn=symbol
3702.identifier=secondaryIdentifier
3702.readColumn=identifier
3702.typeAnnotated=gene

226900.typeAnnotated=protein
Expand Down
2 changes: 2 additions & 0 deletions bio/sources/go/go.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ have.file.obo = true
obo.ontology.name=GO
obo.ontology.url=http://www.geneontology.org
obo.term.class=GOTerm

obo.ontology.licence = https://creativecommons.org/licenses/by/4.0/
4 changes: 2 additions & 2 deletions bio/sources/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
systemProp.imVersion=4.1.+
systemProp.bioVersion=4.1.+
systemProp.imVersion=4.2.+
systemProp.bioVersion=4.2.+
# some unit tests need additional classes that aren't in the core model.
# we use flymine's model. don't touch!

Expand Down
32 changes: 32 additions & 0 deletions bio/sources/isa/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
sourceSets {
main {
java {
srcDirs = ['src/main/java', 'build/gen']
}
resources {
srcDirs = ['src/main/resources']
}
}
test {
java {
srcDirs = ['src/test/java']
}
resources {
srcDirs = ['src/test/resources']
}
}
}

dependencies {
compile group: 'org.intermine', name: 'bio-model', version: bioVersion, transitive: false
compile group: 'org.intermine', name: 'intermine-integrate', version: imVersion
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.8'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.8'
runtime fileTree(dir: 'libs', include: '*.jar') //antlr-2.7.6-caching.jar
bioModel group: 'org.intermine', name: 'bio-model', version: bioVersion, transitive: false
}

processResources {
from('.') { include ("*.properties")}
}
8 changes: 8 additions & 0 deletions bio/sources/isa/isa.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
compile.dependencies = intermine/objectstore/main, \
bio/core/main, \
intermine/integrate/main, \
bio/sources/isa/main

have.file.custom.tgt = true
converter.class = org.intermine.bio.dataconversion.IsaConverter

Binary file added bio/sources/isa/libs/antlr-2.7.6-caching.jar
Binary file not shown.

0 comments on commit d2707ea

Please sign in to comment.