-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix loaders * fix download workflow * finishing touches' * revert version * improve ensembl release listing --------- Co-authored-by: Anthony Cesnik <[email protected]>
- Loading branch information
Showing
6 changed files
with
29 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,20 @@ | ||
# see https://www.ebi.ac.uk/training/online/sites/ebi.ac.uk.training.online/files/UniProt_programmatically_py3.pdf | ||
|
||
import get_proteome | ||
import requests | ||
import sys | ||
|
||
format = sys.argv[1] | ||
|
||
proteome = get_proteome.proteome | ||
BASE = 'http://legacy.uniprot.org' | ||
KB_ENDPOINT = '/uniprot/' | ||
TOOL_ENDPOINT = '/uploadlists/' | ||
|
||
# query = 'name:"polymerase alpha" AND proteome:UP000005640 AND reviewed:yes' | ||
# query = 'proteome:UP000005640 AND reviewed:yes' | ||
query = 'proteome:' + proteome | ||
BASE_URL = 'https://rest.uniprot.org' | ||
ENDPOINT = '/uniprot/search' | ||
|
||
payload = { | ||
'query': query, | ||
'query': proteome, | ||
'format': format, | ||
'include': 'yes', # include isoforms in fasta | ||
# 'columns': 'id,entry_name,reviewed,protein_names,organism,ec,keywords', | ||
'includeIsoforms': 'yes', # include isoforms in fasta | ||
} | ||
|
||
result = requests.get(BASE + KB_ENDPOINT, params=payload, stream=True) | ||
result = requests.get(BASE_URL + ENDPOINT, params=payload, stream=True) | ||
result.raise_for_status() # throw an error for bad status code | ||
for block in result.iter_content(1024): | ||
sys.stdout.buffer.write(block) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters