Question: Pybiomart quering Ensembl Variation 101
0
gravatar for tomaszewskiolaf
8 weeks ago by
tomaszewskiolaf0 wrote:

I am using python library for quering biomart databases called pybiomart. Here are the docs and github:

https://github.com/jrderuiter/pybiomart https://readthedocs.org/projects/pybiomart/downloads/pdf/stable/

While I am using following parameters:

server = Server(host='http://www.ensembl.org') 
mart = server['ENSEMBL_MART_SNP'] 
dataset = mart['hsapiens_snp'] 
queried = dataset.query(attributes=['chr_name', 'chrom_start', 'chrom_end', 'variation_names','phenotype_description', 'refsnp_source'], filters={'chr_name': '15'})

it gives me following error. I checked filters and attributed for that dataset if they are correct. With standard dataset from the docs (hsapiens_gene_ensembl) it works. How can I solve this problem?

`Traceback (most recent call last): File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen chunked=chunked, File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 426, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.7/http/client.py", line 1354, in getresponse response.begin() File "/usr/lib/python3.7/http/client.py", line 306, in begin version, status, reason = self._read_status() File "/usr/lib/python3.7/http/client.py", line 275, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 727, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/urllib3/util/retry.py", line 403, in increment raise six.reraise(type(error), error, _stacktrace) File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/urllib3/packages/six.py", line 734, in reraise raise value.with_traceback(tb) File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen chunked=chunked, File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 426, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.7/http/client.py", line 1354, in getresponse response.begin() File "/usr/lib/python3.7/http/client.py", line 306, in begin version, status, reason = self._read_status() File "/usr/lib/python3.7/http/client.py", line 275, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/olaf/PycharmProjects/ensembl_cosmic/test.py", line 26, in filters={'chr_name': ['15']}) File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/pybiomart/dataset.py", line 262, in query response = self.get(query=ElementTree.tostring(root)) File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/pybiomart/base.py", line 107, in get r = requests.get(self.url, params=params) File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/requests/api.py", line 76, in get return request('get', url, params=params, *kwargs) File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, *kwargs) File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/requests_cache/core.py", line 136, in request *kwargs File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, *send_kwargs) File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/requests_cache/core.py", line 109, in send return send_request_and_cache_response() File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/requests_cache/core.py", line 97, in send_request_and_cache_response response = super(CachedSession, self).send(request, *kwargs) File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, *kwargs) File "/home/olaf/PycharmProjects/ensembl_cosmic/venv/lib/python3.7/site-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Process finished with exit code 1

ADD COMMENTlink written 8 weeks ago by tomaszewskiolaf0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1436 users visited in the last hour