Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 23 additions & 3 deletions installation/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,32 @@ if [ ! -d $io_home ]; then
mkdir ${io_home}/${dir}
done

test_data_home=$app_home/workflows/Nextflow/test_data
if [ -d $test_data_home ]; then
ln -s ${test_data_home} ${io_home}/public/nextflow
cromwell_test_data_home=$app_home/workflows/Cromwell/test_data
if [ -d $cromwell_test_data_home ]; then
ln -s ${cromwell_test_data_home} ${io_home}/public/cromwell
fi

nextflow_test_data_home=$app_home/workflows/Nextflow/test_data
if [ -d $nextflow_test_data_home ]; then
ln -s ${nextflow_test_data_home} ${io_home}/public/nextflow
fi
fi

echo "Generate Cromwell wdl imports.zip"
wdl_dirs=(
"data"
)

for wdl_dir in "${wdl_dirs[@]}"
do
cd $app_home/workflows/Cromwell/WDL/${wdl_dir}
zip -r imports.zip *.wdl
if [ "$?" != "0" ]; then
echo "Cannot create $app_home/workflows/Cromwell/WDL/${wdl_dir}/imports.zip!" 1>&2
exit 1
fi
done

echo "Setup LANL EDGE webapp ..."
#build client
echo "build client..."
Expand Down
10 changes: 10 additions & 0 deletions webapp/client/src/edge/project/forms/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const TextInput = (props) => {

const {
register,
reset,
formState: { errors },
trigger,
} = useForm({
Expand Down Expand Up @@ -54,6 +55,15 @@ export const TextInput = (props) => {
}
}, []) // eslint-disable-line react-hooks/exhaustive-deps

useEffect(() => {
if (props.defaultValue) {
reset({ textInput: props.defaultValue })
} else {
reset({ textInput: '' })
}
setDoValidation(doValidation + 1)
}, [props.reset]) // eslint-disable-line react-hooks/exhaustive-deps

useEffect(() => {
//validate form
trigger().then((result) => {
Expand Down
8 changes: 4 additions & 4 deletions webapp/server/utils/cromwell.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const generateInputs = async (projHome, projectConf, workflowConf) => {
// projectConf: project conf.js
// workflowList in utils/workflow
const workflowSettings = workflowList[projectConf.workflow.name];
const template = String(fs.readFileSync(`${config.CROMWELL.TEMPLATE_DIR}/${projectConf.category}/${workflowSettings.inputs_tmpl}`));
const template = String(fs.readFileSync(`${config.CROMWELL.TEMPLATE_DIR}/${workflowSettings.inputs_tmpl}`));
const params = { ...workflowConf, ...projectConf.workflow.input, outdir: `${projHome}/${workflowSettings.outdir}` };

if (projectConf.workflow.name === 'sra2fastq') {
Expand All @@ -35,8 +35,8 @@ const generateInputs = async (projHome, projectConf, workflowConf) => {
const inputs = ejs.render(template, params);
await fs.promises.writeFile(`${projHome}/pipeline_inputs.json`, inputs);
// render options template and write to pipeline_options.json
if (fs.existsSync(`${config.CROMWELL.TEMPLATE_DIR}/${projectConf.category}/${workflowSettings.options_tmpl}`)) {
const optionsTemplate = String(fs.readFileSync(`${config.CROMWELL.TEMPLATE_DIR}/${projectConf.category}/${workflowSettings.options_tmpl}`));
if (fs.existsSync(`${config.CROMWELL.TEMPLATE_DIR}/${workflowSettings.options_tmpl}`)) {
const optionsTemplate = String(fs.readFileSync(`${config.CROMWELL.TEMPLATE_DIR}/${workflowSettings.options_tmpl}`));
const options = ejs.render(optionsTemplate, params);
await fs.promises.writeFile(`${projHome}/pipeline_options.json`, options);
}
Expand All @@ -52,7 +52,7 @@ const submitWorkflow = (proj, projectConf, inputsize) => {
formData.append('workflowInputs', fs.createReadStream(`${projHome}/pipeline_inputs.json`));
// logger.debug(`workflowInputs${projHome}/pipeline_inputs.json`);

const imports = `${config.CROMWELL.WDL_DIR}/${projectConf.category}/${workflowList[projectConf.workflow.name].wdl_imports}`;
const imports = `${config.CROMWELL.WDL_DIR}/${workflowList[projectConf.workflow.name].wdl_imports}`;
const optionsJson = `${projHome}/pipeline_options.json`;

if (fs.existsSync(optionsJson)) {
Expand Down
4 changes: 2 additions & 2 deletions webapp/server/utils/workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const nextflowConfigs = {
const workflowList = {
default_wdl_version: '1.0',
sra2fastq: {
wdl: 'sra2fastq.wdl',
wdl_imports: 'imports.zip',
wdl: 'data/sra2fastq.wdl',
wdl_imports: 'data/imports.zip',
inputs_tmpl: 'data/sra2fastq_inputs.tmpl',
cromwell_calls: ['sra.sra2fastq'],
outdir: 'output/sra2fastq',
Expand Down
Loading