This is a test version of Biostars. For the public version, visit https://www.biostars.org.
R library to map genomic regions to genes

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?

gene region map r library

No experience with this, but you probably want GenomicRanges package and its functions such as findOverlaps and nearest. 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 using GenomicRanges::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.

0 answers

No answers yet.

Log in to answer this question.