tasci_merger 0.2.2 → 0.3.1

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: 00fc6d54856de52b4177c2e01db4583748854a53
4
- data.tar.gz: 4097c9807bef4d820121ddb49a5cc33e672ba4fe
3
+ metadata.gz: 954e2e96e4c21b8fb1f6e5b5c7ba7f5c3dac9dd5
4
+ data.tar.gz: 52f83f1f802fe89c54a3f524675b04cbbdcc3488
5
5
  SHA512:
6
- metadata.gz: 0bbe88091909e0b08395e202f120cf9104e8eda3ca94da48343a46e1e0f8ab253c10d6d7bc6e6ced2b58fcee145c838a6db197535b3f66fde39d957e05dfff53
7
- data.tar.gz: dd4753c3782d6e844d4836650e27c798340f1ad8616e47a88253809a3540f0a5e7537297d1e81fb6ed75c3d066c7e85d27c9aaf5d2548dd9fda7165b5e7a2cbf
6
+ metadata.gz: 10c2a5b74a095d0765cec187932112c089318eedbd0f4b918bac89b9401f13cb220cd83d0afee11c17d268efdc31341ae61ea3eda114f30f8f2a6ee3d9c485f6
7
+ data.tar.gz: 8d314b9b0a46f8e449170c972945b00d5195cc1459e6ebe8e1f2d7f292dd00012737f870abc88cfa6c405ed236280daf80a90df2fa13a07bd7e890b216e514df
data/lib/tasci_merger.rb CHANGED
@@ -137,6 +137,9 @@ class TasciMerger
137
137
  sem_merged_file = CSV.open(File.join(@output_directory, "#{@subject_code}_merged_sem_#{Time.zone.now.strftime("%Y%m%d")}.csv"), "wb")
138
138
  simple_merged_file << %w(SUBJECT_CODE LABTIME)
139
139
 
140
+ simple_sem_file = CSV.open(File.join(@output_directory, "#{@subject_code}_merged_simple_sem_#{Time.zone.now.strftime("%Y%m%d")}.csv"), "wb")
141
+ simple_sem_file << %w(SLEEP_STAGE LABTIME SEM_FLAG)
142
+
140
143
  previous_first_labtime = nil
141
144
  previous_last_labtime = nil
142
145
 
@@ -310,11 +313,13 @@ class TasciMerger
310
313
  output_line = [@subject_code.upcase, file_info[:sleep_wake_episode], line_labtime.to_decimal, line_event, sleep_period, sem_event]
311
314
  simple_output_line = [simple_line_event, line_labtime.to_decimal]
312
315
  sem_output_line = [@subject_code.upcase, line_labtime.to_decimal] if sem_event == 1
316
+ # 4th flie added
317
+ simple_sem = [simple_line_event, line_labtime.to_decimal, sem_event ]
313
318
 
314
319
  merged_file << output_line
315
320
  simple_merged_file << simple_output_line
316
321
  sem_merged_file << sem_output_line if sem_event == 1
317
-
322
+ simple_sem_file << simple_sem
318
323
  #MY_LOG.info fields
319
324
  end
320
325
 
@@ -330,6 +335,7 @@ class TasciMerger
330
335
  merged_file.close
331
336
  simple_merged_file.close
332
337
  sem_merged_file.close
338
+ simple_sem_file.close
333
339
  end
334
340
 
335
341
  end
data/tasci_merger.gemspec CHANGED
@@ -1,11 +1,11 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'tasci_merger'
3
- s.version = '0.2.2'
4
- s.date = '2017-03-26'
3
+ s.version = '0.3.1'
4
+ s.date = '2018-03-19'
5
5
  s.summary = "Merger utility for TASCI scored sleep files."
6
6
  s.description = "Merger utility for TASCI scored sleep files, built for the Division of Sleep and Circadian Disorders at BWH."
7
- s.authors = ["Piotr Mankowski"]
8
- s.email = 'pmankowski@partners.org'
7
+ s.authors = ["Piotr Mankowski", "Chenxi Gao"]
8
+ s.email = ['pmankowski@partners.org', 'cg342@bwh.harvard.edu']
9
9
  s.files = %w(LICENSE README.md tasci_merger.gemspec lib/tasci_merger.rb lib/man_merger.rb lib/labtime.rb)
10
10
  s.require_path = 'lib'
11
11
  s.homepage =
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tasci_merger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Mankowski
8
+ - Chenxi Gao
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2017-03-26 00:00:00.000000000 Z
12
+ date: 2018-03-19 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: activesupport
@@ -46,7 +47,9 @@ dependencies:
46
47
  version: '1'
47
48
  description: Merger utility for TASCI scored sleep files, built for the Division of
48
49
  Sleep and Circadian Disorders at BWH.
49
- email: pmankowski@partners.org
50
+ email:
51
+ - pmankowski@partners.org
52
+ - cg342@bwh.harvard.edu
50
53
  executables:
51
54
  - merge_tasci
52
55
  extensions: []