bix 0.0.1
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.
- data/lib/bix.rb +1 -0
- data/lib/bix/fastq.rb +28 -0
- metadata +55 -0
data/lib/bix.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "#{File.dirname(__FILE__)}/bix/fastq"
|
data/lib/bix/fastq.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
class Fastq
|
2
|
+
attr_accessor :header, :seq, :qual, :invalid
|
3
|
+
|
4
|
+
def initialize(header="", seq="", qual="")
|
5
|
+
@header = header
|
6
|
+
@seq = seq
|
7
|
+
@qual = qual
|
8
|
+
end
|
9
|
+
|
10
|
+
def from_io(io)
|
11
|
+
@header = io.gets
|
12
|
+
@seq = io.gets
|
13
|
+
io.gets #plus line
|
14
|
+
@qual = io.gets
|
15
|
+
|
16
|
+
return false if @header == nil || @seq == nil || @qual == nil
|
17
|
+
return true
|
18
|
+
end
|
19
|
+
|
20
|
+
def qual_val(i)
|
21
|
+
return @qual[i].ord
|
22
|
+
end
|
23
|
+
|
24
|
+
def to_lines
|
25
|
+
return "#{@header}\n#{@seq}\n+\n#{@qual}"
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bix
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.0.1
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Jesse Rodriguez
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-08-09 00:00:00 Z
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: Lightweight bioinformatics tools for Ruby, with a focus on next-gen sequencing
|
17
|
+
email: jesserod@cs.stanford.edu
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files: []
|
23
|
+
|
24
|
+
files:
|
25
|
+
- lib/bix.rb
|
26
|
+
- lib/bix/fastq.rb
|
27
|
+
homepage: http://rubygems.org/gems/bix
|
28
|
+
licenses: []
|
29
|
+
|
30
|
+
post_install_message:
|
31
|
+
rdoc_options: []
|
32
|
+
|
33
|
+
require_paths:
|
34
|
+
- lib
|
35
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
36
|
+
none: false
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: "0"
|
41
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: "0"
|
47
|
+
requirements: []
|
48
|
+
|
49
|
+
rubyforge_project:
|
50
|
+
rubygems_version: 1.8.5
|
51
|
+
signing_key:
|
52
|
+
specification_version: 3
|
53
|
+
summary: Lightweight bioinformatics tools for Ruby
|
54
|
+
test_files: []
|
55
|
+
|