File Download: GRCh38/cosmic/v87/CosmicBreakpointsExport.tsv.gz

If you haven't done so already, you will need to register before you can download data. Once registered, you can download COSMIC data files from the command line or via a script. You can read full details on our help pages. Downloading is a three stage process:

1. Generate an authentication string

Your first request needs to supply your registered email address and COSMIC password. We use HTTP Basic Auth to check your credentials, which requires you to combine your email address and password and then Base64 encode them. For example, using standard Unix command line tools:

echo "email@example.com:mycosmicpassword" | base64
ZW1haWxAZXhhbXBsZS5jb206bXljb3NtaWNwYXNzd29yZAo=

You can use the same authentication string for all of your downloads. You only need to re-generate the string if you change your COSMIC password.

2. Get a download link

Make a request to https://cancer.sanger.ac.uk/cosmic/file_download/GRCh38/cosmic/v87/CosmicBreakpointsExport.tsv.gz. You need to pass the authentication string to the server when you make your request. For example:

curl -H "Authorization: Basic ZW1haWxAZXhhbXBsZS5jb206bXljb3NtaWNwYXNzd29yZAo=" https://cancer.sanger.ac.uk/cosmic/file_download/GRCh38/cosmic/v87/CosmicBreakpointsExport.tsv.gz

That request will return a snippet of JSON containing the link that you need to use to download your file. For example:

{
    "url" : "https://cog.sanger.ac.uk/cosmic/GRCh38/cosmic/v87/CosmicBreakpointsExport.tsv.gz?AWSAccessKeyId=KFGH85D9KLWKC34GSl88&Expires=1521726406&Signature=Jf834Ck0%8GSkwd87S7xkvqkdfUV8%3D"
}

NOTE: use the URL that is returned by your own request; this URL will not work.

3. Download the data file

Extract the URL from the JSON response and make another request to that URL to download the file. For example:

curl "https://cog.sanger.ac.uk/cosmic/GRCh38/cosmic/v87/CosmicBreakpointsExport.tsv.gz?AWSAccessKeyId=KFGH85D9KLWKC34GSl88&Expires=1521726406&Signature=Jf834Ck0%8GSkwd87S7xkvqkdfUV8%3D"

NOTE: use the URL that is returned by your own request; this URL will not work.

You do not need to supply the authentication header on this request. Download links are valid for one hour.