Skip to content

Instantly share code, notes, and snippets.

@seandavi
Created February 2, 2018 12:27
Show Gist options
  • Save seandavi/f62e136e8e016212d6f1658ccdf45aee to your computer and use it in GitHub Desktop.
Save seandavi/f62e136e8e016212d6f1658ccdf45aee to your computer and use it in GitHub Desktop.
Snakemake with s3 and custom profile
import boto3
# set the profile name based on ~/.aws/credentials entry
boto3.setup_default_session(profile_name='s3')
from snakemake.remote.S3 import RemoteProvider as S3RemoteProvider
s3 = S3RemoteProvider()
# This simply copies the file from local storage to s3
rule all:
input: "Snakefile"
output: s3.remote("big_rna/Snakefile.fun")
shell: "cp {input} {output}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment