bsi-pipeline 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50e0b28ec4df04a63b0d9c6a530b36c30e7072b7
4
- data.tar.gz: 58b68121e0ea1345f0321d00d46ef63f2f3b1a9c
3
+ metadata.gz: 11b6084509041d9383bbd7da9c598f8dd33b878c
4
+ data.tar.gz: 49ec957ecd98ab166fb42babf1a80117d24110a5
5
5
  SHA512:
6
- metadata.gz: 67ba71b202d5062375f2585f580f2dd589d520217ffe039b01de598e2877092b70078b56e7e1fbfea3d35872c41501b5570e2cf13c3d894f3e629f9c2d0353aa
7
- data.tar.gz: aeb9871c95343cc74790eee7bb9661dc280715d412d790be1dcab265504c6eb115b36ec15c3d326ababb59f363858ee530f41103a615855abf5fee5e32ee8c96
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
- num_seminal_parents = @specimens.select{|s| ['N/A', ''].include?( s.parent_id.to_s )}.length
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
- spec.sequence = i+1
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
@@ -1,5 +1,5 @@
1
1
  module Bsi
2
2
  module Pipeline
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
@@ -3,7 +3,7 @@ require'spec_helper'
3
3
  describe AddBatch do
4
4
  before :all do
5
5
  @bsi = RBC.new(
6
- { :user => 'ecog_bot',
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
@@ -3,12 +3,12 @@ require 'spec_helper'
3
3
  describe SpecimenImporter do
4
4
  before :each do
5
5
  key = {
6
- :user => 'ecog_bot',
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.6
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-07-31 00:00:00.000000000 Z
11
+ date: 2014-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler