Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

988 n5 export rpc #1047

Merged
merged 51 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
b561c65
Add N5 To Selection Panel
AvocadoMoon Oct 17, 2023
9d40022
Base GUI Export
AvocadoMoon Oct 18, 2023
a185c55
Refactor Export Settings
AvocadoMoon Oct 23, 2023
ec7459c
Refactor Auto Generated Code
AvocadoMoon Oct 23, 2023
def4bf0
Initial Export Code
AvocadoMoon Oct 25, 2023
b68de98
N5 GUI Export
AvocadoMoon Oct 26, 2023
2293ec1
Fix N5 Exporter Test
AvocadoMoon Oct 30, 2023
c7081ff
Add Dataset Name
AvocadoMoon Nov 2, 2023
8bca9c1
Delete Duplicate Dependency
AvocadoMoon Nov 6, 2023
3e41aa0
Time Range
AvocadoMoon Nov 6, 2023
be4450c
Order of Function Input
AvocadoMoon Nov 6, 2023
74607fa
Tests for RPC Paradigm
AvocadoMoon Nov 7, 2023
8592401
No Tmp File
AvocadoMoon Nov 7, 2023
3a8b669
Align with Export
AvocadoMoon Nov 7, 2023
ebe8829
Docker N5
AvocadoMoon Nov 14, 2023
2209eff
Export Properly
AvocadoMoon Nov 14, 2023
d932a14
Required System Properties
AvocadoMoon Nov 14, 2023
62862dd
Change Naming Dataset
AvocadoMoon Nov 15, 2023
2bfbfd8
Fixing URL
AvocadoMoon Nov 15, 2023
6bfb8d6
Remove Download Pop-Up
AvocadoMoon Nov 15, 2023
08cb150
Remove Old API Method
AvocadoMoon Nov 16, 2023
019d2a3
Test Fix
AvocadoMoon Nov 16, 2023
ca3d407
Add N5 To Selection Panel
AvocadoMoon Oct 17, 2023
3993faf
Base GUI Export
AvocadoMoon Oct 18, 2023
8363fc3
Refactor Export Settings
AvocadoMoon Oct 23, 2023
34f69a2
Refactor Auto Generated Code
AvocadoMoon Oct 23, 2023
e4d47bb
Initial Export Code
AvocadoMoon Oct 25, 2023
dea18e1
N5 GUI Export
AvocadoMoon Oct 26, 2023
fd6d8d5
Fix N5 Exporter Test
AvocadoMoon Oct 30, 2023
bf623d2
Add Dataset Name
AvocadoMoon Nov 2, 2023
ed8fcc3
Delete Duplicate Dependency
AvocadoMoon Nov 6, 2023
b43424d
Time Range
AvocadoMoon Nov 6, 2023
cdc18b4
Order of Function Input
AvocadoMoon Nov 6, 2023
c25071d
Tests for RPC Paradigm
AvocadoMoon Nov 7, 2023
e648c4c
No Tmp File
AvocadoMoon Nov 7, 2023
f73a7da
Align with Export
AvocadoMoon Nov 7, 2023
6c9393f
Docker N5
AvocadoMoon Nov 14, 2023
8e90f5b
Export Properly
AvocadoMoon Nov 14, 2023
ca0d3a6
Required System Properties
AvocadoMoon Nov 14, 2023
0b0e5c9
Change Naming Dataset
AvocadoMoon Nov 15, 2023
99e77f8
Fixing URL
AvocadoMoon Nov 15, 2023
b9f1414
Remove Download Pop-Up
AvocadoMoon Nov 15, 2023
ab60581
Remove Old API Method
AvocadoMoon Nov 16, 2023
a526776
Test Fix
AvocadoMoon Nov 16, 2023
07622b0
Merge branch '988-n5-export-rpc' of github.com:virtualcell/vcell into…
AvocadoMoon Dec 5, 2023
02f87f3
Bean Utils Downcast
AvocadoMoon Dec 5, 2023
895507b
Bean Utils Downcast
AvocadoMoon Dec 5, 2023
e1aae3f
Merge branch '988-n5-export-rpc' of github.com:virtualcell/vcell into…
AvocadoMoon Dec 6, 2023
12c0bad
Docker Env Shell Script
AvocadoMoon Dec 6, 2023
daa0647
Fix Bad Previous Commit
AvocadoMoon Dec 6, 2023
22e0704
Fix newline and Replace suffix with literal
AvocadoMoon Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docker/build/Dockerfile-data-dev
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ ENV softwareVersion=SOFTWARE-VERSION-NOT-SET \
simdatadir_external=/path/to/external/simdata/ \
simdataCacheSize="simdataCacheSize-not-set" \
webDataPort="webDataPort-not-set" \
servertype="servertype-not-set"
servertype="servertype-not-set" \
s3ProxyPortExternal="80"
AvocadoMoon marked this conversation as resolved.
Show resolved Hide resolved

ENV dbpswdfile=/run/secrets/dbpswd \
jmspswdfile=/run/secrets/jmspswd \
Expand Down Expand Up @@ -89,6 +90,8 @@ ENTRYPOINT java \
-Dvcell.python.executable=/usr/local/bin/python \
-Dvcell.primarySimdatadir.internal=/simdata \
-Dvcell.secondarySimdatadir.internal=/simdata_secondary \
-Dvcell.n5DataDir.internal=/n5DataDir \
-Dvcell.s3proxy.port.external="${s3ProxyPortExternal}" \
-Dvcell.primarySimdatadir.external="${simdatadir_external}" \
-Dvcell.simdataCacheSize="${simdataCacheSize}" \
-Dvcell.export.baseDir.internal=/exportdir/ \
Expand Down
1 change: 1 addition & 0 deletions docker/swarm/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ services:
- mongodb_host_internal=mongodb
- mongodb_port_internal=27017
- mongodb_database=test
- s3ProxyPortExternal=${VCELL_S3PROXY_PORT_EXTERNAL}

- webDataPort=${VCELL_WEB_DATA_PORT}

Expand Down
49 changes: 30 additions & 19 deletions docker/swarm/localconfig_realslurm_oracle_zeke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ VCELL_OPT_SINGULARITY_IMAGE_EXTERNAL="/state/partition1/singularityImages/${VCEL
VCELL_SMTP_HOSTNAME=vdsmtp.cam.uchc.edu
VCELL_SMTP_PORT=25
[email protected]
VCELL_EXPORT_BASEURL=http://vcell.org/export/
VCELL_EXPORTDIR_HOST=/Volumes/vcell/export/
VCELL_EXPORT_BASEURL=http://localhost/
VCELL_EXPORTDIR_HOST=/media/zeke/DiskDrive/Home/Work/CCAM/TempStorage/export
VCELL_MAX_JOBS_PER_SCAN=100
AvocadoMoon marked this conversation as resolved.
Show resolved Hide resolved
VCELL_MAX_ODE_JOBS_PER_USER=100
VCELL_MAX_PDE_JOBS_PER_USER=40
Expand All @@ -136,65 +136,70 @@ VCELL_SSH_CMD_RESTORE_TIMEOUT=5
cat <<EOF >"$_outputfile"
VCELL_API_HOST_EXTERNAL=$VCELL_API_HOST_EXTERNAL
VCELL_API_PORT_EXTERNAL=$VCELL_API_PORT_EXTERNAL

VCELL_BATCH_DOCKER_IMAGE=$VCELL_BATCH_DOCKER_IMAGE
VCELL_BATCH_HOST=$VCELL_BATCH_HOST
VCELL_BATCH_SINGULARITY_FILENAME=$VCELL_BATCH_SINGULARITY_FILENAME
VCELL_BATCH_SINGULARITY_IMAGE_EXTERNAL=$VCELL_BATCH_SINGULARITY_IMAGE_EXTERNAL
VCELL_BATCH_USER=vcell

VCELL_BIOFORMATS_JAR_FILE=vcell-bioformats-0.0.9-jar-with-dependencies.jar
VCELL_BIOFORMATS_JAR_URL=http://vcell.org/webstart/vcell-bioformats-0.0.9-jar-with-dependencies.jar

VCELL_BUILD_NUMBER=$VCELL_BUILD_NUMBER
VCELL_CLIENT_APPID=${_applicationId}

VCELL_DB_DRIVER=$VCELL_DB_DRIVER
VCELL_DB_URL=$VCELL_DB_URL
VCELL_DB_USER=$VCELL_DB_USER

VCELL_DEBUG_PORT_VCELL_API=$((VCELL_DEBUG_PORT_BASE+1))
VCELL_DEBUG_PORT_VCELL_DATA=$((VCELL_DEBUG_PORT_BASE+2))
VCELL_DEBUG_PORT_VCELL_DB=$((VCELL_DEBUG_PORT_BASE+3))
VCELL_DEBUG_PORT_VCELL_SCHED=$((VCELL_DEBUG_PORT_BASE+4))
VCELL_DEBUG_PORT_VCELL_SUBMIT=$((VCELL_DEBUG_PORT_BASE+5))
VCELL_DEBUG_PORT_VCELL_WEB=$((VCELL_DEBUG_PORT_BASE+6))
VCELL_DEPLOY_SECRETS_DIR=${HOME}/vcellkeys_oracle

VCELL_DEPLOY_SECRETS_DIR=/media/zeke/DiskDrive/Home/Work/CCAM/VCellDummyFiles
VCELL_EXPORT_BASEURL=$VCELL_EXPORT_BASEURL
VCELL_EXPORTDIR_HOST=$VCELL_EXPORTDIR_HOST
VCELL_HTC_NODELIST=$VCELL_HTC_NODELIST
VCELL_HTCLOGS_EXTERNAL=/share/apps/vcell3/dev_htclogs
VCELL_HTCLOGS_HOST=/Volumes/vcell/dev_htclogs
VCELL_INSTALLER_JRE_LINUX32=linux-x86-1.8.0_66
VCELL_INSTALLER_JRE_LINUX64=linux-amd64-1.8.0_66
VCELL_INSTALLER_JRE_MAC=macosx-amd64-1.8.0_141
VCELL_INSTALLER_JRE_WIN32=windows-x86-1.8.0_141
VCELL_INSTALLER_JRE_WIN64=windows-amd64-1.8.0_141
VCELL_INSTALLER_JREDIR=${HOME}/.install4j6/jres
VCELL_HTCLOGS_HOST=/media/zeke/DiskDrive/Home/Work/CCAM/TempStorage/dev_htclogs

VCELL_JMS_SIM_HOST_EXTERNAL=$VCELL_JMS_SIM_HOST_EXTERNAL
VCELL_JMS_SIM_PORT_EXTERNAL=$VCELL_JMS_SIM_PORT_EXTERNAL
VCELL_JMS_SIM_RESTPORT_EXTERNAL=$VCELL_JMS_SIM_RESTPORT_EXTERNAL

VCELL_MAX_JOBS_PER_SCAN=$VCELL_MAX_JOBS_PER_SCAN
VCELL_MAX_ODE_JOBS_PER_USER=$VCELL_MAX_ODE_JOBS_PER_USER
VCELL_MAX_PDE_JOBS_PER_USER=$VCELL_MAX_PDE_JOBS_PER_USER

VCELL_MONGO_HOST_EXTERNAL=$VCELL_MONGO_HOST_EXTERNAL
VCELL_MONGO_PORT_EXTERNAL=$VCELL_MONGO_PORT_EXTERNAL

VCELL_NATIVESOLVERDIR_EXTERNAL=/share/apps/vcell3/nativesolvers
VCELL_OPT_DOCKER_IMAGE=$VCELL_OPT_DOCKER_IMAGE
VCELL_OPT_SINGULARITY_FILENAME=$VCELL_OPT_SINGULARITY_FILENAME
VCELL_OPT_SINGULARITY_IMAGE_EXTERNAL=$VCELL_OPT_SINGULARITY_IMAGE_EXTERNAL

VCELL_REPO_NAMESPACE=$VCELL_REPO_NAMESPACE
VCELL_SECRETS_DIR=${HOME}/vcellkeys_oracle
VCELL_N5_DATADIR_HOST=/share/apps/vcell3/n5
VCELL_SECRETS_DIR=/media/zeke/DiskDrive/Home/Work/CCAM/VCellDummyFiles
VCELL_N5_DATADIR_HOST=/media/zeke/DiskDrive/Home/Work/CCAM/TempStorage/N5Dir
VCELL_S3PROXY_PORT_EXTERNAL=$VCELL_S3PROXY_PORT_EXTERNAL

VCELL_SIMDATADIR_ARCHIVE_EXTERNAL=/share/apps/vcell12/users
VCELL_SIMDATADIR_ARCHIVE_INTERNAL=/share/apps/vcell12/users
VCELL_SIMDATADIR_ARCHIVE_HOST=/Volumes/vcell-1/users
VCELL_SIMDATADIR_ARCHIVE_HOST_ORIG=/Volumes/vcell-2/users
VCELL_SIMDATADIR_ARCHIVE_HOST=/media/zeke/DiskDrive/Home/Work/CCAM/TempStorage/users
VCELL_SIMDATADIR_EXTERNAL=/share/apps/vcell3/users
VCELL_SIMDATADIR_HOST=/Volumes/vcell/users
VCELL_SIMDATADIR_HOST=/media/zeke/DiskDrive/Home/Work/CCAM/TempStorage/users
VCELL_SIMDATADIR_SECONDARY_EXTERNAL=/share/apps/vcell3/users
VCELL_SIMDATADIR_SECONDARY_HOST=/Volumes/vcell/users
VCELL_SIMDATADIR_SECONDARY_EXTERNAL_ORIG=/share/apps/vcell7/users
VCELL_SIMDATADIR_SECONDARY_HOST_ORIG=/Volumes/vcell-1/users
VCELL_SIMDATADIR_SECONDARY_HOST=~/Mnts/RemoteVolumes/VCell05/users
VCELL_SIMDATADIR_PARALLEL_EXTERNAL=/share/apps/vcell3parallel

VCELL_SITE_CAMEL=${_site_camel}
VCELL_SITE=$VCELL_SITE

VCELL_SLURM_CENTRAL_SINGULARITY_DIR=${VCELL_SLURM_CENTRAL_SINGULARITY_DIR}
VCELL_SLURM_CMD_SACCT=$VCELL_SLURM_CMD_SACCT
VCELL_SLURM_CMD_SBATCH=$VCELL_SLURM_CMD_SBATCH
Expand All @@ -208,17 +213,23 @@ VCELL_SLURM_QOS=$VCELL_SLURM_QOS
VCELL_SLURM_RESERVATION_PU=$VCELL_SLURM_RESERVATION_PU
VCELL_SLURM_RESERVATION=$VCELL_SLURM_RESERVATION
VCELL_SLURM_TMPDIR=$VCELL_SLURM_TMPDIR

VCELL_SMTP_EMAILADDRESS=${VCELL_SMTP_EMAILADDRESS}
VCELL_SMTP_HOSTNAME=${VCELL_SMTP_HOSTNAME}
VCELL_SMTP_PORT=${VCELL_SMTP_PORT}

VCELL_SSH_CMD_RESTORE_TIMEOUT=$VCELL_SSH_CMD_RESTORE_TIMEOUT
VCELL_SSH_CMD_TIMEOUT=$VCELL_SSH_CMD_TIMEOUT

VCELL_SSL_IGNORE_CERT_PROBLEMS=true
VCELL_SSL_IGNORE_HOST_MISMATCH=true

VCELL_SUBMIT_SERVICE_HOST=submit
VCELL_TAG=$VCELL_TAG
VCELL_UPDATE_SITE=http://vcell.org/webstart/${_site_camel}
VCELL_VERSION_NUMBER=$VCELL_VERSION_NUMBER

VCELL_VERS
AvocadoMoon marked this conversation as resolved.
Show resolved Hide resolved
ION_NUMBER=$VCELL_VERSION_NUMBER
VCELL_VERSION=${_site_camel}_Version_${VCELL_VERSION_NUMBER}_build_${VCELL_BUILD_NUMBER}
VCELL_WEB_DATA_PORT=$VCELL_WEB_DATA_PORT
EOF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,17 @@ public void handle(Request req, Response response) {

switch (desiredInfo){
case VCellApiApplication.N5_INFO_SUPPORTED_SPECIES:
User user = application.getVCellUser(req.getChallengeResponse(), VCellApiApplication.AuthenticationPolicy.ignoreInvalidCredentials);
N5Service n5Service = new N5Service(simID, user);
ArrayList<String> listOfSupportedSpecies = n5Service.supportedSpecies();
Gson gson = new Gson();
response.setEntity(gson.toJson(listOfSupportedSpecies), MediaType.APPLICATION_JSON);
// User user = application.getVCellUser(req.getChallengeResponse(), VCellApiApplication.AuthenticationPolicy.ignoreInvalidCredentials);
// N5Service n5Service = new N5Service(simID, user);
// ArrayList<String> listOfSupportedSpecies = n5Service.supportedSpecies();
// Gson gson = new Gson();
// response.setEntity(gson.toJson(listOfSupportedSpecies), MediaType.APPLICATION_JSON);
return;
default:
lg.info("No information type was specified in getting N5 info");
response.setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
response.setEntity("failed to specify type of N5 information request for sim ID: " + simID, MediaType.TEXT_PLAIN);
return;
// lg.info("No information type was specified in getting N5 info");
// response.setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
// response.setEntity("failed to specify type of N5 information request for sim ID: " + simID, MediaType.TEXT_PLAIN);
}
} catch (Exception e) {
lg.error(e.getMessage(), e);
Expand Down
24 changes: 11 additions & 13 deletions vcell-api/src/main/java/org/vcell/rest/n5data/N5Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import cbit.vcell.math.MathException;
import cbit.vcell.resource.PropertyLoader;
import cbit.vcell.simdata.DataIdentifier;
import cbit.vcell.simdata.n5.N5Exporter;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.janelia.saalfeldlab.n5.Compression;
Expand Down Expand Up @@ -38,21 +37,20 @@ public N5Service(String simID, User user) {


public void exportToN5(String[] species, Compression compression) throws IOException, DataAccessException, MathException {
N5Exporter n5Exporter = new N5Exporter();
n5Exporter.initalizeDataControllers(simID, user.getName(), user.getID().toString());
ArrayList<DataIdentifier> dataIdentifiers = new ArrayList<>();
for(String specie: species){
dataIdentifiers.add(n5Exporter.getSpecificDI(specie));
}
n5Exporter.exportToN5(dataIdentifiers, compression);
// N5Exporter n5Exporter = new N5Exporter();
// n5Exporter.initalizeDataControllers(simID, user.getName(), user.getID().toString());
// ArrayList<DataIdentifier> dataIdentifiers = new ArrayList<>();
// for(String specie: species){
// dataIdentifiers.add(n5Exporter.getSpecificDI(specie));
// }
// n5Exporter.exportToN5(dataIdentifiers, compression);
return;
}


public ArrayList<String> supportedSpecies() throws IOException, DataAccessException {
N5Exporter n5Exporter = new N5Exporter();
n5Exporter.initalizeDataControllers(simID, user.getName(), user.getID().toString());
return n5Exporter.getSupportedSpecies();
}
// public ArrayList<String> supportedSpecies() throws IOException, DataAccessException {
//
// }



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2540,6 +2540,9 @@ public static void downloadExportedData(final Component requester, final UserPre
if (exportsRecord.contains(evt.getJobID() + "")) {
return;
}
if (evt.getLocation().toLowerCase().endsWith(".n5")){
return;
}
AvocadoMoon marked this conversation as resolved.
Show resolved Hide resolved
AsynchClientTask task1 = new AsynchClientTask("Retrieving data from '" + evt.getLocation() + "'",
AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {

Expand Down
Loading
Loading