Please remind that you need to build your cloud environment in advance
region=$(ec2-metadata --availability-zone | sed 's/placement: \(.*\).$/\1/')
account_number=$(aws sts get-caller-identity --query 'Account' --output text)
cdk bootstrap aws://$account_number/$region
cd ~
git clone https://github.com/aws-samples/aws-healthomics-tutorials.git
cd ~
git clone https://github.com/aws-samples/amazon-ecr-helper-for-aws-healthomics.git
cd amazon-ecr-helper-for-aws-healthomics
npm install
cdk deploy --all
cd ~
git clone https://github.com/nf-core/sarek.git
cp ~/amazon-ecr-helper-for-aws-healthomics/lib/lambda/parse-image-uri/public_registry_properties.json \ namespace.config
cd ~
python3 aws-healthomics-tutorials/utils/scripts/inspect_nf.py \
--output-manifest-file sarek_dev_docker_images_manifest.json \
-n namespace.config \
--output-config-file omics.config \
--region $region \
~/sarek/
- check the 'sarek_dev_docker_images_manifest.json` file
- check the
omics.configfile
aws stepfunctions start-execution \
--state-machine-arn arn:aws:states:$region:$account_number:stateMachine:omx-container-puller \
--input file://sarek_dev_docker_images_manifest.json
mv omics.config sarek/conf
echo "includeConfig 'conf/omics.config'" >> sarek/nextflow.config
export yourbucket="my-test-bucket-527778419916"
zip -r sarek_ECR.zip sarek/ -x "*/\.*" "*/\.*/**"
aws s3 cp sarek_ECR.zip s3://${yourbucket}/workshop/sarek_ECR.zip
export workflow_name="sarek_ECR"
aws omics create-workflow \
--name ${workflow_name} \
--definition-uri s3://${yourbucket}/workshop/${workflow_name}.zip \
--engine NEXTFLOW \
#--parameter-template file://parameter-description.json \
workflow_id=$(aws omics list-workflows --name ${workflow_name} --query 'items[0].id' --output text)
echo $workflow_id
- download necessary files for sarek test profile
- modify the sample sheet file
- upload them to your
S3bucket
export workflow_name="sarek_ECR"
export workflow_id=$(aws omics list-workflows --name ${workflow_name} --query 'items[0].id' --output text)
export yourbucket="my-test-bucket-527778419916"
export your_account_id="527778419916"
export omics_role_name="OmicsUnifiedJobRole"
echo $workflow_id
echo $yourbucket
echo $your_account_id
echo $omics_role_name
aws iam create-role --role-name ${omics_role_name} --assume-role-policy-document file://trust_policy.json
aws iam put-role-policy --role-name ${omics_role_name} --policy-name OmicsWorkflowV1 --policy-document file://omics_workflow_policy.json
aws omics start-run \
--name sarek_official_test\
--role-arn arn:aws:iam::${your_account_id}:role/${omics_role_name}\
--workflow-id ${workflow_id} \
--parameters file://input.json \
--output-uri s3://${yourbucket}/workflow-output/