cagnut_core 0.3.2 → 0.3.3

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: 45208b3f586da65477c5b699d8626bce76ecc66d
4
- data.tar.gz: cfc256daa53bc7daaa98031c49296c0164772857
3
+ metadata.gz: a6516527142754d04d34191b4358b7a70a9db61d
4
+ data.tar.gz: 3ac9bbf7c0b568d4058fd40027e924d26d773c4f
5
5
  SHA512:
6
- metadata.gz: e9c058af090d0e6d622524c239d81f8cb3b2ff3739a7aa52ab58e0c92d0924761a1d72ab1d0ee72a65d1b79adda86882775ebd01655f5abc2627feb4c336526c
7
- data.tar.gz: 2f1001b6c10b2089d159c8686ce63cb3e705a6cbc9edb0dc4560681847572f84ba6915bcbb5840d5475f701eda546a9bfbbbd66b03fa2a2164ef650347d508f9
6
+ metadata.gz: 2cac794d277b5b6075ca1df748c82c81ccd0a4c1396e7c30be2274f549af49cb79ce61a39f816ba2a36ef994cda25d693502fd8e4f2b050e550a72762d65a4ad
7
+ data.tar.gz: 7d8ffb98f78fd66f8d14ef5697e6c0d2683157160396a27962694e4bf619d5832e19509af0efa50a123287d6166c62028ff798e0d8cf89ab0000b058f4f513ed
File without changes
@@ -74,8 +74,10 @@ module Cagnut
74
74
  def ln_seq_txt_file sample, qseq_dir
75
75
  files =
76
76
  Dir.glob("#{sample['path']}/*_sequence.txt*") + Dir.glob("#{sample['path']}/*_qseq.txt*")
77
- files.each do |f|
78
- `ln -s #{f} #{qseq_dir} 2>/dev/null` if f.match sample['name']
77
+ check_file_size files
78
+ files.each do |file|
79
+ next unless file.match sample['name']
80
+ `ln -s #{file} #{qseq_dir} 2>/dev/null`
79
81
  end
80
82
  end
81
83
 
@@ -86,19 +88,27 @@ module Cagnut
86
88
  end
87
89
 
88
90
  def ln_fastq_file sample, flist, fastq_dir
91
+ check_file_size flist
89
92
  if %w(ONEFASTQ ONEFASTQSE).include? @config['info']['data_type']
90
93
  files_to_much? flist
91
94
  file_type = link_name flist, sample['name']
92
95
  seq_file = "#{fastq_dir}/#{file_type}"
93
96
  `ln -s #{flist[0]} #{seq_file} 2>/dev/null` if flist[0].match sample['name']
94
97
  else
95
- flist.each do |f|
96
- next unless f.match sample['name']
97
- `ln -s #{f} #{fastq_dir} 2>/dev/null`
98
+ flist.each do |file|
99
+ next unless file.match sample['name']
100
+ `ln -s #{file} #{fastq_dir} 2>/dev/null`
98
101
  end
99
102
  end
100
103
  end
101
104
 
105
+ def check_file_size flist, previous_size=0
106
+ flist.each do |file|
107
+ file_size = File.size(file)
108
+ abort "#{file} is empty." unless file_size > 0
109
+ end
110
+ end
111
+
102
112
  def link_name flist, sample_name
103
113
  if flist[0].match '.gz'
104
114
  "#{sample_name}_sequence.txt.gz"
@@ -1,3 +1,3 @@
1
1
  module CagnutCore
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cagnut_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shi-Gang Wang
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-11-11 00:00:00.000000000 Z
12
+ date: 2016-12-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -101,7 +101,7 @@ email:
101
101
  - tsechingho@goldenio.com
102
102
  executables:
103
103
  - cagnut
104
- - stat
104
+ - stat_lsf_output
105
105
  extensions: []
106
106
  extra_rdoc_files: []
107
107
  files:
@@ -117,7 +117,7 @@ files:
117
117
  - bin/setup
118
118
  - cagnut_core.gemspec
119
119
  - exe/cagnut
120
- - exe/stat
120
+ - exe/stat_lsf_output
121
121
  - lib/cagnut.rb
122
122
  - lib/cagnut/cli/new_project.rb
123
123
  - lib/cagnut/cli/pipeline.rb