Skip to content
Snippets Groups Projects
Commit 68272470 authored by Web Admin's avatar Web Admin
Browse files

change alleles and ambicode if snp_strand ne trans_strand

parent 1c32b655
No related branches found
No related tags found
No related merge requests found
......@@ -1056,8 +1056,9 @@ sub get_all_cdna_SNPs {
#transform transcript to same coord system we will get snps in
my %exon_transforms;
my $new_exon ;
foreach my $exon (@{$transcript->get_all_Exons}) {
my $new_exon = $exon->transform($slice);
$new_exon = $exon->transform($slice);
$exon_transforms{$exon} = $new_exon;
}
$transcript->transform(\%exon_transforms);
......@@ -1084,6 +1085,15 @@ sub get_all_cdna_SNPs {
next;
}
# change allele and ambicode if strand of coordinate system is different to snp strand
my $exon_strand = $new_exon->{'_gsf_strand'};
if ($snp->strand ne $exon_strand ){
$snp->{'alleles'} =~ tr/acgthvmrdbkynwsACGTDBKYHVMRNWS\//tgcadbkyhvmrnwsTGCAHVMRDBKYNWS\//;
$snp->{'_ambiguity_code'} =~ tr/acgthvmrdbkynwsACGTDBKYHVMRNWS\//tgcadbkyhvmrnwsTGCAHVMRDBKYNWS\//;
}
#copy the snp and convert to cdna coords...
my $new_snp;
%$new_snp = %$snp;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment