Using gtf file to get gene positions
Hi, I am wanting to extract gene positions from a gtf file using R. I have uploaded the gtf file as a df in R, with the headings 'seqnames', 'start', 'end', 'strand' and 'gene_id'. I am wanting to use this genome annotation to get the gene positions. Does anyone know a way I can do this on R.
My desired output would produce the different gene positions from the gtf file.
• 1,118 views
•
link
1 answer
Hi
You should get subset of the data frame in another data frame, try like following for 3 column of it.
df2 <- unique( df[,c("start","end","gene_id")])
• 0 views
•
link
Log in to answer this question.