Negative start position bed file
1
0
Entering edit mode
10.1 years ago
chariko ▴ 60

I aligned two samples (bwa; filter with samtools, removed duplicates with picard-tools, bamtobed and bed to bedgraph with genomeCoverageBed) to a genome file consisting in 4 genes and the first sample went fine but the second one when getting the bed file the start position for one of the genes was -1. I wonder that is not correct but I do not know why did I obtain such negative value.

Example:

"Wrong bed file for gene1"
gene1      -1      150      M00...      37         -
gene1      -1          150      M01...      37         +
gene2      1004      1115      M00...      60         -

I realized that -1 values in special cases, however, BEDPE (bed paired end) positions may be set to -1 to indicate that one or more ends of a BEDPE feature is unaligned.

http://bedtools.readthedocs.org/en/latest/content/overview.html

but I do not understand if that's my case and I really do not understand why did it align if it was unaligned....

Any clues?

bed • 3.2k views
ADD COMMENT
0
Entering edit mode

Looks like an off by one error.

ADD REPLY
0
Entering edit mode

thanks for your answer, but... what do you mean off by one error?

would you consider to discard this result and that's all?

thanks again

ADD REPLY
1
Entering edit mode

Have a look at the wikipedia article, this is a pretty common type of program bug. You can probably just convert the -1 values to 0.

ADD REPLY
1
Entering edit mode

ok but if the zeros are off by one isn't it likely that the other rows are off by one as well ;-)?

ADD REPLY
0
Entering edit mode

Indeed :)

ADD REPLY
0
Entering edit mode

Can't say, why its negative

Maybe you can just convert -1 to +1

ADD REPLY
1
Entering edit mode
10.1 years ago
chariko ▴ 60

After changing the data to 0 and 1, I decided to remove those reads because also the coverage was very low (3x) so I really do not belive the results.

Thanks all for your answers.

ADD COMMENT

Login before adding your answer.

Traffic: 1184 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6