COSMIC mutation download does not work.
command tested:
pgatk cosmic-downloader -u email -p password -o cosmic_data
error:
File "/ibex/user/umerhm/pgatk/pgatk/cgenomes/cosmic_downloader.py", line 115, in download_mutation_file
self.download_file_cosmic(mutation_url, mutation_output_file, token)
File "/ibex/user/umerhm/pgatk/pgatk/cgenomes/cosmic_downloader.py", line 140, in download_file_cosmic
url = response.json()['url']
File "/usr/lib/python3.9/site-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/home/umerhm/.local/lib/python3.9/site-packages/simplejson/init.py", line 514, in loads
return _default_decoder.decode(s)
File "/home/umerhm/.local/lib/python3.9/site-packages/simplejson/decoder.py", line 386, in decode
obj, end = self.raw_decode(s)
File "/home/umerhm/.local/lib/python3.9/site-packages/simplejson/decoder.py", line 416, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
url_file is None even when the credentials are set. Possible change in sanger web services. see below for current docs on accessing files. The following is from the sanger website:
Cosmic_CancerGeneCensus_Tsv_v103_GRCh38.tar
Downloading using command line tools
- Generate an authentication string
Before you begin, you need to generate an authentication string using your registered email address and COSMIC password. Combine the email address and password and then encode them in Base64.
echo 'email@example.com:mycosmicpassword' | base64
This request will return a response containing your Base64 encoded string.
Keep this authentication string as you will use it for all your downloads. Regenerate the string only if you change your COSMIC password.
- Obtain a download URL
Make a request to the following URL, passing the authentication string from Step 1:
curl -H "Authorization: Basic <insert authorisation string from Step 1>" "https://cancer.sanger.ac.uk/api/mono/products/v1/downloads/scripted?path=grch38/cosmic/v103/Cosmic_CancerGeneCensus_Tsv_v103_GRCh38.tar&bucket=downloads"
E.g.: curl -H "Authorization: Basic ZW1haWxAZXhhbXBsZS5jb206bXljb3NtaWNwYXNzd29yZAo=" "https://cancer.sanger.ac.uk/api/mono/products/v1/downloads/scripted?path=GRCh37/actionability/v9/Actionability_AllData_Tsv_v9_GRCh37.tar&bucket=downloads"
- Download the data file
curl "Insert download link from step 2 between the quotes" --output
E.g.: curl "https://cog.sanger.ac.uk/cosmic/GRCh37/actionability/v9/Actionability_AllData_Tsv_v9_GRCh37.tar?AWSAccessKeyId=KFGH85D9KLWKC34GSl88&Expires=1521726406&Signature=Jf834Ck0%8GSkwd87S7xkvqkdfUV8%3D" --output Actionability_AllData_Tsv_v9_GRCh37.tar
Please note: The download link is valid for one hour, and you do not need to supply the authentication header for this request.
COSMIC mutation download does not work.
command tested:
pgatk cosmic-downloader -u email -p password -o cosmic_dataerror:
url_fileis None even when the credentials are set. Possible change in sanger web services. see below for current docs on accessing files. The following is from the sanger website: