Using gtf file to get gene positions
1
2
Entering edit mode
2.4 years ago
margo ▴ 40

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.

gtf sequencing R igv • 632 views
ADD COMMENT
3
Entering edit mode
2.4 years ago
ahmad mousavi ▴ 800

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")]) 
ADD COMMENT

Login before adding your answer.

Traffic: 2375 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6