implements Function
{
10 | @Override
11 | public URI apply(P profile) {
12 | try {
13 | return new URI("genes/" + profile.getId());
14 | } catch (URISyntaxException e) {
15 | throw new RuntimeException(e);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/base/src/main/java/uk/ac/ebi/atlas/model/arraydesign/ArrayDesign.java:
--------------------------------------------------------------------------------
1 | package uk.ac.ebi.atlas.model.arraydesign;
2 |
3 | import com.google.auto.value.AutoValue;
4 |
5 | @AutoValue
6 | public abstract class ArrayDesign {
7 | public abstract String accession();
8 | public abstract String name();
9 |
10 | public static ArrayDesign create(String accession, String name) {
11 | return new AutoValue_ArrayDesign(accession, name);
12 | }
13 |
14 | public static ArrayDesign createForUnknownName(String accession) {
15 | return create(accession, accession);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/base/src/main/java/uk/ac/ebi/atlas/model/resource/ExtraInfoImage.java:
--------------------------------------------------------------------------------
1 | package uk.ac.ebi.atlas.model.resource;
2 |
3 | import java.nio.file.Paths;
4 | import java.text.MessageFormat;
5 |
6 | public class ExtraInfoImage extends ExternalImage {
7 |
8 |
9 | public ExtraInfoImage(String fileSystemTemplate, String externalLinkTemplate, String
10 | experimentAccession) {
11 | super(ResourceType.EXTRA_INFO, Paths.get(MessageFormat.format(fileSystemTemplate, experimentAccession)),
12 | MessageFormat.format(externalLinkTemplate, experimentAccession));
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/base/src/main/java/uk/ac/ebi/atlas/profiles/writer/RnaSeqDifferentialProfilesWriterFactory.java:
--------------------------------------------------------------------------------
1 | package uk.ac.ebi.atlas.profiles.writer;
2 |
3 | import uk.ac.ebi.atlas.experimentpage.context.RnaSeqRequestContext;
4 | import uk.ac.ebi.atlas.model.experiment.differential.DifferentialExpression;
5 | import uk.ac.ebi.atlas.model.experiment.differential.rnaseq.RnaSeqProfile;
6 |
7 | import javax.inject.Named;
8 |
9 | @Named
10 | public class RnaSeqDifferentialProfilesWriterFactory extends
11 | DifferentialProfilesWriterFactory
11 | implements GeneProfilesListBuilder get() {
14 | return new DifferentialProfilesList<>();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/gxa/src/main/webapp/resources/html/release-notes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | extends ArrayList {
10 | private long totalResultCount;
11 |
12 | public GeneProfilesList(Collection collection) {
13 | super(collection);
14 | }
15 |
16 | public GeneProfilesList() {
17 | }
18 |
19 | public void setTotalResultCount(long totalResultCount) {
20 | this.totalResultCount = totalResultCount;
21 | }
22 |
23 | public Map create(final O options) {
17 |
18 | final List
22 | )
23 | }
24 | ```
25 |
--------------------------------------------------------------------------------
/atlas-misc/scripts/db_updates/scxa/20171127-create-experiment-table.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE scxa_experiment CASCADE;
2 |
3 | CREATE TABLE IF NOT EXISTS scxa_experiment
4 | (
5 | accession VARCHAR(255) NOT NULL
6 | CONSTRAINT scxa_experiment_pkey
7 | PRIMARY KEY,
8 | type VARCHAR(50) NOT NULL,
9 | species VARCHAR(255) NOT NULL,
10 | access_key CHAR(36) NOT NULL,
11 | private BOOLEAN DEFAULT TRUE,
12 | last_update DATE DEFAULT ('now' :: TEXT) :: DATE,
13 | pubmed_ids VARCHAR(255),
14 | title VARCHAR(500)
15 | );
16 |
17 | ---
18 |
19 | CREATE VIEW scxa_public_experiment AS
20 | SELECT
21 | scxa_experiment.accession,
22 | scxa_experiment.type,
23 | scxa_experiment.last_update
24 | FROM scxa_experiment
25 | WHERE (scxa_experiment.private IS FALSE);
26 |
--------------------------------------------------------------------------------
/base/src/test/java/uk/ac/ebi/atlas/web/BaselineRequestPreferencesTest.java:
--------------------------------------------------------------------------------
1 | package uk.ac.ebi.atlas.web;
2 |
3 | import uk.ac.ebi.atlas.model.ExpressionUnit;
4 |
5 | public class BaselineRequestPreferencesTest {
6 | protected BaselineRequestPreferencesTest() {
7 | throw new UnsupportedOperationException();
8 | }
9 |
10 | public static BaselineRequestPreferences
8 |
9 |
27 |
28 | AnalysisMethodsTable.propTypes = {
29 | data: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.string)).isRequired
30 | }
31 |
32 | export default AnalysisMethodsTable
33 |
--------------------------------------------------------------------------------
/base/src/test/java/uk/ac/ebi/atlas/solr/bioentities/admin/monitor/BioentityIndexMonitorTest.java:
--------------------------------------------------------------------------------
1 | package uk.ac.ebi.atlas.solr.bioentities.admin.monitor;
2 |
3 | import org.junit.Before;
4 | import org.junit.Test;
5 | import org.junit.runner.RunWith;
6 | import org.mockito.Mock;
7 | import org.mockito.junit.MockitoJUnitRunner;
8 |
9 | import java.nio.file.Paths;
10 |
11 | import static org.mockito.Mockito.verify;
12 |
13 | @RunWith(MockitoJUnitRunner.class)
14 | public class BioentityIndexMonitorTest {
15 |
16 | @Mock
17 | private IndexingProgress indexingProgressMock;
18 |
19 | private BioentityIndexMonitor subject;
20 |
21 | @Before
22 | public void init() {
23 | subject = new BioentityIndexMonitor(Paths.get("foo"), indexingProgressMock);
24 | }
25 |
26 | @Test
27 | public void startShouldResetIndexingProgress() {
28 | subject.start();
29 | verify(indexingProgressMock).reset();
30 | }
31 |
32 |
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/base/src/main/java/uk/ac/ebi/atlas/bioentity/properties/PropertyLink.java:
--------------------------------------------------------------------------------
1 | package uk.ac.ebi.atlas.bioentity.properties;
2 |
3 | import com.google.gson.JsonObject;
4 |
5 | public class PropertyLink {
6 |
7 | private String text;
8 | private String url;
9 | private int relevance;
10 |
11 | PropertyLink(String text, String url, int relevance) {
12 | this.text = text;
13 | this.url = url;
14 | this.relevance = relevance;
15 | }
16 |
17 | public String getText() {
18 | return text;
19 | }
20 |
21 | public String getUrl() {
22 | return url;
23 | }
24 |
25 | public int getRelevance() {
26 | return relevance;
27 | }
28 |
29 | public JsonObject toJson() {
30 | JsonObject result = new JsonObject();
31 | result.addProperty("text", text);
32 | result.addProperty("url", url);
33 | result.addProperty("relevance", relevance);
34 | return result;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/base/src/main/java/uk/ac/ebi/atlas/experimentpage/baseline/genedistribution/HistogramAcrossGenes.java:
--------------------------------------------------------------------------------
1 | package uk.ac.ebi.atlas.experimentpage.baseline.genedistribution;
2 |
3 | import com.google.common.base.Preconditions;
4 | import com.google.gson.JsonObject;
5 |
6 | import static uk.ac.ebi.atlas.utils.GsonProvider.GSON;
7 |
8 | public class HistogramAcrossGenes {
9 | private final int[] histogram;
10 | private final double[] cutoffs;
11 |
12 | public HistogramAcrossGenes(int[] histogram, double[] cutoffs) {
13 | Preconditions.checkArgument(histogram.length == cutoffs.length);
14 |
15 | this.histogram = histogram;
16 | this.cutoffs = cutoffs;
17 | }
18 |
19 | public JsonObject asJson() {
20 | JsonObject result = new JsonObject();
21 |
22 | result.add("bins", GSON.toJsonTree(cutoffs).getAsJsonArray());
23 | result.add("counts", GSON.toJsonTree(histogram).getAsJsonArray());
24 |
25 | return result;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/gxa/src/main/webapp/resources/js/lib/jquery-json-tag-editor/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery-tag-editor",
3 | "description": "A powerful and lightweight tag editor plugin for jQuery.",
4 | "version": "1.0.20",
5 | "dependencies": {
6 | "jquery": ">=1.7",
7 | "caret": null
8 | },
9 | "homepage": "https://github.com/Pixabay/jQuery-tagEditor",
10 | "authors": [{
11 | "name": "Simon Steinberger",
12 | "url": "https://pixabay.com/users/Simon/",
13 | "email": "simon@pixabay.com"
14 | }],
15 | "keywords": [
16 | "tags",
17 | "keywords",
18 | "editor",
19 | "drag and drop",
20 | "editable",
21 | "edit"
22 | ],
23 | "licenses": [{
24 | "type": "MIT",
25 | "url": "http://www.opensource.org/licenses/mit-license.php"
26 | }],
27 | "ignore": [
28 | "bower.json",
29 | "demo.html",
30 | "readme.md",
31 | "tag-editor.jquery.json"
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/base/src/test/java/uk/ac/ebi/atlas/bioentity/properties/PropertyLinkTest.java:
--------------------------------------------------------------------------------
1 | package uk.ac.ebi.atlas.bioentity.properties;
2 |
3 | import com.google.gson.JsonObject;
4 | import org.junit.Test;
5 |
6 | import static org.hamcrest.Matchers.emptyString;
7 | import static org.hamcrest.Matchers.is;
8 | import static org.junit.Assert.assertThat;
9 | import static uk.ac.ebi.atlas.utils.GsonProvider.GSON;
10 |
11 | public class PropertyLinkTest {
12 | @Test
13 | public void constructorWithoutUrl() {
14 | PropertyLink subject = new PropertyLink("foobar", "", 0);
15 | assertThat(subject.getUrl(), is(emptyString()));
16 | }
17 |
18 | @Test
19 | public void toJson() {
20 | assertThat(
21 | new PropertyLink("foobar", "http://foobar.com/foobar", 0).toJson(),
22 | is(GSON.fromJson(
23 | "{\"text\":\"foobar\",\"url\":\"http://foobar.com/foobar\",\"relevance\":0}",
24 | JsonObject.class)));
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/gxa/src/main/java/uk/ac/ebi/atlas/experimentpage/qc/QcReportUtil.java:
--------------------------------------------------------------------------------
1 | package uk.ac.ebi.atlas.experimentpage.qc;
2 |
3 | import org.apache.commons.io.IOUtils;
4 |
5 | import javax.servlet.http.HttpServletRequest;
6 | import java.io.IOException;
7 | import java.io.InputStream;
8 | import java.io.UncheckedIOException;
9 | import java.io.Writer;
10 | import java.nio.charset.Charset;
11 | import java.nio.file.Path;
12 |
13 | import static java.nio.file.Files.newInputStream;
14 |
15 | public class QcReportUtil {
16 | protected QcReportUtil() {
17 | throw new UnsupportedOperationException();
18 | }
19 |
20 | public static void printContent(HttpServletRequest request, Writer out) {
21 | Path filePath = (Path) request.getAttribute("contentPath");
22 | try (InputStream f = newInputStream(filePath)) {
23 | IOUtils.copy(f, out, Charset.defaultCharset());
24 | } catch (IOException e) {
25 | throw new UncheckedIOException(e);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/base/src/main/java/uk/ac/ebi/atlas/search/DatabaseQuery.java:
--------------------------------------------------------------------------------
1 |
2 | package uk.ac.ebi.atlas.search;
3 |
4 | import com.google.common.collect.Lists;
5 |
6 | import java.util.List;
7 |
8 | public class DatabaseQuery
10 | {data[0].map((element, index) =>
12 |
13 |
14 | {
15 | data.slice(1, data.length).map((row, index) =>
16 | {element} )}
11 |
17 | {row.map((element, index) =>
18 |
23 | )
24 | }
25 |
26 |
19 |
21 | )}
22 |
13 | )
14 | }
15 |
16 | const Demo = () => {
17 | const allDisclaimers =
18 | Object.keys(disclaimers)
19 | .map(disclaimerKey => {
20 | const Disclaimer = disclaimers[disclaimerKey]
21 | return
29 |