[Bioperl-l] Creating a fastq format file?

Mark A. Jensen maj at fortinbras.us
Wed Apr 22 13:33:08 UTC 2009


Dan- There is a fastq module under Bio::SeqIO. Do something like

          use Bio::Seq::Quality;
          use Bio::SeqIO;
         
         # from Bio::Seq::Quality synopsis...
         my $qual = '0 1 2 3 4 5 6 7 8 9 11 12';
         my $trace = '0 5 10 15 20 25 30 35 40 45 50 55';

         my $seq = Bio::Seq::Quality->new
             ( -qual => $qual,
               -trace_indices => $trace,
               -seq =>  'atcgatcgatcg',
               -id  => 'human_id',
               -accession_number => 'S000012',
               -verbose => -1   # to silence deprecated methods
         );
        # typical Bio::SeqIO call
        $seqio = Bio::SeqIO( -file => ">your_file", -format=>'fastq');
        $seqio->write_seq($seq);

 Mark
----- Original Message ----- 
From: "Dan Bolser" <dan.bolser at gmail.com>
To: <bioperl-l at lists.open-bio.org>
Sent: Wednesday, April 22, 2009 6:49 AM
Subject: [Bioperl-l] Creating a fastq format file?


> Creating a fastq format file from fasta and 'fasta quality file'?
> 
> 
> Hi,
> 
> I'm sure this is easy, but I'm still not able to 'think bioperl'...
> 
> I have a 'fasta quality file' and a fasta file, and I would like to
> output a fastq file. I followed the discussion on the previous thread
> here:
> 
> http://bioperl.org/pipermail/bioperl-l/2008-July/028013.html
> 
> 
> With the conclusion seeming to be 'just do it'. Could someone point me
> at a way to do this, or was that suggestion an error? i.e. the poster
> was working out a way to create a fastq the only way possible...
> 
> I get the feeling that this should be a one-liner, but perhaps the
> above thread was demonstrating the code I need to copy.
> 
> 
> Thanks for any suggestions,
> 
> Dan.
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 
>



More information about the Bioperl-l mailing list