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.
- checksums.yaml +4 -4
- data/README.md +11 -7
- data/lib/igv.rb +3 -3
- data/lib/igv/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9610c6073f8aa07bc0a6d72ad5ea885caf0bca0810633cc51da6f56fdedb9162
|
4
|
+
data.tar.gz: 3e547657f35d6df732e555260cf3be51182eb1c153967aa18ed98f7896e85c28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f41a575c7c740a008d099b3941a880b15a62c9b54bb3c2969677f36a98819f1fafcb16a0475a2da86c88bcfcf0d79dea149ca3f429a06bd49ac7a980d67c6582
|
7
|
+
data.tar.gz: 0126ef0bebc9e1b89d761a2f1acebd1f896498692320623fa27190cfcb91e17c8c08dbb8fbc39897a7957fde332534602abade7814b8694f8f02b80e2c230c84
|
data/README.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Ruby-IGV
|
2
2
|
|
3
|
-
|
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.
|
18
|
-
igv.load
|
19
|
-
igv.go
|
20
|
-
igv.save
|
21
|
-
igv.save
|
22
|
-
igv.send
|
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:
|
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 =
|
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'
|
data/lib/igv/version.rb
CHANGED