Mercurial > repos > rmarenco > hubarchivecreator
comparison util/subtools.py @ 24:fcc1021bd496 draft
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 93e2e2fb59f99677425104a80c17f665fa7b2b4a-dirty
author | yating-l |
---|---|
date | Wed, 31 May 2017 11:35:16 -0400 |
parents | 884ee2a71680 |
children | 99dad5f9444c |
comparison
equal
deleted
inserted
replaced
23:2677f1899aa8 | 24:fcc1021bd496 |
---|---|
248 #santitize trackName. Because track name must begin with a letter and | 248 #santitize trackName. Because track name must begin with a letter and |
249 # contain only the following chars: [a-zA-Z0-9_]. | 249 # contain only the following chars: [a-zA-Z0-9_]. |
250 # See the "track" Common settings at: | 250 # See the "track" Common settings at: |
251 #https://genome.ucsc.edu/goldenpath/help/trackDb/trackDbHub.html#bigPsl_-_Pairwise_Alignments | 251 #https://genome.ucsc.edu/goldenpath/help/trackDb/trackDbHub.html#bigPsl_-_Pairwise_Alignments |
252 def fixName(filename): | 252 def fixName(filename): |
253 if filename == 'cytoBandIdeo': | |
254 return filename | |
253 valid_chars = "_%s%s" % (string.ascii_letters, string.digits) | 255 valid_chars = "_%s%s" % (string.ascii_letters, string.digits) |
254 sanitize_name = ''.join([c if c in valid_chars else '_' for c in filename]) | 256 sanitize_name = ''.join([c if c in valid_chars else '_' for c in filename]) |
255 sanitize_name = "gonramp_" + sanitize_name | 257 sanitize_name = "gonramp_" + sanitize_name |
256 return sanitize_name | 258 return sanitize_name |