Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/igv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ def max_panel_height(height)
# @example
# igv.color_by("SAMPLE")
# igv.color_by("TAG", "NM")
def color_by(option, tag)
def color_by(option, tag = nil)
send :colorBy, option, tag
end

Expand All @@ -572,7 +572,7 @@ def color_by(option, tag)
# @example
# igv.group("SAMPLE")
# igv.group("TAG", "NM")
def group(option, tag)
def group(option, tag = nil)
send :group, option, tag
end

Expand Down
4 changes: 4 additions & 0 deletions test/igv_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ def test_igv
assert_equal 'OK', @igv.goto('chr2')
assert_equal 'OK', @igv.snapshot('test.png')
assert_true File.exist?(File.expand_path('fixtures/test.png', __dir__))
assert_equal 'OK', @igv.color_by('READ_STRAND', nil)
assert_equal 'OK', @igv.color_by('READ_STRAND')
assert_equal 'OK', @igv.group('NONE', nil)
assert_equal 'OK', @igv.group('NONE')
end

def teardown
Expand Down