Created
February 24, 2016 16:40
-
-
Save bryan-lunt/6b45d309a703a300a3c0 to your computer and use it in GitHub Desktop.
Getter for FlyFactorSurvey 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
#!/usr/bin/env python | |
import BeautifulSoup as BS | |
import argparse | |
parser = argparse.ArgumentParser() | |
args, other = parser.parse_known_args() | |
symbols=["ind","kni","bcd"] | |
import requests | |
def get_gene_pwm(gene_symbol): | |
foo = requests.post("http://mccb.umassmed.edu/ffs/SearchAction.php",{"Source":"AnyPWM","searchType":"searchTF","Searchterm":"GeneSymbol","Searchvalue":gene_symbol}) | |
foosoup = BS.BeautifulSoup(foo.content) | |
FBID = foosoup.find(id="datalist").table.tbody.tr.findAll("td")[0].a.text | |
bar = requests.get("http://mccb.umassmed.edu/ffs/TFdetails.php?FlybaseID=%s" % FBID) | |
barsoup = BS.BeautifulSoup(bar.content) | |
get_gene_pwm("dl") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment