This file contains hidden or 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
import requests | |
import json | |
from collections import Counter | |
import pandas as pd | |
file_name = "/Users/Dani/OneDrive/GenDataPro/TFs.txt" | |
with open(file_name) as gene_text: | |
gene_file = gene_text.read() | |
gene_ids = gene_file.split() |
This file contains hidden or 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
import time | |
try: | |
from queue import Queue | |
except ImportError: | |
from Queue import Queue | |
from threading import Thread | |
import requests | |
import json | |
from collections import Counter | |
import pandas as pd |
This file contains hidden or 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
import requests | |
import sys | |
import json | |
gene_id = "ENSG00000196498" | |
response = requests.get("http://rest.ensembl.org/lookup/id/{}?content-type=application/json;expand=1".format(gene_id)) | |
json_data = response.content.decode("utf-8") | |
data = json.loads(json_data) |
This file contains hidden or 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
import json | |
import requests, sys | |
gene_id = "ENSG00000139618" | |
gene_name = "NCOR2" | |
species = "homo_sapiens" | |
transcript = "ENSP00000384018" | |
response_isoform = requests.get("http://rest.ensembl.org/lookup/id/{}?content-type=application/json;expand=2".format(gene_id)) | |
json_data_isoform = response_isoform.content.decode("utf-8") |
This file contains hidden or 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
import requests | |
import sys | |
import json | |
#gene_id = [line.strip() for line in open("C:/name/MyDocuments/numbers", 'r')] | |
gene_id = ["ENSG00000196498", "ENSG00000157764", "ENSG00000139618", "ENSMUSG00000041147"] | |
for gene in gene_id: | |
new_gene = gene |
This file contains hidden or 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
import json | |
import requests, sys | |
gene_id = "ENSG00000139618" | |
gene_name = "NCOR2" | |
species = "homo_sapiens" | |
transcript = "ENSP00000384018" | |
response_isoform = requests.get("http://rest.ensembl.org/lookup/id/{}?content-type=application/json;expand=2".format(gene_id)) | |
json_data_isoform = response_isoform.content.decode("utf-8") |
This file contains hidden or 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
import sys | |
import json | |
gene_id = "NCOR2" | |
response = requests.get("http://rest.ensembl.org/lookup/symbol/homo_sapiens/{}?content-type=application/json;expand=1".format(gene_id)) | |
json_data = response.content.decode("utf-8") | |
data = json.loads(json_data) |
This file contains hidden or 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
import requests, sys | |
import json | |
gene_id = "NCOR2" | |
response = requests.get("http://rest.ensembl.org/lookup/symbol/homo_sapiens/{}?content-type=application/json;expand=1".format(gene_id)) | |
json_data = response.content.decode("utf-8") | |
data = json.loads(json_data) |