Bedtools Window size variation

30 views
Skip to first unread message

Tobias Baril

unread,
Aug 2, 2021, 11:21:26 AM8/2/21
to bedtools-discuss
Hi All,

I am trying to use bedtools window to look at some overlap between two sets of features. I wonder if this might already be possible, or whether it is something that could be added:

I have one set of genes, and want to look at repeats 20kb upstream and downstream of these genes. HOWEVER, I want to find all repeats that are found in 20KB of host sequence, such that if a 1000bp repeat was found upstream, the window size could be increased to 21000 so that 20kb of host is always considered. 

Potential applications could be looking at large repeats near host genes, where we might want to see how repeats have expanded regions near genes, where nested repeats could feasibly "move" host sequence that was previously proximal to a gene region further away by inserting next to the gene, this sequence wouldn't necessarily be classed as host sequence, and so I would like to expand my window to account for this.

Any pointers or ways to do this would be much appreciated!

Many Thanks,

Toby

Aaron Quinlan

unread,
Aug 3, 2021, 11:57:51 AM8/3/21
to bedtools...@googlegroups.com
Hi Toby,

Unfortunately, I can’t think of a simple approach to doing this with bedtools on the command line.  It may be a nice use case for pybedtools or pyranges where you have greater control to apply such conditional logic.

Apologies,
Aaron

--
You received this message because you are subscribed to the Google Groups "bedtools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bedtools-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bedtools-discuss/8ef92c5b-c371-4bcf-b042-01b4889a58den%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages