Mercurial > repos > dchristiany > data_manager_proteore
comparison data_manager/resource_building.py @ 35:b312ea6438a2 draft
planemo upload commit c89c5deac442c0c2aa52b24f2c5af4b290773fc0-dirty
| author | dchristiany |
|---|---|
| date | Mon, 28 Jan 2019 09:28:06 -0500 |
| parents | 0c0586ac3e29 |
| children | a4811c440b45 |
comparison
equal
deleted
inserted
replaced
| 34:0c0586ac3e29 | 35:b312ea6438a2 |
|---|---|
| 70 | 70 |
| 71 query="https://db.systemsbiology.net/sbeams/cgi/PeptideAtlas/GetProteins?&atlas_build_id="+ \ | 71 query="https://db.systemsbiology.net/sbeams/cgi/PeptideAtlas/GetProteins?&atlas_build_id="+ \ |
| 72 sample_category_id+"&display_options=ShowAbundances&organism_id="+organism_id+ \ | 72 sample_category_id+"&display_options=ShowAbundances&organism_id="+organism_id+ \ |
| 73 "&redundancy_constraint=4&presence_level_constraint=1%2C2&gene_annotation_level_constraint=leaf\ | 73 "&redundancy_constraint=4&presence_level_constraint=1%2C2&gene_annotation_level_constraint=leaf\ |
| 74 &QUERY_NAME=AT_GetProteins&action=QUERY&output_mode=tsv&apply_action=QUERY" | 74 &QUERY_NAME=AT_GetProteins&action=QUERY&output_mode=tsv&apply_action=QUERY" |
| 75 | |
| 76 print (query) | |
| 77 | 75 |
| 78 with requests.Session() as s: | 76 with requests.Session() as s: |
| 79 download = s.get(query) | 77 download = s.get(query) |
| 80 decoded_content = download.content.decode('utf-8') | 78 decoded_content = download.content.decode('utf-8') |
| 81 cr = csv.reader(decoded_content.splitlines(), delimiter='\t') | 79 cr = csv.reader(decoded_content.splitlines(), delimiter='\t') |
