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?
Looks like an off by one error.
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
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.
ok but if the zeros are off by one isn't it likely that the other rows are off by one as well ;-)?
Indeed :)
Can't say, why its negative
Maybe you can just convert -1 to +1