Class: HTS::Faidx
- Inherits:
-
Object
- Object
- HTS::Faidx
- Defined in:
- lib/hts/faidx.rb
Instance Attribute Summary collapse
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
Instance Method Summary collapse
-
#cget ⇒ Object
FIXME: naming and syntax.
-
#chrom_size(chrom) ⇒ Object
(also: #chrom_length)
return the length of the requested chromosome.
- #close ⇒ Object
-
#get ⇒ Object
FIXME: naming and syntax.
-
#initialize(file_path) ⇒ Faidx
constructor
A new instance of Faidx.
-
#size ⇒ Object
(also: #length)
the number of sequences in the index.
Constructor Details
Instance Attribute Details
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
8 9 10 |
# File 'lib/hts/faidx.rb', line 8 def file_path @file_path end |
Instance Method Details
#cget ⇒ Object
FIXME: naming and syntax
52 |
# File 'lib/hts/faidx.rb', line 52 def cget; end |
#chrom_size(chrom) ⇒ Object Also known as: chrom_length
return the length of the requested chromosome.
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/hts/faidx.rb', line 39 def chrom_size(chrom) unless chrom.is_a?(String) || chrom.is_a?(Symbol) # FIXME raise ArgumentError, "Expect chrom to be String or Symbol" end chrom = chrom.to_s result = LibHTS.faidx_seq_len(@fai, chrom) result == -1 ? nil : result end |
#close ⇒ Object
28 29 30 |
# File 'lib/hts/faidx.rb', line 28 def close LibHTS.fai_destroy(@fai) end |
#get ⇒ Object
FIXME: naming and syntax
55 |
# File 'lib/hts/faidx.rb', line 55 def get; end |
#size ⇒ Object Also known as: length
the number of sequences in the index.
33 34 35 |
# File 'lib/hts/faidx.rb', line 33 def size LibHTS.faidx_nseq(@fai) end |