bedops / bedops

:microscope: BEDOPS: high-performance genomic feature operations
https://bedops.readthedocs.io/
Other
295 stars 59 forks source link

bedmap output with 0 #153

Closed tianfree closed 8 years ago

tianfree commented 8 years ago

I compared the output of bedmap (version: 2.4.16) with map.bed and map.bed.starch: bedmap reference.bed map.bed.starch Output:

1 0 10000 1 10000 7047 1 20000 0 1 30000 0 1 40000 0 1 50000 0 1 60000 0 1 70000 0 1 80000 0 1 90000 0

bedmap reference.bed map.bed Output:

1 0 10000 1 10000 8945 1 20000 10000 1 30000 10000 1 40000 9951 1 50000 9973 1 60000 10000 1 70000 9978 1 80000 9970 1 90000 9976

The only difference is the map file (before or after become starch) But in bedmap (version: 2.4.15) it is normal. Is there some trick in bemap ?

bedops commented 8 years ago

Hi Feng, It looks like you simplified out the options. What options are you using. Could you add ---ec and see if bedmap complains? If you can attach the files, I can look in more detail. Shane On Apr 14, 2016 7:42 PM, "Feng Tian" notifications@github.com wrote:

I compared the output of bedmap (version: 2.4.16) with map.bed and map.bed.starch: bedmap reference.bed map.bed.starch Output:

1 0 10000 1 10000 7047 1 20000 0 1 30000 0 1 40000 0 1 50000 0 1 60000 0 1 70000 0 1 80000 0 1 90000 0

bedmap reference.bed map.bed Output:

1 0 10000 1 10000 8945 1 20000 10000 1 30000 10000 1 40000 9951 1 50000 9973 1 60000 10000 1 70000 9978 1 80000 9970 1 90000 9976

The only difference is the map file (before or after become starch) Is there some trick in bemap ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/bedops/bedops/issues/153

tianfree commented 8 years ago

My command is: bedmap --ec --delim "\t" --prec 0 --bp-ovr 1 --echo --bases $ref $umap It is in the "run_10kb_counts.tok" of hotspot v4.1.0. I just extracted this command from it.

Now I am using bedops v 2.4.15 with the same options and the output is normal.

bedops commented 8 years ago

So you are using run_10kb_counts.tok for both of your $ref and $umap?

On Thu, Apr 14, 2016 at 11:35 PM, Feng Tian notifications@github.com wrote:

My command is: bedmap --ec --delim "\t" --prec 0 --bp-ovr 1 --echo --bases $ref $umap It is in the "run_10kb_counts.tok" of hotspot v4.1.0. I just extracted this command from it.

Now I am using bedops v 2.4.15 with the same options and the output is normal.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/bedops/bedops/issues/153#issuecomment-210305473

tianfree commented 8 years ago

Yes. ./run_10kb_counts.tok without any option because the file was directly generated by hotspot. Actually you can create a small $ref and $map. $ref

Chr1 1038 1048 Chr1 1048 1058 Chr1 2676 2688 Chr1 2894 3894 Chr10 11451 11942

$map

Chr1 1038 1058 Chr1 1074 2671 Chr1 2676 2688 Chr1 2694 11447 Chr1 11451 11942

Just type bedmap --ec --delim "\t" --prec 0 --bp-ovr 1 --echo --bases $ref $map You may find different versions have different results.

alexpreynolds commented 8 years ago

Provisional fixes are in commit 66437c70a042fa93f02b7734d8190a3622e0fd1e