how to extract and match information of two filein R
1
0
Entering edit mode
sat • 0
@ccbf0270
Last seen 7 months ago
italy

Hi i have two file, the first one is the list of genes ID and the second one is a GTF file. i want to extract information of chr,start,end,gene_id,strand from the second file in R

-first file:
 gene_id
 LOC124418406
 LOC1211106832
 ......
-second file (gtf) is as attached image.

enter image description here

 - i want the out put as below:
 chr(seqname)  Feature Start  End  gene_id  Strand
.....

```

R column match • 1.1k views
ADD COMMENT
3
Entering edit mode
@james-w-macdonald-5106
Last seen 5 hours ago
United States
> library(rtracklayer)
> library(GenomicFeatures)
> txdb <- makeTxDbFromGFF(<your gff filename goes here>)
> genes(txdb)

There are vignettes for both rtracklayer and GenomicFeatures.

ADD COMMENT
0
Entering edit mode

thank you!

ADD REPLY

Login before adding your answer.

Traffic: 579 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