Upload your fastq, we will run HLA pipeline for your in aws.
Github: https://github.com/linnil1/hla-on-aws
API logic
AWS Step function = data-pipeline
I create a HLA user/group to run the aws command below.
The user has the right the create, list, update, write the settings, thus the permission is not minimal (Exclude IAM part, and IAM part is the only part we need to setup manually).
Here is the policy
After the user setup, you can get the access key and token in security credentials.
Then, you can configure your awscli(An AWS command line tool)
I recommend to set profile as default, otherwise you will add --profile=awshla
for every command.
Here is our Role
Name: hla_lambda
Name: hla_step
Name: hla_api
Name: hla
The index data will save into EFS
follow https://github.com/lh3/bwa/tree/master/bwakit#introduction
Create a s3 bucket for saving
Create two EFS
hla_index
for saving indexhla_tmp
for saving temporary dataBecause samtools is not in hisat2 container, so we need to build a new docker Image.
(Change 493445452763.dkr.ecr.us-east-2.amazonaws.com
to your URL)
Create a private network (Must of aws services need to use it) and subnet also.
DNS support is important when mounting EFS
Create two subnet under the VPC (Change vpc-id
to your own VPC)
Once you create VPC, aws will create a default security for you
This allow instances in VPC to access internet.
internet-gateway
Routing table (add another rule in default route-table)
Add security group for NFS port 2049
Allow ec2 or ecs(container) to access EFS, we need to set EFS under the same VPC, subnet
To give the lambda a permission to access EFS, we need to set the access point in EFS hla_tmp
(hla_index
is not needed for lambda to read)
Create many function for APIGateway and step function.
s3
step function
You can change lambda code and then re-upload and testing
Moving our index data to EFS by EC2 instances
Add ssh key and security group for port 22
Create t2.nano to write
You can run anything in ec2
Batch is the system to queue our job and run the job in container
Setup definition (hisat2 and bwakit)
Create pipeline, state machine language is written in step_hla.json
But I recommend to read the result in console and using Workflow studio to write the language
The apigateway can
/hla
https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html
I write the web interface by nuxt in web/
Edit wrnagler.toml
and nuxt.config.ts
to change hla.linnil1.me
and AWS_API
Build the index in local
tmp: