[Bioperl-l] Fasta Genome Splice

Ryan Kuykendall ryank at drizzle.com
Thu Feb 12 15:29:03 EST 2004


I'm sure there is a Perl module for generating the reverse compliment of a
whole genome, but assuming you wanted to write the code from scratch:

## ...and assuming your genome file has been turned into an array of bases
## called @listOfBases;

my $baseComplimentMap = 
{
 'a' => 't',
 'c' => 'g',
 'g' => 'c',
 't' => 'a',	
};

my @baseComplimentList = ();

foreach my $base ( @listOfBases )
{
    my $complimentBase = $baseComplimentMap->{$base};
    push( @baseComplimentList, $complimentBase );
}

That would do it...

============================================================
Ryan Kuykendall
ryank at drizzle.com

http://undef.com/ryank/ryanAtBawa50percent.JPG
============================================================

On Thu, 12 Feb 2004, David Clark wrote:

> Good point.  What I need is two fasta files: one with the ofr regions 
> masked, and one with the non-ofr regions masked.  There was another 
> thing I wanted to do that I didn't mention before: how can I generate 
> the reverse compliment of a whole genome file?
> 
> On Feb 12, 2004, at 1:19 PM, Jason Stajich wrote:
> 
> > You want these as a fasta file per orf and per non-orf region or just 2
> > datasets with the genome masked (all N's or lowercased)?
> >
> > -jason
> > On Thu, 12 Feb 2004, David Clark wrote:
> >
> >> Hello,
> >>
> >> I'm a relative newcomer to bioperl, and would like a point in the 
> >> right
> >> direction.  I need to separate the yeast genome into two partial
> >> genomes--one with all ORF's, and one with everything else.  I have a
> >> tab delimited list of the ORF's with the coordinates, and can probably
> >> parse that myself, but I wanted to see if anyone could point me to 
> >> some
> >> example code, or give me some place to start in separating genomes
> >> based on the coordinates.
> >>
> >> Thanks,
> >>
> >> David Clark
> >> dfclark at neo.tamu.edu
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
> 

-- 
============================================================
Ryan Kuykendall
ryank at drizzle.com

http://undef.com/ryank/ryanAtBawa50percent.JPG
============================================================



More information about the Bioperl-l mailing list