ngs_server 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -406,7 +406,7 @@ void ConvertTool::ConvertToolPrivate::PrintJson(const BamAlignment& a) {
406
406
  }
407
407
 
408
408
  // write alignment's source BAM file
409
- m_out << "\"filename\":" << a.Filename << ",";
409
+ m_out << "\"filename\":\"" << a.Filename << "\",";
410
410
 
411
411
  // write tag data
412
412
  const char* tagData = a.TagData.c_str();
@@ -487,7 +487,7 @@ void ConvertTool::ConvertToolPrivate::PrintJson(const BamAlignment& a) {
487
487
  m_out << "}";
488
488
  }
489
489
 
490
- m_out << "}" << endl;
490
+ m_out << "}," << endl;
491
491
  }
492
492
 
493
493
  // print BamAlignment in SAM format
@@ -1,3 +1,3 @@
1
1
  module NgsServer
2
- VERSION = "0.3"
2
+ VERSION = "0.4"
3
3
  end
data/lib/ngs_server.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'sinatra'
3
3
  require 'sinatra/base'
4
+ require 'json'
4
5
 
5
6
 
6
7
  class MyNgsServer < Sinatra::Base
@@ -44,8 +45,8 @@ class MyNgsServer < Sinatra::Base
44
45
  response['Access-Control-Allow-Origin'] = '*';
45
46
 
46
47
  # invoke with eg: base_url/json/vcf/file=ALL.2of4intersection.20100804.sites.vcf.gz?min=6992179&max=6992190&segment=1
47
- list = `find -L #{datapath} -name '*#{params['extension']}' | awk -F#{datapath}/ '{print $2}'`
48
- list
48
+ list = `find -L #{datapath} -name '*#{params['extension']}' | awk -F#{datapath}/ '{print $2}'`
49
+ list.split("\n").to_json
49
50
 
50
51
  end
51
52
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: ngs_server
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: "0.3"
5
+ version: "0.4"
6
6
  platform: ruby
7
7
  authors:
8
8
  - Chase Miller
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-12-19 00:00:00 -05:00
13
+ date: 2011-12-20 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency