Package: accession
accessionis a Python module and command line tool for submitting genomics pipeline analysis output files and metadata to the ENCODE Portal.InstallationNote: installation requires Python >= 3.8$pipinstallaccessionNext, provide your API keys from the ENCODE portal:$exportDCC_API_KEY=XXXXXXXX$exportDCC_SECRET_KEY=yyyyyyyyyyyIt is highly recommended to set the DCC_LAB and DCC_AWARD environment variables for
ease of use. These correspond to the lab and award identifiers given by the ENCODE
portal, e.g./labs/foo/andU00HG123456, respectively.$exportDCC_LAB=XXXXXXXX$exportDCC_AWARD=yyyyyyyyyyyIf you are accessioning workflows produced using theCaperlocal backend, then installation is
complete. However, if using WDL metadata from pipeline runs on Google Cloud, you will
also need to authenticate with Google Cloud. Run the following two commands and follow
the prompts:$gcloudauthlogin--no-launch-browser$gcloudauthapplication-defaultlogin--no-launch-browserIf you would like to be able to pass Caper workflow IDs or labels you will
need to configure access to the Caper server. If you are invokingaccessionfrom
a machine where you already have a Caper set up, and you have the Caper configuration
file available at~/.caper/default.conf, then there is no extra setup required.
If the Caper server is on another machine, you will need so configure HTTP access to
it by setting thehostnameandportvalues in the Caper conf file.(Optional) Finally, to enable using Cloud Tasks to upload files from Google Cloud
Storage to AWS S3, set the following two environment variables. If one or more of them
is not set, then files will be uploaded using the same machine that the accessioning
code is run from. For more information on how to set up Cloud Tasks and the upload
service, see the docs for thegcs-s3-transfer-service$exportACCESSION_CLOUD_TASKS_QUEUE_NAME=my-queue$exportACCESSION_CLOUD_TASKS_QUEUE_REGION=us-west1To accession workflows produced on AWS backend you will need to set up AWS
credentials. The easiest way to do this is to install the AWS CLI and runaws configureUsage$accession-mmetadata.json\-pmirna\-sdevPlease see thedocsfor greater detail on these input parameters.Deploying on Google CloudFirst authenticate with Google Cloud viagcloud auth loginif needed. Then install
the API client withpip install google-api-python-client, it is recommended to do
this inside of avenv. Finally, create the firewall rule and deploy the instance by
runningpython deploy.py –project $PROJECT. This will also install theaccessionpackage. Finally, SSH onto the new instance and rungcloud auth loginto
authenticate on the instance.For Caper integration, once the instance is up, SSH onto it and create the Caper conf
file at~/.caper/default.conf, use the private IP of the Caper VM instance as thehostnameand use8000for theport. For the connection to work the Caper VM
will need to have the tagcaper-server. Also note that the deployment assumes the
Cromwell server port is set to8000.AWS NotesTo enable S3 to S3 copy from the pipeline buckets to the ENCODE buckets, ensure that the
pipeline bucket policy grants read access to the ENCODE account. Here is an example
policy:{"Version":"2012-10-17","Statement":[{"Sid":"DelegateS3AccessGet","Effect":"Allow","Principal":{"AWS":["arn:aws:iam::618537831167:root","arn:aws:iam::159877419961:root"]},"Action":"s3:GetObject","Resource":"arn:aws:s3:::PIPELINE-BUCKET/*"},{"Sid":"DelegateS3AccessList","Effect":"Allow","Principal":{"AWS":["arn:aws:iam::618537831167:root","arn:aws:iam::159877419961:root"]},"Action":"s3:ListBucket","Resource":"arn:aws:s3:::PIPELINE-BUCKET"}]}Project Informationaccessionis released under theMITlicense, documentation lives inreadthedocs, code is hosted ongithuband the releases onPyPI.