bedtools not working properly
1
0
Entering edit mode
4.5 years ago
wstla27 ▴ 20

Hi, I was trying to use bedtools to align a bed file with a Fasta file.

The first line of bed look like this: DN38.contig00001 654 2138

When I was checking the output of bedtools, the result sequence starts at 655, instead of 654.

I am wondering that is the result generated by bedtools always between the 'start' and 'end', instead of starting at the 'start' and ending at 'end'?

Thanks!

alignment bedtools fasta • 740 views
ADD COMMENT
1
Entering edit mode

bedtools to align a bed file with a Fasta file.

there is no tool to "align a bed with a fasta". which sub tool are you using ? what was the cmd line ? did you read Cheat Sheet For One-Based Vs Zero-Based Coordinate Systems ? and How To Ask Good Questions On Technical And Scientific Forums ?

ADD REPLY
1
Entering edit mode
4.5 years ago
Mark ★ 1.5k

This is because bedtools uses base-0 for start and base-1 for the end... that's not confusing at all.

BED starts are zero-based and BED ends are one-based.

bedtools users are sometimes confused by the way the start and end of BED features are represented. Specifically, bedtools uses the UCSC Genome Browser’s internal database convention of making the start position 0-based and the end position 1-based: (http://genome.ucsc.edu/FAQ/FAQtracks#tracks1) In other words, bedtools interprets the “start” column as being 1 basepair higher than what is represented in the file.

https://bedtools.readthedocs.io/en/latest/content/overview.html

I didn't know this! Thanks for asking :)

ADD COMMENT

Login before adding your answer.

Traffic: 2291 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