mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
PEP-8 fixes.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
cron/parse_builds.py
|
||||
lib/galaxy/auth
|
||||
lib/galaxy/config.py
|
||||
lib/galaxy/datatypes/data.py
|
||||
|
||||
@@ -15,6 +15,7 @@ try:
|
||||
except IndexError:
|
||||
URL = "http://genome.cse.ucsc.edu/cgi-bin/das/dsn"
|
||||
|
||||
|
||||
def getbuilds(url):
|
||||
try:
|
||||
page = urllib.urlopen(url)
|
||||
@@ -35,21 +36,20 @@ def getbuilds(url):
|
||||
print "?\tunspecified (?)"
|
||||
for dsn in tree:
|
||||
build = dsn.find("SOURCE").attrib['id']
|
||||
description = dsn.find("DESCRIPTION").text.replace(" - Genome at UCSC","").replace(" Genome at UCSC","")
|
||||
description = dsn.find("DESCRIPTION").text.replace(" - Genome at UCSC", "").replace(" Genome at UCSC", "")
|
||||
|
||||
fields = description.split(" ")
|
||||
temp = fields[0]
|
||||
for i in range(len(fields)-1):
|
||||
if temp == fields[i+1]:
|
||||
fields.pop(i+1)
|
||||
for i in range(len(fields) - 1):
|
||||
if temp == fields[i + 1]:
|
||||
fields.pop(i + 1)
|
||||
else:
|
||||
temp = fields[i+1]
|
||||
temp = fields[i + 1]
|
||||
description = " ".join(fields)
|
||||
yield [build,description]
|
||||
yield [build, description]
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) > 1:
|
||||
URL = sys.argv[1]
|
||||
for build in getbuilds(URL):
|
||||
print build[0]+"\t"+build[1]+" ("+build[0]+")"
|
||||
|
||||
print build[0] + "\t" + build[1] + " (" + build[0] + ")"
|
||||
|
||||
Reference in New Issue
Block a user