Skip to content

Commit

Permalink
Python3: lib/galaxy/datatypes/converters/interval_to_bedstrict_conver…
Browse files Browse the repository at this point in the history
…ter.py
  • Loading branch information
tshtatland committed Jun 25, 2016
1 parent 1fadc33 commit c9ad6e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .ci/py3_sources.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ lib/galaxy/auth/
lib/galaxy/config.py
lib/galaxy/dataset_collections/
lib/galaxy/datatypes/binary.py
lib/galaxy/datatypes/converters/interval_to_bedstrict_converter.py
lib/galaxy/datatypes/converters/interval_to_coverage.py
lib/galaxy/dependencies/
lib/galaxy/eggs/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def __main__():
except:
name = "region_%i" % count
try:
fields = map( str, [ region.chrom, region.start, region.end, name, 0, region.strand ] )
fields = [str(item) for item in (region.chrom, region.start, region.end, name, 0, region.strand)]
if force_num_columns is not None and len( fields ) != force_num_columns:
fields = force_bed_field_count( fields, count, force_num_columns )
out.write( "%s\n" % '\t'.join( fields ) )
Expand All @@ -147,9 +147,9 @@ def __main__():
if first_skipped_line is None:
first_skipped_line = count + 1
out.close()
print "%i regions converted to BED." % ( count + 1 - skipped_lines )
print("%i regions converted to BED." % ( count + 1 - skipped_lines ))
if skipped_lines > 0:
print "Skipped %d blank or invalid lines starting with line # %d." % ( skipped_lines, first_skipped_line )
print("Skipped %d blank or invalid lines starting with line # %d." % ( skipped_lines, first_skipped_line ))

if __name__ == "__main__":
__main__()

0 comments on commit c9ad6e3

Please sign in to comment.