I am still fairly new to R. However I would like to write an algorithm that inputs a human variant (transcript ID, genomic coordinate, mutation type etc) and ultimately provides information of if the mutation will be degraded by nonsense-mediated decay. I have tried to look for packages that do something along these line but have not have any success.
Here are the rules for Nonsense-mediated decay:
Frameshift indels mutations will cause the transcript to be read in the incorrect reading frame until a stop codon (in the incorrect frame is encountered during transcription). If that stop codon is located <=55bp away from the beginning of the final exon then the transcript will NOT be degraded.
If the stop codon in that is encountered in the incorrect reading frame is located >=56bp away from the beginning of the final exon the transcript will be degraded.
I would need to identify the transcripts affected by a mutation. The direction of transcription and the exons for the affected transcripts. Identify if the inputed mutation goes into the +1 or -1 reading frame and do an in silico translation of that reading frame starting at the variant location. From the translation locate the first stop codon and see if it is within 55 base-pairs of the final exon.
I realize this is asking a tremendous amount but I truly hope that someone is able to help me!
Any and all help is greatly appreciated!