NetAnalyzer 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c09e22b1a1867c0ab7c8f8a07214d05d68b3411f
4
- data.tar.gz: 3343dd6ae5b60ba7916089118e8e7079db022b2b
3
+ metadata.gz: 35cb3956bb731175602f6149bce80bec19e11d67
4
+ data.tar.gz: d0b3127557d53140681054dd73f85b781b823408
5
5
  SHA512:
6
- metadata.gz: e2d887cb3d500aa68f45f880f5e25405e186f7658f851c7a9c1a3124ea79263b905671fa244dfbaf6c0c5e8dd13c084af7762493e2b9b02ecb1be08b6ef0b01e
7
- data.tar.gz: 23958924d092afdfe317a8ba87b6ea4578e74794ce311ef4549cd0a74e88f8dbe0dd60fcf8dc9179ac591652c9254f615f46965ae1c5b98ba5f00e67761b3773
6
+ metadata.gz: 7848fe8950d1e7ce9ce1a2f74e427a7ff0825cfce3994bfb69580323d5e08b46981810749a1091c8a7fd3e2b7bd0c7e95a265d59e43dbae6f73695ed0e48eb8e
7
+ data.tar.gz: ff6a98cce36dad00ef8f9eb015343117d8128fd6ddc5f4ade641edc69fb87ad0e4dcb1ecb731caaa2de42bd2a19b3f4b6c23d148e972bc2ecda7a8a8cb1e72d8
@@ -24,5 +24,4 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "rspec", "~> 3.0"
25
25
  spec.add_dependency "nmatrix"
26
26
  spec.add_dependency "bigdecimal"
27
- spec.add_dependency "benchmark"
28
27
  end
data/README.md CHANGED
@@ -1,28 +1,54 @@
1
1
  # NetAnalyzer
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/NetAnalyzer`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ NetAnalyzer is a network analysis tool that can be used to calculate the associations between nodes in unweighted n-partite networks [1]. The calculation of the association between nodes is based on similarity indices (Jaccard, Simpson, geometric and cosine), statistic-based (Pearson correlation coefficient, CSI and hypergeometric) [2] and a special metric designed only for tripartite networks (here called as 'transference' method [3]). The user can choose the association index method according to the network to analyse. The tool gives a table of results, with all the associations between nodes and the association value calculated.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ If you use this tool, please cite us: E. Rojano, P. Seoane, A. Bueno, J. R. Perkins & J. A. G. Ranea. Revealing the Relationship Between Human Genome Regions and Pathological Phenotypes Through Network Analysis. Lecture Notes in Computer Science, Vol 10208, 197-207 (2017).
6
6
 
7
7
  ## Installation
8
8
 
9
- Add this line to your application's Gemfile:
9
+ Linux & MacOS:
10
10
 
11
- ```ruby
12
- gem 'NetAnalyzer'
11
+ Please, check before your Ruby compiler (it has to be clang to install nmatrix)
12
+
13
+ ```
14
+ ruby -rrbconfig -e 'puts RbConfig::MAKEFILE_CONFIG["CC"]'
13
15
  ```
14
16
 
15
- And then execute:
17
+ If not, install RVM (https://rvm.io/), and then:
18
+
19
+ ```
20
+ rvm reinstall 2.4.1 --with-gcc=clang --with-cxx=clang++
21
+ git clone https://github.com/SciRuby/nmatrix.git
22
+ cd nmatrix
23
+ gem install bundler
24
+ bundle install
25
+ bundle exec rake compile
26
+ bundle exec rake spec
27
+ ```
16
28
 
17
- $ bundle
29
+ Once nmatrix gem is installed:
18
30
 
19
- Or install it yourself as:
31
+ ````ruby
32
+ gem install 'NetAnalyzer'
33
+ ```
20
34
 
21
- $ gem install NetAnalyzer
22
35
 
23
36
  ## Usage
24
37
 
25
- TODO: Write usage instructions here
38
+ The program NetAnalyzer.rb can analyse an unweighted network to calculate the association index between different nodes.
39
+
40
+ An example of use can be the following:
41
+
42
+ $ NetAnalyzer.rb NetAnalyzer.rb -i network.txt -l 'hpo,HP:;patients,[0-9]' -m hypergeometric -u 'hpo;patients' -a 'associations_file.txt'
43
+
44
+ Where:
45
+
46
+ ```
47
+ -i: Input file with the network to analyse. It must have two columns (separated by default by tabs) that represents the nodes that are related (NodeA\tNodeB). Please if you have doubts about the format, check the example providen.
48
+ -l: Layers construction. Please consider that, depending on the n-partite network you provide, NetAnalyzer will transform it into a bipartite one to perform the analysis (excepting if the association method used is 'transference'). The layers must contain a identifier of the node, and a character or pattern to identify. In this example, the bipartite network has HPO terms (with 'HP:' string in each of them) and patients that have these HPO terms (they are given as numerical patient IDs). Both layers must be separated by ';'.
49
+ -m: Association method. There are 8 different association methods to choose: 'jaccard', 'cosine', 'pcc', 'csi', 'hypergeometric', 'simpson', 'geometric' and 'transference'.
50
+ -a: Associations output file name. Here you can find the associations between nodes in the network and the calculated association value, according to the chosen method.
51
+ ```
26
52
 
27
53
  ## Development
28
54
 
@@ -1,3 +1,3 @@
1
1
  module NetAnalyzer
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: NetAnalyzer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elena Rojano, Pedro Seoane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-19 00:00:00.000000000 Z
11
+ date: 2018-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: benchmark
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
83
  description: NetAnalyzer is a useful network analysis tool developed in Ruby that
98
84
  can 1) analyse any type of unweighted network, regardless of the number of layers,
99
85
  2) calculate the relationship between different layers, using various association