I am looking for a way to retrieve a protein's coding sequence, and only the one that translates into a biologically functioning protein directly using BioMart and the getsequence function. For example, when using:
cds_seq = getSequence(id = "NM_004974", type = "refseq_mrna", seqType = "coding", mart = mart)
I get a data frame with 8 different sequences. However, I only want the one that translates into the proper protein. Is there a way to do this?