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
#!/usr/bin/python3 | |
# Example script that queries UCSC DAS servers to retrieve 50 bases of sequence regions | |
# specified in an input file (format: chr5 + 12345) | |
import csv | |
from urllib.request import FancyURLopener | |
urlOpener = FancyURLopener() |
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
#!/usr/bin/python3 | |
""" | |
Example script to copy protein-lncRNA interactions from an input CSV file to a Neo4j Database | |
Example input file (header line expected, first 2 columns are protein identifiers): | |
Source,UniprotName,Target,lncRNA_name | |
NM_006428,RM28_HUMAN,ENSG00000278995,Z69720.3 | |
""" |
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
/* | |
Example Node.js script to submit NCBI-BLAST sequence similarity searches | |
on EMBL-EBI compute farms, input files can include multiple sequences. | |
Before running this script install required node.js libraries: | |
> npm install node-rest-client fasta-parser minimist querystring fs | |
Example command line: | |
> node ebi-sss-nodejs-rest-client.js\ | |
--qseqsfile=your/query/sequences.fasta\ |
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
/* | |
Example Node.js script to submit NCBI-BLAST sequence similarity searches | |
to NCBI compute farms. | |
https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=BlastDocs&DOC_TYPE=DeveloperInfo | |
1.) Do not contact the server more often than once every three seconds. | |
2.) Do not poll for any single RID more often than once a minute. | |
3.) Use the URL parameter email, and tool, so that we can track your project | |
and contact you if there is a problem. | |
4.) Run scripts weekends or between 9 pm and 5 am Eastern Time weekday |
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
#!/usr/bin/python | |
""" | |
Call genenames.org Biomart REST service to get gene names | |
and symbols for a given list of Ensembl gene ids. | |
Since this script uses the fetch API for each individual ID it is not fast | |
for large number of ids. | |
Script biomartxmlquery_gene_names_symbols.py[1] uses XML bulk queries | |
and is much faster when the number of ids are large. | |
[1] https://bitbucket.org/hspsdb/biomart-sample-clients/src | |
""" |
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
#!/usr/bin/python | |
""" | |
Script to call genenames.org Biomart xml query service to get gene names | |
and symbols for a given list of Ensembl gene ids | |
Usage: | |
> ./biomartxmlquery_gene_names_symbols.py --inputFile ensgeneids.txt > results.tsv | |
Input file: one Ensembl gene id per line | |
""" |
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
#!/usr/bin/env python | |
# Sample UniProt sequence isoforms query | |
import requests | |
uniprotid = "P00750" | |
params = {"query": uniprotid, "format": "fasta", "include": "yes"} | |
response = requests.get("http://www.uniprot.org/uniprot/", params=params) |