Not sure what I'm doing wrong here. It's possibly more likely that I can't figure out the instructions as opposed to there actually being something wrong.
I'm following the instructions to both run the docker (version tag 1.4.1) and install it natively. Both successfully run, giving me a container of a process in the background. When I then attempt to query a bam using either of the the methods documented here, i.e:
I get "server returned empty JSON ticket. It's probably not meant to do that, don't know why it is, but at least it is connecting.
When I attempt to query the test data in the container or using the natively installed one, I change the url to localhost - using the port that I specified for the docker, I get:
htsget http://localhost:3000/data/gcp/gatk-test-data/wgs_bam --reference-name=2 --start=1000 --end=20000 -O NA12878_2.bam
/home/bcurran/bin/miniconda3/envs/ga4gh/bin/htsget: error: 404 Client Error: Not Found:404 page not found
I am getting this using the api and the cli, which make me think there is a piece of instruction that I am missing. I have checked the docker to make sure that there is a relevant bam file in the correct location, there is. I have tried altering the url leaving the file path out, all of which returns the same error. I assuming that for this baseline test, I do not need to specify data sources in a config file?
The error, when using the API, is slightly longer, included below in case it's useful.
Traceback (most recent call last):
File "/home/bcurran/bin/miniconda3/envs/ga4gh/lib/python3.6/site-packages/htsget/io.py", line 94, in __get
response.raise_for_status()
File "/home/bcurran/bin/miniconda3/envs/ga4gh/lib/python3.6/site-packages/requests/models.py", line 851, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "testhtsget.py", line 6, in <module>
htsget.get(url, output)
File "/home/bcurran/bin/miniconda3/envs/ga4gh/lib/python3.6/site-packages/htsget/io.py", line 80, in get
manager.run()
File "/home/bcurran/bin/miniconda3/envs/ga4gh/lib/python3.6/site-packages/htsget/protocol.py", line 140, in run
self.__retry(self._handle_ticket_request)
File "/home/bcurran/bin/miniconda3/envs/ga4gh/lib/python3.6/site-packages/htsget/protocol.py", line 111, in __retry
method(*args)
File "/home/bcurran/bin/miniconda3/envs/ga4gh/lib/python3.6/site-packages/htsget/io.py", line 138, in _handle_ticket_request
first_piece = next(stream, "").decode(encoding)
File "/home/bcurran/bin/miniconda3/envs/ga4gh/lib/python3.6/site-packages/htsget/io.py", line 105, in _stream
response = self.__get(url, headers=headers, stream=True, timeout=self.timeout)
File "/home/bcurran/bin/miniconda3/envs/ga4gh/lib/python3.6/site-packages/htsget/io.py", line 98, in __get
raise exceptions.ClientError(str(he), response.text)
htsget.exceptions.ClientError: 404 Client Error: Not Found:404 page not found
Not sure what I'm doing wrong here. It's possibly more likely that I can't figure out the instructions as opposed to there actually being something wrong.
I'm following the instructions to both run the docker (version tag 1.4.1) and install it natively. Both successfully run, giving me a container of a process in the background. When I then attempt to query a bam using either of the the methods documented here, i.e:
I get "server returned empty JSON ticket. It's probably not meant to do that, don't know why it is, but at least it is connecting.
When I attempt to query the test data in the container or using the natively installed one, I change the url to localhost - using the port that I specified for the docker, I get:
I am getting this using the api and the cli, which make me think there is a piece of instruction that I am missing. I have checked the docker to make sure that there is a relevant bam file in the correct location, there is. I have tried altering the url leaving the file path out, all of which returns the same error. I assuming that for this baseline test, I do not need to specify data sources in a config file?
The error, when using the API, is slightly longer, included below in case it's useful.
Thanks Ben.