bedtools icon indicating copy to clipboard operation
bedtools copied to clipboard

Add a 'shift' tool.

Open arq5x opened this issue 13 years ago • 14 comments

shift should move an interval left or right by either a fixed number of bases or a specific fraction of a chromosome.

arq5x avatar Nov 28 '12 17:11 arq5x

any news on this before I write it? :-)

ttriche avatar Sep 17 '14 17:09 ttriche

Unfortunately, I haven't gotten around to this yet. Sorry!

arq5x avatar Sep 17 '14 20:09 arq5x

nevermind, it looks like bedtools slop does this anyhow (at least in 2.2.0)

thanks!

Statistics is the grammar of science. Karl Pearson http://en.wikipedia.org/wiki/The_Grammar_of_Science

On Wed, Sep 17, 2014 at 1:36 PM, Aaron Quinlan [email protected] wrote:

Unfortunately, I haven't gotten around to this yet. Sorry!

— Reply to this email directly or view it on GitHub https://github.com/arq5x/bedtools/issues/40#issuecomment-55955829.

ttriche avatar Sep 17 '14 21:09 ttriche

That is a slightly different op...

arq5x avatar Sep 17 '14 21:09 arq5x

eh, I may just use pandas on the bedGraph then ;-)

Statistics is the grammar of science. Karl Pearson http://en.wikipedia.org/wiki/The_Grammar_of_Science

On Wed, Sep 17, 2014 at 2:22 PM, Aaron Quinlan [email protected] wrote:

That is a slightly different op...

— Reply to this email directly or view it on GitHub https://github.com/arq5x/bedtools/issues/40#issuecomment-55962419.

ttriche avatar Sep 17 '14 21:09 ttriche

Actually scratch that, I think I will go ahead and pick at the C++ data structures to make it fast and stream-capable. Why not do it right, (more or less) once and for all.

ttriche avatar Sep 17 '14 21:09 ttriche

It is better to do so with the bedtools2 repository though, yes?

ttriche avatar Sep 17 '14 21:09 ttriche

The code in the slop tool will get you 90% of the way.

arq5x avatar Sep 17 '14 21:09 arq5x

Indeed.

arq5x avatar Sep 17 '14 21:09 arq5x

seems like this could just be a new option in slop.

brentp avatar Sep 18 '14 00:09 brentp

Perhaps, but I see them as fundamentally different. Slop maintains the "center" of the interval and extends the ends in both or either direction. The purpose of shift is to move the interval left or right, but not change its size.

arq5x avatar Sep 18 '14 00:09 arq5x

I think I must be a bit bad at choosing verbs for the tools, as some of these cause confusion for many!

arq5x avatar Sep 18 '14 00:09 arq5x

could be fun to think of the verb first, then decide what the tool will do:

bedtools cork

bedtools sanction

bedtools advise

etc.

brentp avatar Sep 18 '14 01:09 brentp

I like the way you think, sir.

arq5x avatar Sep 18 '14 01:09 arq5x