Skip to content

Commit 41cdad2

Browse files
committed
Merge branch 'topic-release' into main
2 parents a35ebb1 + 9214bb0 commit 41cdad2

1 file changed

Lines changed: 37 additions & 11 deletions

File tree

cft-templates/nextflow-advanced.yaml

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ Parameters:
5757
Description: Public Docker container image of the pipeline to be executed. If you are using a custom pipeline, ensure that the custom container image is publicly available on Docker Hub
5858
InputDataLocation:
5959
Description: >-
60-
An S3 bucket which holds input data for the Nextflow pipeline. The bucket name must respect the S3 bucket naming conventions
61-
(can contain lowercase letters, numbers, periods and hyphens).
60+
The path to the location which holds the Input data files. This can point to a local path on the head node or to an S3 bucket. Eg /home/ec2-user/studies/ProjectStorage/Shared or mys3bucket.
61+
Type in the search box to find s3 buckets created through Research Gateway.
6262
Type: String
6363
InputDataPattern:
6464
Description: >-
@@ -67,9 +67,9 @@ Parameters:
6767
Default: samplesheet.csv
6868
OutputDataLocation:
6969
Description: >-
70-
The full path on the local disk where outputs of the pipeline should be stored. The default path above will enable you to view the outputs via the browser. The path should be accessible to the user ec2-user.
71-
Alternately, provide an S3 bucket for storing analysis results. The bucket name must respect the S3 bucket naming conventions
72-
(can contain lowercase letters, numbers, periods and hyphens).
70+
The path to the location which holds the Output data files. This can point to a local path on the head node or to an S3 bucket.
71+
A local path should be accessible to the user ec2-user. Alternately, provide an S3 bucket for storing analysis results.
72+
Type in the search box to find s3 buckets created through Research Gateway.
7373
Default: /home/ec2-user/nextflow/outputs/
7474
Type: String
7575
ComputeEnvMinvCpus:
@@ -91,7 +91,7 @@ Parameters:
9191
AllowedValues: [t2.nano, t2.micro, t2.small, t2.medium]
9292
ConstraintDescription: Must be a valid EC2 instance type.
9393
KeyPair:
94-
Description: Name of an existing EC2 KeyPair to enable SSH access to the Head Node. Please create a key pair from the key pair screen if they are not available in the dropdown.
94+
Description: Name of an existing EC2 KeyPair to enable SSH access to the Head Node. If no key pairs exist, please create one from the button next to the dropdown. Please contact your Administrator if you are unable to create one.
9595
Type: AWS::EC2::KeyPair::KeyName
9696
ConstraintDescription: Must be the name of an existing EC2 KeyPair.
9797
AllowedSSHLocation:
@@ -544,15 +544,22 @@ Resources:
544544
#!/bin/bash -xe
545545
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
546546

547+
cd /usr/bin
548+
curl -s https://get.nextflow.io | bash
549+
547550
sudo yum update -y --security
548-
cd /root/
551+
cd /root/
549552

553+
pattern=${InputDataPattern}
554+
pattern=$(echo $pattern | sed -e 's#^/*##')
555+
echo $pattern
556+
550557
getOutputData=${OutputDataLocation}
551558
getFirstChar=`echo $getOutputData | cut -c1-1`
552559

553560
if [ "$getFirstChar" == "/" ]
554561
then :
555-
echo "Ngnix URL"
562+
echo "Ngnix URL"
556563
OutputDataLocation=${OutputDataLocation}
557564
echo $OutputDataLocation
558565
else
@@ -561,18 +568,34 @@ Resources:
561568
echo $OutputDataLocation
562569
fi
563570

571+
572+
getInputData=${InputDataLocation}
573+
getIFirstChar=`echo $getInputData | cut -c1-1`
574+
575+
if [ "$getIFirstChar" == "/" ]
576+
then :
577+
echo "Ngnix URL"
578+
InputDataLocation=${InputDataLocation}
579+
echo $InputDataLocation
580+
else
581+
echo "S3 Path"
582+
InputDataLocation="s3://"${InputDataLocation}
583+
echo $InputDataLocation
584+
fi
585+
564586
cd .nextflow/
565587
PROJECT_NF_CONFIG=config
566588

567-
cat << EOF >> $PROJECT_NF_CONFIG
589+
cat << EOF >> $PROJECT_NF_CONFIG
590+
568591
process.container = '${PipelineContainer}'
569592
plugins {
570593
id 'nf-amazon'
571594
}
572595
docker.enabled = true
573596
params.outdir='$OutputDataLocation'
574-
params.reads='s3://${InputDataLocation}/${InputDataPattern}'
575-
params.input='s3://${InputDataLocation}/${InputDataPattern}'
597+
params.reads='$InputDataLocation/$pattern'
598+
params.input='$InputDataLocation/$pattern'
576599
profiles {
577600
standard {
578601
process.container = '${PipelineContainer}'
@@ -587,6 +610,7 @@ Resources:
587610
aws.batch.cliPath = '/home/ec2-user/miniconda/bin/aws'
588611
}
589612
}
613+
590614
EOF
591615

592616
cd /home/ec2-user/
@@ -598,7 +622,9 @@ Resources:
598622
NEXTFLOW_CONFIG=nextflow.config
599623

600624
cat << EOF >> $NEXTFLOW_CONFIG
625+
601626
params.outdir='$OutputDataLocation'
627+
602628
EOF
603629

604630
docker pull ${PipelineContainer}

0 commit comments

Comments
 (0)