Class: Bio::Sam::File
- Inherits:
-
Object
- Object
- Bio::Sam::File
- Defined in:
- lib/bio-sambamba/samfile.rb
Overview
Class providing access to SAM files
Instance Method Summary collapse
-
#alignments ⇒ Object
Returns an AlignmentIterator object for iterating over all alignments in the file.
-
#header ⇒ Object
SAM header.
-
#initialize(filename) ⇒ File
constructor
Creates an object for access to SAM file.
Constructor Details
#initialize(filename) ⇒ File
Creates an object for access to SAM file
9 10 11 |
# File 'lib/bio-sambamba/samfile.rb', line 9 def initialize(filename) @filename = filename end |
Instance Method Details
#alignments ⇒ Object
Returns an AlignmentIterator object for iterating over all alignments in the file
19 20 21 |
# File 'lib/bio-sambamba/samfile.rb', line 19 def alignments Bio::Bam::AlignmentIterator.new ['sambamba', '--format=json', '-S', @filename] end |