Class: HTS::Faidx
- Inherits:
-
Object
- Object
- HTS::Faidx
- Defined in:
- lib/hts/faidx.rb
Instance Attribute Summary collapse
-
#file_name ⇒ Object
readonly
Returns the value of attribute file_name.
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_name) ⇒ Faidx
constructor
A new instance of Faidx.
-
#size ⇒ Object
(also: #length)
the number of sequences in the index.
Constructor Details
Instance Attribute Details
#file_name ⇒ Object (readonly)
Returns the value of attribute file_name.
7 8 9 |
# File 'lib/hts/faidx.rb', line 7 def file_name @file_name end |
Instance Method Details
#cget ⇒ Object
FIXME: naming and syntax
51 |
# File 'lib/hts/faidx.rb', line 51 def cget; end |
#chrom_size(chrom) ⇒ Object Also known as: chrom_length
return the length of the requested chromosome.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/hts/faidx.rb', line 38 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
27 28 29 |
# File 'lib/hts/faidx.rb', line 27 def close LibHTS.fai_destroy(@fai) end |
#get ⇒ Object
FIXME: naming and syntax
54 |
# File 'lib/hts/faidx.rb', line 54 def get; end |
#size ⇒ Object Also known as: length
the number of sequences in the index.
32 33 34 |
# File 'lib/hts/faidx.rb', line 32 def size LibHTS.faidx_nseq(@fai) end |