[BioRuby] fastq files reading

xyz mitlox at op.pl
Sat May 29 12:14:04 UTC 2010


Hello,
I would like to read at the same time two fastq files in order to
save them to fasta file. 

require 'bio'
Bio::FlatFile.open(Bio::Fastq, 'readsA.fastq') do |ff1|
  ff1.each do |entry1|

    header1 = entry1.entry_id
    seq1 = entry1.seq 
    
    puts seq1.to_fasta(header1 + "qwa")
    
    #header2 = entry2.entry_id
    #seq2 = entry2.seq 
    #puts seq2.to_fasta(header2 + "qwa")
  end
end

I have already the following code, but unfortunately I do not know
how to read both files at the same time. 

How is it possible to read two files at the same time and write them
to fasta file?

Thank you in advance.

Best regards,





More information about the BioRuby mailing list