bsi-pipeline 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bsi-pipeline/importer.rb +11 -3
- data/lib/bsi-pipeline/version.rb +1 -1
- data/spec/add_batch_spec.rb +1 -5
- data/spec/importer_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11b6084509041d9383bbd7da9c598f8dd33b878c
|
4
|
+
data.tar.gz: 49ec957ecd98ab166fb42babf1a80117d24110a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02b307658911575f375192be08971d1217e5175867ae01cf4cecd806be594f7c78dcca95a70430eaaf5a8e4b2ed352081dfd74b6ddba13515488212d2d5980c7
|
7
|
+
data.tar.gz: 541706c49e3fdb3ea41abbe11b4bcd972d46bcd3e43f79ea42189ad15928668f92fff31b289c1fe791bd27a2db5655a23aea5773bbe4180685fbf412be36fb4a
|
@@ -33,7 +33,11 @@ module Pipeline
|
|
33
33
|
|
34
34
|
def format
|
35
35
|
# Find out how many seminal parents there are
|
36
|
-
|
36
|
+
|
37
|
+
# Old way of estimating number of seminal parents, different now that we import in groups.
|
38
|
+
# num_seminal_parents = @specimens.select{|s| ['N/A', ''].include?( s.parent_id.to_s )}.length
|
39
|
+
|
40
|
+
num_seminal_parents = @specimens.map{|s| [s.date_drawn, s.specimen_type]}.uniq.length
|
37
41
|
|
38
42
|
fails = 0
|
39
43
|
begin
|
@@ -56,7 +60,11 @@ module Pipeline
|
|
56
60
|
specimen_family.each_with_index do |spec, i|
|
57
61
|
# Assign sample and sequence numbers
|
58
62
|
spec.sample_id = family_sample_id
|
59
|
-
|
63
|
+
unless specimen_family.length == 1
|
64
|
+
spec.sequence = i+1
|
65
|
+
else
|
66
|
+
spec.sequence = 0
|
67
|
+
end
|
60
68
|
end
|
61
69
|
end
|
62
70
|
end
|
@@ -74,7 +82,7 @@ module Pipeline
|
|
74
82
|
attr_accessor :specimens, :batches, :batch_delimiter
|
75
83
|
|
76
84
|
def initialize(key, options={})
|
77
|
-
@bsi = RBC.new(key)
|
85
|
+
@bsi = RBC.new(key, options)
|
78
86
|
@specimens = specimens
|
79
87
|
@batches = Array.new
|
80
88
|
end
|
data/lib/bsi-pipeline/version.rb
CHANGED
data/spec/add_batch_spec.rb
CHANGED
@@ -3,7 +3,7 @@ require'spec_helper'
|
|
3
3
|
describe AddBatch do
|
4
4
|
before :all do
|
5
5
|
@bsi = RBC.new(
|
6
|
-
{ :user => '
|
6
|
+
{ :user => 'biorepository_bot',
|
7
7
|
:pass => ENV['ECOG_BOT_PASS'],
|
8
8
|
:server => 'PCF',
|
9
9
|
:url => 'https://websvc-mirror.bsisystems.com:2271/bsi/xmlrpc'
|
@@ -74,8 +74,4 @@ describe AddBatch do
|
|
74
74
|
describe '#commit' do
|
75
75
|
it 'commits specimens in the batch to the BSI database if all edit checks pass'
|
76
76
|
end
|
77
|
-
|
78
|
-
after :all do
|
79
|
-
@bsi.common.logoff
|
80
|
-
end
|
81
77
|
end
|
data/spec/importer_spec.rb
CHANGED
@@ -3,12 +3,12 @@ require 'spec_helper'
|
|
3
3
|
describe SpecimenImporter do
|
4
4
|
before :each do
|
5
5
|
key = {
|
6
|
-
:user => '
|
6
|
+
:user => 'biorepository_bot',
|
7
7
|
:pass => ENV['ECOG_BOT_PASS'],
|
8
8
|
:server => 'PCF',
|
9
9
|
:url => 'https://websvc-mirror.bsisystems.com:2271/bsi/xmlrpc'
|
10
10
|
}
|
11
|
-
@importer = SpecimenImporter.new(key)
|
11
|
+
@importer = SpecimenImporter.new(key, {:instance => 'mirror', :debug => 'false'})
|
12
12
|
|
13
13
|
end
|
14
14
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bsi-pipeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elijah Christensen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|