-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
161 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
.DS_Store | ||
/target | ||
/target | ||
cromwell-8*.jar | ||
cromwell-executions | ||
cromwell-workflow-logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
## How to test the workflow | ||
|
||
1. Start the cromwell server | ||
|
||
```bash | ||
java -jar cromwell-82.jar server | ||
``` | ||
|
||
2. Install the dependencies | ||
|
||
```bash | ||
conda activate biomedgps | ||
conda install -c conda-forge xxx | ||
|
||
# Example for installing the R package | ||
R -e "devtools::install_git('file:///Users/jy006/Documents/Code/BioMiner/omix-insight-r')" | ||
``` | ||
|
||
3. Run the workflow | ||
|
||
```bash | ||
cargo run --example hello_world | ||
``` | ||
|
||
## How to deploy the workflow | ||
|
||
1. Rsync the workflow to the server | ||
|
||
```bash | ||
rsync -avP ./cromwell-api-rs/examples/boxplot/ [email protected]:/data/biomedgps/cromwell/workflows/boxplot-v0.1.0 | ||
``` | ||
|
||
2. Update the dependencies | ||
|
||
```bash | ||
# Login to the server | ||
|
||
# Update the dependencies | ||
/opt/miniconda3/envs/biomedgps/bin/R -e "devtools::install_git('file:///data/biomedgps/cromwell/workflows/boxplot-v0.1.0')" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export const formatDuration = (duration: number) => { | ||
const durationInSeconds = duration / 1000; | ||
|
||
if (durationInSeconds <= 0) { | ||
return '0s'; | ||
} | ||
|
||
if (durationInSeconds < 60) { | ||
return `${Math.round(durationInSeconds)}s`; | ||
} else if (durationInSeconds < 3600) { | ||
const minutes = Math.floor(durationInSeconds / 60); | ||
const seconds = Math.round(durationInSeconds % 60); | ||
return seconds > 0 ? `${minutes}min ${seconds}s` : `${minutes}min`; | ||
} else { | ||
const hours = Math.floor(durationInSeconds / 3600); | ||
const minutes = Math.floor((durationInSeconds % 3600) / 60); | ||
return minutes > 0 ? `${hours}h ${minutes}min` : `${hours}h`; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters