Limits...
Bio-samtools: Ruby bindings for SAMtools, a library for accessing BAM files containing high-throughput sequence alignments.

Ramirez-Gonzalez RH, Bonnal R, Caccamo M, Maclean D - Source Code Biol Med (2012)

Bottom Line: The SAMtools utilities are implemented in C and provide an API for programmatic access, to help make this functionality available to programmers wishing to develop in the high level Ruby language we have developed bio-samtools, a Ruby binding to the SAMtools library.The utility of SAMtools is encapsulated in 3 main classes, Bio::DB::Sam, representing the alignment files and providing access to the data in them, Bio::DB::Alignment, representing the individual read alignments inside the files and Bio::DB::Pileup, representing the summarised nucleotides of reads over a single point in the nucleotide sequence to which the reads are aligned.Bio-samtools is a flexible and easy to use interface that programmers of many levels of experience can use to access information in the popular and common SAM/BAM format.

View Article: PubMed Central - HTML - PubMed

Affiliation: The Sainsbury Laboratory, Norwich Research Park, Colney Lane, Norwich, NR4 7UH, UK. dan.maclean@tsl.ac.uk.

ABSTRACT

Background: The SAMtools utilities comprise a very useful and widely used suite of software for manipulating files and alignments in the SAM and BAM format, used in a wide range of genetic analyses. The SAMtools utilities are implemented in C and provide an API for programmatic access, to help make this functionality available to programmers wishing to develop in the high level Ruby language we have developed bio-samtools, a Ruby binding to the SAMtools library.

Results: The utility of SAMtools is encapsulated in 3 main classes, Bio::DB::Sam, representing the alignment files and providing access to the data in them, Bio::DB::Alignment, representing the individual read alignments inside the files and Bio::DB::Pileup, representing the summarised nucleotides of reads over a single point in the nucleotide sequence to which the reads are aligned.

Conclusions: Bio-samtools is a flexible and easy to use interface that programmers of many levels of experience can use to access information in the popular and common SAM/BAM format.

No MeSH data available.


bio-samtools and its relationship to the underlying libbam. Green boxes indicate C source code in libbam, red boxes indicate Ruby files that interact the Ruby FFI represented in yellow.
© Copyright Policy - open-access
Related In: Results  -  Collection

License
getmorefigures.php?uid=PMC3473260&req=5

Figure 1: bio-samtools and its relationship to the underlying libbam. Green boxes indicate C source code in libbam, red boxes indicate Ruby files that interact the Ruby FFI represented in yellow.

Mentions: The bio-samtools package is a wrapper around libbam.so (for Linux) and libbam.1.dylib (for Mac OS X), the core shared object library from the SAMtools package. To make it possible for the C functions in libbam to be called from within Ruby code we have used the Ruby Foreign Function Interface (FFI) [11] package as a bridge between the two languages. The flexible FFI package can programatically load dynamic libraries and bind functions without the need to make changes to Ruby itself or to recompile any extensions, so our package can easily run on standard Ruby interpreters without installation and compilation issues beyond that of the normal Ruby gem installation. Importantly, FFI also has useful methods for managing memory, pointers, structs and binary fields are converted to Ruby boolean variables. A further advantage of using FFI is that the binding is compatible with both the standard Ruby interpreter Matz’s Ruby Interpreter (MRI) and the alternative Java implementation of the Ruby language (JRUBY). By wrapping SAMtools in this way the scientist may use the high level easily learned and fast to develop with Ruby that facilitates quick development rather than the native C of SAMtools. bio-samtools hides the low-level API completely making bio-samtools a useful and easily used tool for working with Next-Generation Sequencing data in BAM files. Each .c library from the SAMtools API is represented by a separate Ruby module mapping the C functions (Figure 1), which are unified in the class Sam.


Bio-samtools: Ruby bindings for SAMtools, a library for accessing BAM files containing high-throughput sequence alignments.

Ramirez-Gonzalez RH, Bonnal R, Caccamo M, Maclean D - Source Code Biol Med (2012)

bio-samtools and its relationship to the underlying libbam. Green boxes indicate C source code in libbam, red boxes indicate Ruby files that interact the Ruby FFI represented in yellow.
© Copyright Policy - open-access
Related In: Results  -  Collection

License
Show All Figures
getmorefigures.php?uid=PMC3473260&req=5

Figure 1: bio-samtools and its relationship to the underlying libbam. Green boxes indicate C source code in libbam, red boxes indicate Ruby files that interact the Ruby FFI represented in yellow.
Mentions: The bio-samtools package is a wrapper around libbam.so (for Linux) and libbam.1.dylib (for Mac OS X), the core shared object library from the SAMtools package. To make it possible for the C functions in libbam to be called from within Ruby code we have used the Ruby Foreign Function Interface (FFI) [11] package as a bridge between the two languages. The flexible FFI package can programatically load dynamic libraries and bind functions without the need to make changes to Ruby itself or to recompile any extensions, so our package can easily run on standard Ruby interpreters without installation and compilation issues beyond that of the normal Ruby gem installation. Importantly, FFI also has useful methods for managing memory, pointers, structs and binary fields are converted to Ruby boolean variables. A further advantage of using FFI is that the binding is compatible with both the standard Ruby interpreter Matz’s Ruby Interpreter (MRI) and the alternative Java implementation of the Ruby language (JRUBY). By wrapping SAMtools in this way the scientist may use the high level easily learned and fast to develop with Ruby that facilitates quick development rather than the native C of SAMtools. bio-samtools hides the low-level API completely making bio-samtools a useful and easily used tool for working with Next-Generation Sequencing data in BAM files. Each .c library from the SAMtools API is represented by a separate Ruby module mapping the C functions (Figure 1), which are unified in the class Sam.

Bottom Line: The SAMtools utilities are implemented in C and provide an API for programmatic access, to help make this functionality available to programmers wishing to develop in the high level Ruby language we have developed bio-samtools, a Ruby binding to the SAMtools library.The utility of SAMtools is encapsulated in 3 main classes, Bio::DB::Sam, representing the alignment files and providing access to the data in them, Bio::DB::Alignment, representing the individual read alignments inside the files and Bio::DB::Pileup, representing the summarised nucleotides of reads over a single point in the nucleotide sequence to which the reads are aligned.Bio-samtools is a flexible and easy to use interface that programmers of many levels of experience can use to access information in the popular and common SAM/BAM format.

View Article: PubMed Central - HTML - PubMed

Affiliation: The Sainsbury Laboratory, Norwich Research Park, Colney Lane, Norwich, NR4 7UH, UK. dan.maclean@tsl.ac.uk.

ABSTRACT

Background: The SAMtools utilities comprise a very useful and widely used suite of software for manipulating files and alignments in the SAM and BAM format, used in a wide range of genetic analyses. The SAMtools utilities are implemented in C and provide an API for programmatic access, to help make this functionality available to programmers wishing to develop in the high level Ruby language we have developed bio-samtools, a Ruby binding to the SAMtools library.

Results: The utility of SAMtools is encapsulated in 3 main classes, Bio::DB::Sam, representing the alignment files and providing access to the data in them, Bio::DB::Alignment, representing the individual read alignments inside the files and Bio::DB::Pileup, representing the summarised nucleotides of reads over a single point in the nucleotide sequence to which the reads are aligned.

Conclusions: Bio-samtools is a flexible and easy to use interface that programmers of many levels of experience can use to access information in the popular and common SAM/BAM format.

No MeSH data available.