I'm working with miRNA and Biostrings R package and I have an issue: I want to retrieve the sequence of 3'UTR extreme from a set of gene IDs. This is my code:
> ensembl <- useMart("ensembl", dataset=as.character(data_sel[i]))
> seq_new <- biomaRt::getSequence(seqType='3utr', mart=ensembl, type=gen_id_ref, id=gen_id)
And the result (truncated):
3utr ensembl_gene_id 1 ENSG00000139618 GCATTTGCAAAGGCGACAATAAA....
So far, so good, but I wonder if there is any way to retrieve the field "TRANSCRIPT ID" moreover to "3utr" and "ensembl_gene_id" to get:
3utr ensembl_gene_id ensembl_transcript_id 1 ENSG00000139618 GCATTTGCAAAGGCGACAATAAA.... ENST00000544455
Thank you in advance.