29be125aaf00a06a7eb4a9e7c792119a41a6d622 max Thu Feb 23 12:02:57 2023 +0100 fixing typo in last commit, refs #30454 diff --git src/utils/chromToUcsc/chromToUcsc src/utils/chromToUcsc/chromToUcsc index 65c93dc..b2c44cb 100755 --- src/utils/chromToUcsc/chromToUcsc +++ src/utils/chromToUcsc/chromToUcsc @@ -195,31 +195,30 @@ row[fieldIdx] = ucscChrom line = sep.join(row) ofh.write(line) ofh.write("\n") def download(db): " download chromAlias file from UCSC " # Genark assemblies are in a different directory of the download server if "_" in db: p1 = db[0:3] p2 = db[4:7] p3 = db[7:10] p4 = db[10:13] url = "https://hgdownload.soe.ucsc.edu/hubs/%s/%s/%s/%s/%s/%s.chromAlias.txt" % (p1, p2, p3, p4, db, db) - asd else: url = "http://hgdownload.soe.ucsc.edu/goldenPath/%s/database/chromAlias.txt.gz" % db gzData = urlopen(url).read() if 'cStringIO' in modules: data = StringIO(gzData) else: data = BytesIO(gzData) data = gzip.GzipFile(fileobj=data).read().decode() outFname = db+".chromAlias.tsv" open(outFname, "w").write(data) print("Wrote %s to %s" % (url, outFname)) print("You can now convert a file with 'chromToUcsc -a %s -i infile.bed -o outfile.bed'" % outFname)