Created
February 11, 2011 10:31
-
-
Save epaule/822186 to your computer and use it in GitHub Desktop.
flip EST orientation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $cDNA_span = shift; | |
my $chrom = shift; | |
my %est_orient; | |
$wormbase->FetchData("estorientation",\%est_orient) unless (5 < scalar keys %est_orient); | |
foreach my $EST ( keys %est_orient ) { | |
if ( exists $$cDNA_span{$EST} && defined $$cDNA_span{$EST}->[2]) { | |
my $GFF_strand = $$cDNA_span{$EST}->[2]; | |
my $read_dir = $est_orient{$EST}; | |
CASE:{ | |
($GFF_strand eq "+" and $read_dir eq "5") && do { | |
$$cDNA_span{$EST}->[2] = "+"; | |
last CASE; | |
}; | |
($GFF_strand eq "+" and $read_dir eq "3") && do { | |
$$cDNA_span{$EST}->[2] = "-"; | |
last CASE; | |
}; | |
($GFF_strand eq "-" and $read_dir eq "5") && do { | |
$$cDNA_span{$EST}->[2] = "-"; | |
last CASE; | |
}; | |
($GFF_strand eq "-" and $read_dir eq "3") && do { | |
$$cDNA_span{$EST}->[2] = "+"; | |
last CASE; | |
}; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment