arq5x / bedtools

A powerful toolset for genome arithmetic.
http://code.google.com/p/bedtools/
GNU General Public License v2.0
139 stars 86 forks source link

Add a 'shift' tool. #40

Open arq5x opened 11 years ago

arq5x commented 11 years ago

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

ttriche commented 10 years ago

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

arq5x commented 10 years ago

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

ttriche commented 10 years ago

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 notifications@github.com 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.

arq5x commented 10 years ago

That is a slightly different op...

ttriche commented 10 years ago

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 notifications@github.com 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 commented 10 years ago

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 commented 10 years ago

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

arq5x commented 10 years ago

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

arq5x commented 10 years ago

Indeed.

brentp commented 10 years ago

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

arq5x commented 10 years ago

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 commented 10 years ago

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

brentp commented 10 years ago

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

bedtools cork

bedtools sanction

bedtools advise

etc.

arq5x commented 10 years ago

I like the way you think, sir.