Map a given genomic region to the region within the protein - if the genomic region is part of the CDS of a protein coding transcript.
Tricky here is:
1) genomic region is not within the coding exons: return nothing - show specific warning.
2) genomic region spans several coding exons.
3) genomic region spans coding and non coding part: return nothing - show specific warning.
Now, what has to be done is similar to proteinToGenome:
use cdsBy an a GRangesFilter to retrieve all CDS overlapping the region.
if nothing is returned -> point 1) and warning.
intersect the returned cds and the GRanges defining the genomic region.
if length of the intersected and the original GRanges is not the same -> point 3) and warning.
get the protein annotated to the CDS's tx_id.
check that the length of the CDS matches the length of the protein sequence, if not -> warning and flag.
Map a given genomic region to the region within the protein - if the genomic region is part of the CDS of a protein coding transcript. Tricky here is: 1) genomic region is not within the coding exons: return nothing - show specific warning. 2) genomic region spans several coding exons. 3) genomic region spans coding and non coding part: return nothing - show specific warning.
Now, what has to be done is similar to
proteinToGenome
:cdsBy
an aGRangesFilter
to retrieve all CDS overlapping the region.GRanges
defining the genomic region.GRanges
is not the same -> point 3) and warning.tx_id
.