commit/galaxy-central: jgoecks: Parse custom build len files using tabs rather than all whitespace; this matches the output produced by the tool 'Compute Sequence Length'
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/90a97c6aee95/ changeset: r4972:90a97c6aee95 user: jgoecks date: 2011-02-01 19:32:02 summary: Parse custom build len files using tabs rather than all whitespace; this matches the output produced by the tool 'Compute Sequence Length' affected #: 2 files (132 bytes) --- a/lib/galaxy/web/controllers/tracks.py Tue Feb 01 13:20:18 2011 -0500 +++ b/lib/galaxy/web/controllers/tracks.py Tue Feb 01 13:32:02 2011 -0500 @@ -313,8 +313,9 @@ for line in open( len_file ): if line.startswith("#"): continue - # LEN files are just whitespace separated - fields = line.split() + # LEN files have format: + # <chrom_name><tab><chrom_length> + fields = line.split("\t") manifest[fields[0]] = int(fields[1]) return manifest --- a/lib/galaxy/web/controllers/user.py Tue Feb 01 13:20:18 2011 -0500 +++ b/lib/galaxy/web/controllers/user.py Tue Feb 01 13:32:02 2011 -0500 @@ -1275,8 +1275,10 @@ counter = 0 f = open(new_len.file_name, "w") + # LEN files have format: + # <chrom_name><tab><chrom_length> for line in len_text.split("\n"): - lst = line.strip().split() + lst = line.strip().split("\t") if not lst or len(lst) < 2: lines_skipped += 1 continue Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket