Skip to content

Instantly share code, notes, and snippets.

View jwillis0720's full-sized avatar

Jordan Willis jwillis0720

View GitHub Profile
@jwillis0720
jwillis0720 / index.js
Created April 22, 2020 02:03
retrieving all star wars persons
const { ApolloServer, gql } = require('apollo-server');
const fetch = require("node-fetch");
const typeDefs = `
type Query {
hello(name: String): String!
getPersons: Person!
}
from multiprocessing import Process
import time
class JobDistributor():
def __init__(self, jobs, limit=10, verbose=True):
self.jobs = jobs
self.limit = limit
self.verbose = verbose
self.sleep_time = 2
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{"nbformat_minor": 0, "cells": [{"source": "#Load DB", "cell_type": "markdown", "metadata": {}}, {"execution_count": 2, "cell_type": "code", "source": "from pandas import DataFrame", "outputs": [], "metadata": {"collapsed": false, "trusted": true}}, {"execution_count": 5, "cell_type": "code", "source": "import sqlite3 as sql\nconn = sql.connect(\"/ipython_notebooks/germ_database.db3\")\ncursor = conn.cursor()", "outputs": [], "metadata": {"collapsed": false, "trusted": true}}, {"source": "#Query and convert to dataframe", "cell_type": "markdown", "metadata": {}}, {"execution_count": 75, "cell_type": "code", "source": "cursor_execute_long = cursor.execute('''\nSELECT\n\tone.struct_id,\n one.resNum,\n score_types.score_type_name,\n one.score_value,\n rpi.pdb_residue_number,\n rpi.chain_id\n hc.pdbnum as \"mutant_res\",\n hc.germ,\n hc.wt\nFROM\n\tresidue_scores_1b one\nINNER JOIN score_types ON score_types.score_type_id = one.score_type_id\ninner join residues r on r.resNum = one.resNum
def (line):
l_s, l_l = line.split(), line.split().length()
holder = []
x = 0
y =0
for i in l_s:
holder.append(i)
x++;
y++;
holder.append(' ')
@jwillis0720
jwillis0720 / superimposer_align.py
Created February 19, 2014 17:49
superimposer_align.py
#!/usr/bin/env/python2.7
import sys
from Bio.Align.Applications import ClustalwCommandline as cw
import warnings
from multiprocessing import Pool
import argparse
import os
from Bio import AlignIO
from Bio.PDB import PDBExceptions
from Bio.PDB import PDBParser
Length variable value
1 1 Unique 154
2 2 Unique 258
3 3 Unique 370
4 4 Unique 548
5 5 Unique 16949
6 6 Unique 47841
7 7 Unique 60997
8 8 Unique 201506
function print_usage(){
print "###################################"
print "USAGE: awk -f /home/kaufmakw/scripts/get_fasta_by_gi.awk -v gi=<int> -v filename=<string> -v email=<email for NCBI logging>"
print "###################################"
print "This script calls wget to retrieve the fasta file from the ncbi database."
print "It accesses the sequence via the efetch eutils tool provided by NCBI"
print "NCBI requests that you provide an email address for tracking and logging pruposes"
print ""
}