Skip to content
/ dna Public
forked from audy/dna

A simple nucleotide and protein sequence file parser in Ruby

Notifications You must be signed in to change notification settings

triplett/dna

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DNA

A minimalistic sequence file parser.

Austin G. Davis-Richardson

Supported Formats:

Request a format

Installation

With Ruby 1.9.2 or better:

gem install dna

Usage

require 'dna'

File.open('sequences.fasta') do |handle|
  records = Dna.new handle, format: 'fastq'
  
  records.each do |record|
    puts record.length
  end
end

File.open('sequences.fastq') do |handle|
  records = Dna.new handle, format: 'fastq'

  records.each do |record|
    puts record.quality
  end
end

File.open('sequences.qseq') do |handle|
  records = Dna.new handle, format: 'qseq'
  puts records.first.inspect
end

About

A simple nucleotide and protein sequence file parser in Ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published