Aware of any awk/perl scripts that does, first add codon number (codon1, codon2 and so on) from CDS sequence, and subsequently add base position (#1 or #2 or #3) within each codon.
Hi all,
I am trying to plot the position of SNP with respect to the codon position, to see, if there is an enrichment in 3rd position of the codon or 1st position. It is easy to do, but I did not find the genomic coordinates of codon (in 3 nt intervals). I only find the CDS coordinates from UCSC. Is there available information of codon coordinates that can be downloaded.
Thanks!
1 answer
Codon positions are usually easily derivable from CDS positions. Use the formula x mod 3. The result can be 1 (base #1), 2 (base #2) or 0(base #3) of a codon.
It's a mathematical formula. Codon number is ceiling(cds_coord/3) and base number is cds_coord mod 3 == 0 ? 3 : cds_coord mod 3
You can write a simple script that does this math. If you're new to scripting, this would be a good time to start.
Log in to answer this question.
I'm interested in the exact same thing. Do you guys know how could this be transferrable to R?
Thanks in advance, R
What have you tried?