Entering edit mode
4.6 years ago
sabin
▴
50
Hello, Has anyone ever used the R library "seq2pathway" and in particular the function "runseq2gene" to map genomic regions to genes? Is it a good alternative to bed tools? I found it very easy to use, I just would like to know if can be considered as a valid alternative since i didnt manage to use bedtools yet. What's your experience with that library?
No experience with this, but you probably want
GenomicRanges
package and its functions such asfindOverlaps
andnearest
. Essentially the same as bedtools just in R. If you want to map regions to genes in a certain window then simply extend either of them usingGenomicRanges::resize
and then use any of the overlap function from that package, e.g.findOverlaps
,subsetbyOverlaps
etc to get the overlaps.nearest
in case you want the closest gene/region. Be sure that you use the strand options since it is the gene start coordinate that matters and if a gene is on the minus strand then the actual end coordinate is the start.