Converts chromosome coordinates from one human genome assembly to another
perl ./human-genome-assembly-converter [-s, -t, -f, -o, --format] CHROM_NAME CHROM_START CHROM_END
CHROM_NAME name of the human chromosome
CHROM_START starting coordinates
CHROM_END ending coordinates
-s, --source source assembly. Default='GRCh37'
-t, --target target assembly. Default='GRCh38'
-f, --file input file name which is in BED format
-o, --output output file name
-format Either BED or JSON. Default JSON
The code has been tested on perl v5.34.0 for x86_64-linux. Before running the script ensure that ensembl perl API has been setup (https://m.ensembl.org/info/docs/api/api\_installation.html). After cloning the repository simply run the command,
$ perl ./human-genome-assembly-converter.pl -s GRCh38 -t GRCh37 10 25000 30000
Currently, it supports output in BED and JSON format. You may also provide an input file in BED format to convert the coordinates.
The tests
directory contains a short script to test the various scenarios.