ruby-igv

Gem Version Docs Latest The MIT License DOI

Installation

Requirement :

gem install ruby-igv

Quickstart

require 'igv'

igv = IGV.start # This launch IGV
igv.genome   'hg19'
igv.load     'http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/' \
             'wgEncodeUwRepliSeq/wgEncodeUwRepliSeqK562G1AlnRep1.bam'
igv.go       'chr18:78,016,233-78,016,640'
igv.snapshot 'region.png'
igv.exit

Usage

docs

See the list of Batch commands.

igv.commands # Show the IGV command reference in your browser

docs

send

Not all commands are implemented in Ruby. Commands that are not implemented can be sent using the send method.

igv.send("maxPanelHeight", 10)

Launch IGV

Launch IGV from Ruby scripot.

igv = IGV.start # launch IGV app using spawn

Open socket connection to IGV

igv = IGV.new   # create an IGV object. Then you will type `igv.connect`
igv = IGV.open  # create an IGV object and connect it to an already activated IGV.

Close IGV

The behavior of the following methods is different.

igv.close       # close the socket connection
igv.exit        # send exit command to IGV
igv.quit        # alias method to exit
igv.kill        # kill group pid created with IGV.start

Contributing

Do you need commit rights to my repository?
Do you want to get admin rights and take over the project?
If so, please feel free to contact me @kojix2.

Acknowledgement

This gem is strongly inspired by a Python script developed by Brent Pedersen.

License

The gem is available as open source under the terms of the MIT License.