ruby-igv 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -7
  3. data/lib/igv.rb +3 -3
  4. data/lib/igv/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 224cade620bf730aabd99e3f5369c10eea4a18714d5713148cd73044b7236ce8
4
- data.tar.gz: 11b31803bc1df5b2393f5d0c980caf7092aaf86defd94b89a88ed366e3dc318f
3
+ metadata.gz: 9610c6073f8aa07bc0a6d72ad5ea885caf0bca0810633cc51da6f56fdedb9162
4
+ data.tar.gz: 3e547657f35d6df732e555260cf3be51182eb1c153967aa18ed98f7896e85c28
5
5
  SHA512:
6
- metadata.gz: e8f1e9a25e9467ddcb0ddb8571b81910fb48e607ca898a34290a28b62533b1b617826c139f37008c019990db76a6e2a91fc500e6a0b740d24ba16ce7d3816bb9
7
- data.tar.gz: 0f9f95a3fc8cbdf52bee48f1830392b7f64594565de16fc5108f3af3ffc6aa2517e0af4035c44967122a27e1f2524f4e0370b4517d43f313ed869ce51d3b7468
6
+ metadata.gz: f41a575c7c740a008d099b3941a880b15a62c9b54bb3c2969677f36a98819f1fafcb16a0475a2da86c88bcfcf0d79dea149ca3f429a06bd49ac7a980d67c6582
7
+ data.tar.gz: 0126ef0bebc9e1b89d761a2f1acebd1f896498692320623fa27190cfcb91e17c8c08dbb8fbc39897a7957fde332534602abade7814b8694f8f02b80e2c230c84
data/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Ruby-IGV
2
2
 
3
- Using Integrative Genomics Viewer (IGV) with the Ruby language.
3
+ [![Gem Version](https://badge.fury.io/rb/ruby-igv.svg)](https://badge.fury.io/rb/ruby-igv)
4
+ [![Docs Latest](https://img.shields.io/badge/docs-latest-blue.svg)](https://rubydoc.info/gems/ruby-igv)
5
+ [![The MIT License](https://img.shields.io/badge/license-MIT-orange.svg)](LICENSE.txt)
6
+
7
+ Using [Integrative Genomics Viewer (IGV)](http://software.broadinstitute.org/software/igv/) with the Ruby language.
4
8
 
5
9
  Based on [brentp/bio-playground/igv](https://github.com/brentp/bio-playground).
6
10
 
@@ -14,12 +18,12 @@ gem install ruby-igv
14
18
 
15
19
  ```ruby
16
20
  igv = IGV.new
17
- igv.gnome 'hg19'
18
- igv.load 'http://www.broadinstitute.org/igvdata/1KG/pilot2Bams/NA12878.SLX.bam'
19
- igv.go 'chr1:45,600-45,800'
20
- igv.save '/tmp/r/region.svg'
21
- igv.save '/tmp/r/region.png'
22
- igv.send 'echo' #whatever
21
+ igv.genome 'hg19'
22
+ igv.load 'http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeUwRepliSeq/wgEncodeUwRepliSeqK562G1AlnRep1.bam'
23
+ igv.go 'chr18:78,016,233-78,016,640'
24
+ igv.save '/tmp/r/region.svg'
25
+ igv.save '/tmp/r/region.png'
26
+ igv.send 'echo' #whatever
23
27
  ```
24
28
 
25
29
  ## Contributing
data/lib/igv.rb CHANGED
@@ -7,7 +7,7 @@ class IGV
7
7
  class Error < StandardError; end
8
8
 
9
9
  attr_reader :host, :port, :snapshot_dir, :commands
10
- def initialize(host: '127.0.0.1', port: 60_151, snapshot_dir: '/tmp/igv')
10
+ def initialize(host: '127.0.0.1', port: 60_151, snapshot_dir: Dir.pwd)
11
11
  @host = host
12
12
  @port = port
13
13
  @commands = []
@@ -83,8 +83,8 @@ class IGV
83
83
  if file_path
84
84
  # igv assumes the path is just a single filename, but
85
85
  # we can set the snapshot dir. then just use the filename.
86
- dir_path = Pathname(File.expand_path(file_path)).dirname
87
- set_snapshot_dir(dir_path)
86
+ dir_path = File.dirname(file_path)
87
+ set_snapshot_dir(File.expand_path(dir_path)) if dir_path != '.'
88
88
  send 'snapshot ' + File.basename(file_path)
89
89
  else
90
90
  send 'snapshot'
@@ -1,3 +1,3 @@
1
1
  class IGV
2
- VERSION = '0.0.1'.freeze
2
+ VERSION = '0.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-igv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kojix2