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
"""" Tested in Python 3.4 """ | |
import urllib.request | |
import http.client | |
http.client.HTTPConnection.debuglevel = 1 | |
response = urllib.request.urlopen('https://github.com/eweitz') |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- Include sviewer.js. Don't forget id="autoload"! --> | |
<script type="text/javascript" src="https://www.ncbi.nlm.nih.gov/projects/sviewer/js/sviewer.js" id="autoload"></script> | |
</head> | |
<body> | |
<h1>NCBI Sequence Viewer: Plasmodium falciparum strain 3D7, chromosome 1</h1> | |
<!-- | |
Sequence Viewer Embedding API: https://www.ncbi.nlm.nih.gov/tools/sviewer/embedding-api/ |
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
"""Python 3 script to get partial protein HGVS given NCBI dbSNP ID | |
Example: | |
$ python3 protein_hgvs_for_snp_id.py 334 | |
snp_id: | |
334 | |
gene: | |
{'name': 'HBB', 'gene_id': '3043'} | |
protein_change_hgvs: |
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
''' | |
This simple script shows how to use NCBI E-Utilies to get a chromosome's | |
RefSeq accession given the chromosome's name and its genome assembly. | |
Example: | |
$ python3 chr_rs_acc_via_eutils.py | |
RefSeq accession for chromosome 6 on genome assembly GRCh38 (GCF_000001405.26): | |
NC_000006.12 | |
''' |
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
"""Extract public study metadata using Python bindings for SCP REST API | |
See https://github.com/broadinstitute/single_cell_portal/issues/52 for context and usage notes. | |
""" | |
import argparse | |
import json | |
import pprint | |
import scp_api |
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
# Get number of pathways by organism in WikiPathways | |
# Graph of output: | |
# https://docs.google.com/spreadsheets/d/1zZSqeKufuYxfFd3pFeMAUOjCm1sLRAw5SgJ4OJel9M8/edit?usp=sharing | |
# Fetch all organisms in WikiPathways | |
curl -s https://webservice.wikipathways.org/listOrganisms?format=json | jq .organisms[] > organisms-wikipathways.json | |
# Fetch all pathways in WikiPathways | |
curl -s https://webservice.wikipathways.org/listPathways?format=json | jq . > all-wikipathways.json |
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
// This JavaScript code helps summarize recent changes for WikiPathways | |
// See output at e.g. https://github.com/wikipathways/wikipathways-help/discussions/124 | |
// | |
// To run: | |
// - Go to https://classic.wikipathways.org/index.php?title=Special:RecentPathwayChanges&limit=500&offset=0 | |
// - Open Developer Tools in your web browser | |
// - Update the `dates` array below | |
// - Execute code, e.g. by putting cursor at end of last line and pressing Return / Enter | |
// | |
// The output can be pasted into the "Recent changes" section for new Weekly Review Report entries |
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
"""Find less common string characters in Cell Ontology | |
Prints characters that aren't an ASCII letter, number, hyphen, space, or | |
underscore that appear among standard labels in Cell Ontology (CL). | |
This snippet helps get testing input for more robust ontology handling. | |
Tested on Python 3.10.9, without dependencies. Output as of 2024-08-02: | |
.=/[:]–><';,()+ | |
""" |