Hello Marie,
As you noted, the following conversion provides expected results when using web-based liftOver:
panTro3 chr1:127140001-127140001 (1-based)
lifts to
hg19 hg19 chr1:110255313-110255313 (1-based)
Please note the web-based output file extension is misleading in this case; while titled "*.bed" the positional output is not actually in 0-based BED format, since you gave 1-based positional input.
There are two types of coordinate formats that you can use:
1) 0-based-start format coordinates (such as BED format) and
2) 1-based-start "positional" format coordinates.
The example above is in the 1-based-start "positional" format.
You can go back to the web-based liftOver tool and enter the same position to lift, but this time, use the "0-based-start BED format."
For this test, change your 1-based "position" format: chr1:127140001-127140001
to the 0-based-start BED format: chr1 127140000 127140001
Here are the web-based liftOver results, where the input and output are 0-based BED format.
panTro3 chr1 127140000 127140001 (0-based)
hg19 hg19 chr1 110255312 110255313 (0-based)
Since you have a list of 1-based "position" formatted coordinates, and you want to use the command-line liftOver utility, you will need to specify that you are using "positional" coordinates to the liftOver utility.
To view the liftOver utility usage statement and options, enter "liftOver" on your command-line (with no other parameters and without the quotes).
Command-line LiftOver Utility examples:
1. Using input of 0-based-start BED format coordinates
The liftOver utility expects this format, no special options are needed in the command.
liftOver panTro3.bed liftOver/panTro3ToHg19.over.chain.gz mapped unMapped
input: panTro3.bed
chr1 127140000 127140001
Results in output file "mapped":
chr1 110255312 110255313
2. Using input of 1-based-start "positional" format coordinates
The liftOver utility needs the "-positions" option included in the command.
liftOver -positions panTro3.txt liftOver/panTro3ToHg19.over.chain.gz mapped unMapped
input: panTro3.txt
chr1:127140001-127140001
Results in output file "mapped":
chr1:110255313-110255313
Explanation:
0-based start
A 0-based start counting mechanism, such as BED file format,
begins counting at 0 (instead of 1). For example, starting at 0 and incrementing by 1, the number “5” will be in position 6.
0-based count: 0-1-2-3-4-5
position: 1-2-3-4-5-6
For example, the first 100 bases of a chromosome are defined as chromStart=0, chromEnd=100, and span the bases numbered 0-99.
1-based start
A 1-based start counting mechanism begins counting at 1 (instead of 0). For example, starting at 1 and incrementing by 1, the number “5” will also be in position 5.
1-based count: 1-2-3-4-5
position: 1-2-3-4-5
For example, the first 100 bases of a chromosome are defined as chromStart=
1
, chromEnd=100, and span the bases numbered
1
-
100.
Resources:
If you submit data to the browser in position format (chr#:##-##), the browser assumes this information is 1-based. If you submit data in any other format (BED (chr# ## ##) or otherwise), the browser will assume it is 0-based. You can see this both in our liftOver utility and in our search bar.