ACE file Q&D filtering

From BioPerl
Jump to: navigation, search

(see the thread on bioperl-l)

from Abhi Pratap:

I am looking for some code to parse the ACE file format. I have big ACE files which I would like to trim based on the user defined Contig name and specific region and write out the output to another fresh ACE file.


Russell Smithies responds:

Here's how I've been doing it:

 my $infile = "454Contigs.ace";
 my $parser = new Bio::Assembly::IO(-file   => $infile ,-format => "ace") or die $!;
 my $assembly = $parser->next_assembly;
 
 # to work with a named contig
 my @wanted_id = ("Contig100");
 my ($contig) = $assembly->select_contigs(@wanted_id) or die $!; 
 
 #get the consensus
 my $consensus = $contig->get_consensus_sequence(); 
 
 #get the consensus qualities
 my @quality_values  = @{$contig->get_consensus_quality()->qual()};

Eds. note: ACE file writing is another matter--but with solutions around the corner. See the rest of the discussion.

to the #top

Personal tools
Namespaces
Variants
Actions
Main Links
documentation
community
development
Toolbox