Commit 0962934a authored by Jasper Koehorst's avatar Jasper Koehorst
Browse files

Merge branch 'master' of git.wur.nl:unlock/fairds

# Conflicts:
#	src/main/java/nl/fairbydesign/backend/ncbi/objects/esample/RUNSET.java
parents 3fbdfe28 3d2e7bc3
......@@ -3,7 +3,8 @@ package nl.fairbydesign.backend.data.objects;
public class DiskUsage {
private String project;
private String investigation;
private long size;
private long tapeSize;
private long diskSize;
public void setProject(String project) {
this.project = project;
......@@ -13,13 +14,6 @@ public class DiskUsage {
return project;
}
public void setSize(long size) {
this.size = size;
}
public long getSize() {
return size;
}
public String getInvestigation() {
return investigation;
......@@ -28,4 +22,20 @@ public class DiskUsage {
public void setInvestigation(String investigation) {
this.investigation = investigation;
}
public void setTapeSize(long tapeSize) {
this.tapeSize = tapeSize;
}
public long getTapeSize() {
return tapeSize;
}
public void setDiskSize(long diskSize) {
this.diskSize = diskSize;
}
public long getDiskSize() {
return diskSize;
}
}
......@@ -195,9 +195,10 @@ public class Data {
// Obtain all disk usage for each project
IRODSGenQueryBuilder queryBuilder = new IRODSGenQueryBuilder(true, null);
queryBuilder.addConditionAsGenQueryField(COL_COLL_NAME, QueryConditionOperators.LIKE, "/" + irodsAccount.getZone() + "/projects/" + process.getProjectIdentifier() + "/" + process.getInvestigationIdentifier() + "%");
queryBuilder.addConditionAsGenQueryField(COL_COLL_NAME, QueryConditionOperators.LIKE, "/" + irodsAccount.getZone() + "%" + process.getProjectIdentifier() + "/" + process.getInvestigationIdentifier() + "%");
// Column name as default does a distinct?
queryBuilder.addSelectAsGenQueryValue(COL_R_RESC_NAME);
queryBuilder.addSelectAsAgregateGenQueryValue(RodsGenQueryEnum.COL_DATA_SIZE, GenQueryField.SelectFieldTypes.SUM);
// Set limit?
......@@ -212,13 +213,15 @@ public class Data {
DiskUsage diskUsage = new DiskUsage();
diskUsage.setProject(process.getProjectIdentifier());
diskUsage.setInvestigation(process.getInvestigationIdentifier());
diskUsage.setTapeSize(0);
diskUsage.setDiskSize(0);
for (IRODSQueryResultRow irodsQueryResultRow : irodsQueryResultSetResults) {
String size = irodsQueryResultRow.getColumn(0).trim().strip();
if (StringUtils.isNumeric(size) && size.length() > 0) {
diskUsage.setSize(Long.parseLong(size) / (1024 * 1024 * 1024));
} else {
diskUsage.setSize(-1);
}
String resource = irodsQueryResultRow.getColumn(0);
String size = irodsQueryResultRow.getColumn(1).trim().strip();
if (resource.contains("archiveResc") && StringUtils.isNumeric(size) && size.length() > 0)
diskUsage.setTapeSize(Long.parseLong(size) / (1024 * 1024 * 1024));
if (resource.contains("dataResc") && StringUtils.isNumeric(size) && size.length() > 0)
diskUsage.setDiskSize(Long.parseLong(size) / (1024 * 1024 * 1024));
}
return diskUsage;
}
......
......@@ -6,8 +6,6 @@ import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import nl.fairbydesign.backend.ncbi.objects.esearch.Root;
import nl.fairbydesign.backend.parsers.ExcelGenerator;
import org.apache.jena.sparql.function.library.print;
import org.apache.poi.ddf.EscherTertiaryOptRecord;
import org.jboss.logging.Logger;
import org.json.JSONObject;
import org.json.XML;
......@@ -26,7 +24,6 @@ import java.util.HashSet;
import java.util.Scanner;
import static nl.fairbydesign.backend.ncbi.XLSX.setup;
import static nl.fairbydesign.backend.ncbi.XLSX.studies;
public class NCBI {
public static final Logger logger = Logger.getLogger(ExcelGenerator.class);
......
package nl.fairbydesign.backend.ncbi.objects.esample;
import com.fasterxml.jackson.annotation.JsonProperty;
public class BASECALL {
@JsonProperty("match_edge")
public String getMatch_edge() {
return this.match_edge; }
public void setMatch_edge(String match_edge) {
this.match_edge = match_edge; }
String match_edge;
@JsonProperty("content")
public String getContent() {
return this.content; }
public void setContent(String content) {
this.content = content; }
String content;
}
package nl.fairbydesign.backend.ncbi.objects.esample;
import com.fasterxml.jackson.annotation.JsonProperty;
public class EXPECTEDBASECALLTABLE {
@JsonProperty("BASECALL")
public BASECALL getBASECALL() {
return this.bASECALL; }
public void setBASECALL(BASECALL bASECALL) {
this.bASECALL = bASECALL; }
BASECALL bASECALL;
}
......@@ -21,15 +21,12 @@ public class EXPERIMENT{
public void setCenter_name(String center_name) {
this.center_name = center_name; }
String center_name;
//String or Object needed
@JsonProperty("PROCESSING")
public Object getPROCESSING() {
return this.pROCESSING; }
public void setPROCESSING(Object pROCESSING) {
this.pROCESSING = pROCESSING; }
Object pROCESSING;
@JsonProperty("PROCESSING")
public String getPROCESSING() {
return this.pROCESSING; }
public void setPROCESSING(String pROCESSING) {
this.pROCESSING = pROCESSING; }
String pROCESSING;
@JsonProperty("alias")
public String getAlias() {
return this.alias; }
......@@ -60,10 +57,4 @@ public class EXPERIMENT{
public void setSTUDY_REF(STUDYREF sTUDY_REF) {
this.sTUDY_REF = sTUDY_REF; }
STUDYREF sTUDY_REF;
@JsonProperty("EXPERIMENT_LINKS")
public EXPERIMENTLINKS getEXPERIMENT_LINKS() {
return this.eXPERIMENT_LINKS; }
public void setEXPERIMENT_LINKS(EXPERIMENTLINKS eXPERIMENT_LINKS) {
this.eXPERIMENT_LINKS = eXPERIMENT_LINKS; }
EXPERIMENTLINKS eXPERIMENT_LINKS;
}
package nl.fairbydesign.backend.ncbi.objects.esample;
import com.fasterxml.jackson.annotation.JsonProperty;
public class EXPERIMENTLINK {
@JsonProperty("URL_LINK")
public URLLINK getURL_LINK() {
return this.uRL_LINK; }
public void setURL_LINK(URLLINK uRL_LINK) {
this.uRL_LINK = uRL_LINK; }
URLLINK uRL_LINK;
}
package nl.fairbydesign.backend.ncbi.objects.esample;
import com.fasterxml.jackson.annotation.JsonProperty;
public class EXPERIMENTLINKS {
@JsonProperty("EXPERIMENT_LINK")
public EXPERIMENTLINK getEXPERIMENT_LINK() {
return this.eXPERIMENT_LINK; }
public void setEXPERIMENT_LINK(EXPERIMENTLINK eXPERIMENT_LINK) {
this.eXPERIMENT_LINK = eXPERIMENT_LINK; }
EXPERIMENTLINK eXPERIMENT_LINK;
}
package nl.fairbydesign.backend.ncbi.objects.esample;
import com.fasterxml.jackson.annotation.JsonProperty;
public class PIPELINE {
@JsonProperty("PIPE_SECTION")
public PIPESECTION getPIPE_SECTION() {
return this.pIPE_SECTION; }
public void setPIPE_SECTION(PIPESECTION pIPE_SECTION) {
this.pIPE_SECTION = pIPE_SECTION; }
PIPESECTION pIPE_SECTION;
}
package nl.fairbydesign.backend.ncbi.objects.esample;
import com.fasterxml.jackson.annotation.JsonProperty;
public class PIPESECTION {
@JsonProperty("STEP_INDEX")
public int getSTEP_INDEX() {
return this.sTEP_INDEX; }
public void setSTEP_INDEX(int sTEP_INDEX) {
this.sTEP_INDEX = sTEP_INDEX; }
int sTEP_INDEX;
@JsonProperty("VERSION")
public String getVERSION() {
return this.vERSION; }
public void setVERSION(String vERSION) {
this.vERSION = vERSION; }
String vERSION;
@JsonProperty("PREV_STEP_INDEX")
public String getPREV_STEP_INDEX() {
return this.pREV_STEP_INDEX; }
public void setPREV_STEP_INDEX(String pREV_STEP_INDEX) {
this.pREV_STEP_INDEX = pREV_STEP_INDEX; }
String pREV_STEP_INDEX;
@JsonProperty("PROGRAM")
public String getPROGRAM() {
return this.pROGRAM; }
public void setPROGRAM(String pROGRAM) {
this.pROGRAM = pROGRAM; }
String pROGRAM;
}
package nl.fairbydesign.backend.ncbi.objects.esample;
import com.fasterxml.jackson.annotation.JsonProperty;
public class PROCESSING {
@JsonProperty("PIPELINE")
public PIPELINE getPIPELINE() {
return this.pIPELINE; }
public void setPIPELINE(PIPELINE pIPELINE) {
this.pIPELINE = pIPELINE; }
PIPELINE pIPELINE;
}
......@@ -27,16 +27,4 @@ public class READSPEC{
public void setREAD_TYPE(String rEAD_TYPE) {
this.rEAD_TYPE = rEAD_TYPE; }
String rEAD_TYPE;
@JsonProperty("EXPECTED_BASECALL_TABLE")
public EXPECTEDBASECALLTABLE getEXPECTED_BASECALL_TABLE() {
return this.eXPECTED_BASECALL_TABLE; }
public void setEXPECTED_BASECALL_TABLE(EXPECTEDBASECALLTABLE eXPECTED_BASECALL_TABLE) {
this.eXPECTED_BASECALL_TABLE = eXPECTED_BASECALL_TABLE; }
EXPECTEDBASECALLTABLE eXPECTED_BASECALL_TABLE;
@JsonProperty("RELATIVE_ORDER")
public RELATIVEORDER getRELATIVE_ORDER() {
return this.rELATIVE_ORDER; }
public void setRELATIVE_ORDER(RELATIVEORDER rELATIVE_ORDER) {
this.rELATIVE_ORDER = rELATIVE_ORDER; }
RELATIVEORDER rELATIVE_ORDER;
}
package nl.fairbydesign.backend.ncbi.objects.esample;
import com.fasterxml.jackson.annotation.JsonProperty;
public class RELATIVEORDER {
@JsonProperty("follows_read_index")
public int getFollows_read_index() {
return this.follows_read_index; }
public void setFollows_read_index(int follows_read_index) {
this.follows_read_index = follows_read_index; }
int follows_read_index;
}
......@@ -137,13 +137,6 @@ public class RUN {
Bases bases;
@JsonProperty("xmlns")
public String getXmlns() {
return this.xmlns; }
public void setXmlns(String xmlns) {
this.xmlns = xmlns; }
String xmlns;
@JsonProperty("center_name")
public String getCenter_name() {
return this.center_name;
......
......@@ -15,10 +15,4 @@ public class RUNATTRIBUTE{
public void setVALUE(String vALUE) {
this.vALUE = vALUE; }
String vALUE;
@JsonProperty("UNITS")
public String getUNITS() {
return this.uNITS; }
public void setUNITS(String uNITS) {
this.uNITS = uNITS; }
String uNITS;
}
......@@ -12,4 +12,14 @@ public class RUNSET{
public void setRUN(ArrayList<RUN> rUN) {
this.rUN = rUN; }
ArrayList<RUN> rUN = new ArrayList<>();
}
\ No newline at end of file
}
=======
public class RUNSET{
@JsonProperty("RUN")
public RUN getRUN() {
return this.rUN; }
public void setRUN(RUN rUN) {
this.rUN = rUN; }
RUN rUN;
}
>>>>>>> 3d2e7bc368880c32d40198f9fb320f8e742a6eea
......@@ -3,66 +3,91 @@ package nl.fairbydesign.backend.ncbi.objects.esample;
import com.fasterxml.jackson.annotation.JsonProperty;
public class SAMPLE {
@JsonProperty("center_name")
public String getCenter_name() {
return this.center_name; }
public void setCenter_name(String center_name) {
this.center_name = center_name; }
String center_name;
@JsonProperty("SAMPLE_NAME")
public SAMPLENAME getSAMPLE_NAME() {
return this.sAMPLE_NAME; }
return this.sAMPLE_NAME;
}
public void setSAMPLE_NAME(SAMPLENAME sAMPLE_NAME) {
this.sAMPLE_NAME = sAMPLE_NAME; }
this.sAMPLE_NAME = sAMPLE_NAME;
}
SAMPLENAME sAMPLE_NAME;
@JsonProperty("alias")
public String getAlias() {
return this.alias; }
return this.alias;
}
public void setAlias(String alias) {
this.alias = alias; }
this.alias = alias;
}
String alias;
@JsonProperty("IDENTIFIERS")
public IDENTIFIERS getIDENTIFIERS() {
return this.iDENTIFIERS; }
return this.iDENTIFIERS;
}
public void setIDENTIFIERS(IDENTIFIERS iDENTIFIERS) {
this.iDENTIFIERS = iDENTIFIERS; }
this.iDENTIFIERS = iDENTIFIERS;
}
IDENTIFIERS iDENTIFIERS;
@JsonProperty("accession")
public String getAccession() {
return this.accession; }
return this.accession;
}
public void setAccession(String accession) {
this.accession = accession; }
this.accession = accession;
}
String accession;
@JsonProperty("SAMPLE_ATTRIBUTES")
public SAMPLEATTRIBUTES getSAMPLE_ATTRIBUTES() {
return this.sAMPLE_ATTRIBUTES; }
return this.sAMPLE_ATTRIBUTES;
}
public void setSAMPLE_ATTRIBUTES(SAMPLEATTRIBUTES sAMPLE_ATTRIBUTES) {
this.sAMPLE_ATTRIBUTES = sAMPLE_ATTRIBUTES; }
this.sAMPLE_ATTRIBUTES = sAMPLE_ATTRIBUTES;
}
SAMPLEATTRIBUTES sAMPLE_ATTRIBUTES;
@JsonProperty("SAMPLE_LINKS")
public SAMPLELINKS getSAMPLE_LINKS() {
return this.sAMPLE_LINKS; }
return this.sAMPLE_LINKS;
}
public void setSAMPLE_LINKS(SAMPLELINKS sAMPLE_LINKS) {
this.sAMPLE_LINKS = sAMPLE_LINKS; }
this.sAMPLE_LINKS = sAMPLE_LINKS;
}
SAMPLELINKS sAMPLE_LINKS;
@JsonProperty("TITLE")
public String getTITLE() {
return this.tITLE; }
return this.tITLE;
}
public void setTITLE(String tITLE) {
this.tITLE = tITLE; }
this.tITLE = tITLE;
}
String tITLE;
@JsonProperty("DESCRIPTION")
public String getDESCRIPTION() {
return this.dESCRIPTION; }
return this.dESCRIPTION;
}
public void setDESCRIPTION(String dESCRIPTION) {
this.dESCRIPTION = dESCRIPTION; }
this.dESCRIPTION = dESCRIPTION;
}
String dESCRIPTION;
}
......@@ -9,10 +9,4 @@ public class SAMPLELINK{
public void setXREF_LINK(XREFLINK xREF_LINK) {
this.xREF_LINK = xREF_LINK; }
XREFLINK xREF_LINK;
@JsonProperty("URL_LINK")
public URLLINK getURL_LINK() {
return this.uRL_LINK; }
public void setURL_LINK(URLLINK uRL_LINK) {
this.uRL_LINK = uRL_LINK; }
URLLINK uRL_LINK;
}
......@@ -2,27 +2,13 @@ package nl.fairbydesign.backend.ncbi.objects.esample;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Date;
public class SUBMISSION{
@JsonProperty("submission_date")
public Date getSubmission_date() {
return this.submission_date; }
public void setSubmission_date(Date submission_date) {
this.submission_date = submission_date; }
Date submission_date;
@JsonProperty("center_name")
public String getCenter_name() {
return this.center_name; }
public void setCenter_name(String center_name) {
this.center_name = center_name; }
String center_name;
@JsonProperty("broker_name")
public String getBroker_name() {
return this.broker_name; }
public void setBroker_name(String broker_name) {
this.broker_name = broker_name; }
String broker_name;
@JsonProperty("alias")
public String getAlias() {
return this.alias; }
......
......@@ -60,7 +60,7 @@ public class ExcelValidator {
public static final String FORWARD_FILENAME = "Forward filename";
public static final String OBSERVATION_UNIT_IDENTIFIER = "Observation unit identifier";
public static final String SAMPLE_IDENTIFIER = "Sample identifier";
public static final String FILE_NAME = "FileName";
public static final String FILE_NAME = "Filename";
public static final String ASSAY_IDENTIFIER = "Assay identifier";
public static final String SAME_AS = "Same as";
public static final String LIBRARY_NAME = "Library name";
......@@ -756,17 +756,17 @@ public class ExcelValidator {
AssayType assayType;
if (sheet.getSheetName().endsWith("AmpliconAssay")) {
assayType = AssayType.Amplicon;
} else if (sheet.getSheetName().endsWith("AmpliconLibraryAssay")) {
} else if (sheet.getSheetName().endsWith("AmpliconLibrary")) {
assayType = AssayType.AmpliconLibrary;
} else if (sheet.getSheetName().endsWith("RNAseqAssay")) {
} else if (sheet.getSheetName().endsWith("RNA")) {
assayType = AssayType.Transcriptomics;
} else if (sheet.getSheetName().toLowerCase().endsWith("illumina")) {
assayType = AssayType.Genomics;
} else if (sheet.getSheetName().toLowerCase().endsWith("nanopore")) {
assayType = AssayType.Genomics;
} else if (sheet.getSheetName().endsWith("ProteomicsAssay")) {
} else if (sheet.getSheetName().endsWith("Proteomics")) {
assayType = AssayType.Proteomics;
} else if (sheet.getSheetName().endsWith("MetabolomicsAssay")) {
} else if (sheet.getSheetName().endsWith("Metabolomics")) {
assayType = AssayType.Metabolomics;
} else {
throw new Exception("The sheet " + sheet.getSheetName() + " is of an unsupported assay type");
......@@ -923,7 +923,7 @@ public class ExcelValidator {
// parsedHeaders.addAll(Arrays.asList(ASSAY_DESCRIPTION, ASSAY_TITLE, ASSAY_IDENTIFIER, PLATFORM));
if (fileCell.getCellType().equals(CellType.BLANK)) {
logging("No file found for " + assay.getIdentifier());
// logging("No file found for " + assay.getResource().getURI());
} else {
String fileName = getStringValueCell(fileCell);
// Check the FileNameForwardPath and FileNameReversePath first
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment