{"id":15893495,"url":"https://github.com/multimeric/crossmap","last_synced_at":"2025-04-02T17:43:07.511Z","repository":{"id":85377204,"uuid":"78820118","full_name":"multimeric/CrossMap","owner":"multimeric","description":"Fork of CrossMap (http://crossmap.sourceforge.net/) that supports Python 3","archived":false,"fork":false,"pushed_at":"2017-01-13T06:06:07.000Z","size":5717,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T05:23:30.259Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/multimeric.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-13T05:59:39.000Z","updated_at":"2017-01-13T06:01:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"6ef44d02-7cc0-4cea-9d17-2730c8ff825e","html_url":"https://github.com/multimeric/CrossMap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2FCrossMap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2FCrossMap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2FCrossMap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2FCrossMap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/multimeric","download_url":"https://codeload.github.com/multimeric/CrossMap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246863845,"owners_count":20846322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T08:11:14.543Z","updated_at":"2025-04-02T17:43:07.488Z","avatar_url":"https://github.com/multimeric.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n.. toctree::\n   :maxdepth: 2\n   \n\n.. CrossMap documentation master file, created by\n   sphinx-quickstart on Thu Oct 10 13:45:49 2013.\n   You can adapt this file completely to your liking, but it should at least\n   contain the root `toctree` directive.\n\n.. image:: _static/logo.png\n   :height: 150px\n   :width: 750 px\n   :scale: 50 %\n   :alt: alternate text\n\nWhat is CrossMap ?\n====================\n\n* CrossMap is a program for convenient conversion of genome coordinates (or annotation files)\n  between *different assemblies* (such as Human `hg18 (NCBI36) \u003chttp://www.ncbi.nlm.nih.gov/assembly/2928/\u003e`_\n  \u003c\u003e `hg19 (GRCh37) \u003chttp://www.ncbi.nlm.nih.gov/assembly/2758/\u003e`_, Mouse `mm9 (MGSCv37) \u003chttp://www.ncbi.nlm.nih.gov/assembly/165668/\u003e`_\n  \u003c\u003e `mm10 (GRCm38) \u003chttp://www.ncbi.nlm.nih.gov/assembly/327618/\u003e`_). \n* It supports most commonly used file formats including SAM/BAM, Wiggle/BigWig, BED, GFF/GTF, VCF.\n* CrossMap is designed to liftover genome coordinates between assemblies. It's *not* a program\n  for aligning sequences to reference genome.\n* We *do not* recommend using CrossMap to convert genome coordinates between species.\n\nWhy CrossMap ?\n===================\n\nFull genome sequencing, especially mammalian (eg. human) genomes, requires extensive, continuous\nefforts. Therefore reference genome assemblies are subject to change and refinement from time\nto time. Generally, researchers need to convert results that have been analyzed according to\nold assemblies to newer versions or *vice versa*,  to facilitate meta-analysis, direct comparison\nas well as data integration and visualization.\n\nSeveral useful conversion tools have been developed:\n\n* `UCSC liftover tool \u003chttp://genome.ucsc.edu/cgi-bin/hgLiftOver\u003e`_ only supports BED input.\n* `NCBI remap \u003chttp://www.ncbi.nlm.nih.gov/genome/tools/remap\u003e`_ support BED, GFF, GTF, VCF, etc\n* `Galaxy \u003chttps://usegalaxy.org/\u003e`_ (Based on UCSC liftover tool) supports BED, GFF, GTF input.\n* `Ensembl assembly converter \u003chttp://www.ensembl.org/Homo_sapiens/Tools/AssemblyConverter?db=core\u003e`_\n  supports BED, GFF, GTF, PSL input, but output is GFF only. (**Update:** The original \"assembly converter\" has been retired. Starting from 2015, Ensembl uses `CrossMap \u003chttp://www.ensembl.org/Homo_sapiens/Tools/AssemblyConverter?db=core\u003e`_ to perform genome coordinate conversion.)\n* `pyliftover \u003chttps://pypi.python.org/pypi/pyliftover\u003e`_ \"only does conversion of point\n  coordinates, that is, unlike liftOver, it does not convert ranges, nor does it provide any\n  special facilities to work with BED files\".\n\nBut none have the functionality to convert files in BAM/SAM or BigWig format. This is a significant\ngap in computational genomics tools, since these formats are the ones most widely used\nfor representing high-throughput sequencing data such as RNA-seq, ChIP-seq, DNA-seq, etc.\n\nWho is using CrossMap ?\n========================\n\n* `Ensembl \u003chttp://www.ensembl.org/Homo_sapiens/Tools/AssemblyConverter?db=core\u003e`_\n* `Illumina BaseSpace \u003chttps://basespace.illumina.com/apps/\u003e`_\n* `bcbio-nextgen \u003chttp://bcbio-nextgen.readthedocs.org/en/latest/contents/introduction.html\u003e`_\n* `NIH Biowulf \u0026 Helix \u003chttps://hpc.nih.gov/apps/crossmap.html\u003e`_\n* `Georgia Advanced Computing Resource Center \u003chttps://wiki.gacrc.uga.edu/wiki/CrossMap\u003e`_\n* `GNU Guix \u003chttps://www.gnu.org/software/guix/packages/\u003e`_\n\nHow CrossMap works?\n===================\n\n.. image:: _static/howitworks.png\n   :height: 250px\n   :width: 600 px\n   :scale: 85 %\n   :alt: alternate text\n\nAlgorithm\n-----------------\n   \nCrossMap first determines the correspondence between genome assemblies from \nUCSC `chain \u003chttp://genome.ucsc.edu/goldenPath/help/chain.html\u003e`_ file (chain file \ndescribes the pair-wise alignments between two genomes). Genome intervals will be stored in\n`interval tree \u003chttp://en.wikipedia.org/wiki/Interval_tree\u003e`_ data structure, \nwhich  allows one to efficiently find all intervals that overlap with any given interval or point.\nThen CrossMap remaps each entry in BAM/SAM, BED, GFF/GTF, VCF file to the target assembly by querying the `interval tree \u003chttp://en.wikipedia.org/wiki/Interval_tree\u003e`_.\nExon/intron structure in BED file; spliced alignments, paired alignments, insert size, header\nsection, SAM flags in BAM/SAM file; reference alleles, indels in VCF file will be processed\nproperly.\n\nFor Wiggle/BigWig format files, line-by-line computation will be very slow. To increase speed,\nCrossMap groups consecutive coordinates with the same coverage score into bins (i.e. genomic regions),\nthen remaps those regions one-by-one to the target assembly by querying the interval tree.  In other words, Wiggle/BigWig files will\nbe converted into `bedGraph \u003chttp://genome.ucsc.edu/goldenPath/help/bedgraph.html\u003e`_ format\ninternally, which will be converted into BigWig format (if UCSC’s '`wigToBigWig \u003chttp://hgdownload.cse.ucsc.edu/admin/exe/\u003e`_'\nexecutable exists and is callable).\n\nTime complexity\n-----------------\nAssume there are N lines in the chain file. CrossMap loads the chain file first and process\nthe query file line by line. Thus the space complexity is O(N). For each query region (s,t),\nit takes O(logN) time to locate which chain(s) overlap with s and t. Then it takes O(logN)\ntime to search the sorted ungapped alignments in this chain that overlap with s and t and\ncalculate the converted values for s and t in the target assembly. So in total it takes O(logN)\ntime to convert one query. The time complexity is O(logN*M) to convert M queries.\n\nIn practical, the time CrossMap takes increases linearly to the size of input file.\n\nNews\n===================\n\n* 08/18/16: Release version 0.2.4:\n \n * fixed bugs during BAM file conversion:\n \n  * When the strand of read changes, the seq filed is reverse complemented and the quality field is reversed. \n \n * In the output VCF file, if the reference allele field is empty:\n \n  * Use CrossMap v0.2.4. Update pysam to the latest version. And make sure chromosome IDs in the reference genome file are like \"chr1\", \"chr2\", ... , \"chrY\" (but not \"1\", \"2\", ... ,\"chrY\", in this case, pysam cannot index your reference genome file for some unknown reasons.). \n\n* 04/13/16: Release version 0.2.3:\n\n * Same as v0.2.2.\n * Two dependency packages bx-python and pysam do not shipped with CrossMap starting from v0.2.3 .\n * Users could install CrossMap using pip: **pip install CrossMap**. Note: bx-python and pysam will be installed automatically if they haven’t been installed before.\n\n* 11/10/15: Release version 0.2.2: Generate *.unmap files (regions that cannot be unambiguously converted) when converting BED, GTF, GFF files. This version also supports genePred (bed12+8) format. (Thanks for Andrew Yates from EMBL-EBI) \n* 08/26/15: Release version 0.2.1: Very minor change, same as 0.2.\n* 08/11/15: Release version 0.2: Fixed the bug that CrossMap will not convert wiggle format files due to name collision with bx python.\n* 07/27/15: Release version 0.1.9. For VCF file conversion in v0.1.9:\n\n * CrossMap uses the indexed reference genome (target assembly) sequences rather than load the entire file into memory. Users could index their reference genome file using **samtools faidx** before running CrossMap, otherwise CrossMap will index it automatically the first time you run it. \n \n * In the output VCF file, whether the chromosome IDs contain \"chr\" or not depends on the input format.  \n\n* 05/15/15: Release version 0.1.8: Fixed the bug that CrossMap will output invalid VCF file when the input VCF file contains a INFO field with whitespace.\n* 05/04/15: Release version 0.1.7: Address the problem that CrossMap does not convert strand in inversions when input file is BED6 or BED12 format.\n* 11/06/14: Release version 0.1.6: Fixed \"negative coordinates\" bug.\n* 08/05/14: Release version 0.1.5: Support compressed (*.gz, *.Z, *.z, *.bz, *.bz2, *.bzip2) wiggle file as input. \n* 05/19/14: add chain files for hg38-\u003ehg19, hg19-\u003ehg38, hg18-\u003ehg38, hg19-\u003eGRCh37, GRCh37-\u003ehg19. In CrossMap v0.1.4, conversion results of BAM/SAM files can be directed to STDOUT to support piping.\n* 12/12/13: CrossMap was accepted by `Bioinformatics \u003chttp://bioinformatics.oxfordjournals.org/content/early/2013/12/18/bioinformatics.btt730.short?rss=1\u003e`_\n* 10/23/13: CrossMap (0.1.3) was released\n\nDownload\n==================\n\n* Source code `CrossMap \u003chttp://sourceforge.net/projects/crossmap/files\u003e`_ (recommended)\n* `Test datsets \u003chttp://sourceforge.net/projects/crossmap/files/test.hg19.zip/download\u003e`_\n\nInstallation\n==================\n\nUse pip to install CrossMap\n-----------------------------\n\n::\n\n pip install CrossMap\n\n\nInstall CrossMap from source code\n----------------------------------\n\nPrerequisite:\n\n1. `gcc \u003chttp://gcc.gnu.org/\u003e`_\n2. `python2.7.* \u003chttp://www.python.org/getit/releases/2.7/\u003e`_\n3. `numpy \u003chttp://numpy.scipy.org/\u003e`_\n4. `cython \u003chttp://cython.org/\u003e`_\n5. `pysam \u003chttps://pypi.python.org/pypi/pysam\u003e`_\n6. `bx-python \u003chttps://pypi.python.org/pypi/bx-python/0.7.3\u003e`_\n\nDownload CrossMap program from `here \u003chttps://sourceforge.net/projects/crossmap/\u003e`_::\n\n $ tar zxf CrossMap-VERSION.tar.gz\n \n $ cd CrossMap-VERSION\n \n # install CrossMap to default location. In Linux/Unix, this location is like:\n # /home/user/lib/python2.7/site-packages/\n $ python setup.py install \n \n # or you can install CrossMap to a specified location:\n $ python setup.py install --root=/home/user/CrossMap\n \n # setup PYTHONPATH. Skip this step if CrossMap was installed to default location. \n $ export PYTHONPATH=/home/user/CrossMap/usr/local/lib/python2.7/site-packages:$PYTHONPATH. \n \n # Skip this step if CrossMap was installed to default location. \n $ export PATH=/home/user/CrossMap/usr/local/bin:$PATH\n\nNOTE:\n\n1. Due to intensive computation, CrossMap is designed to run on Linux/Unix and Mac OS.\n   Some modules may not work properly on Windows. \n2. Mac users need to download and install `Xcode \u003chttps://developer.apple.com/xcode/\u003e`_\n   command line tools.\n\nInput and Output\n=================\n\nCrossMap basically needs 2 input files.  `chain \u003chttp://genome.ucsc.edu/goldenPath/help/chain.html\u003e`_\nformat file describing genom-wide pairwise alignments between assemblies and the file  containing\ngenome coordinates that you want to convert to different assembly. If input file is in VCF\nformat, a reference genome sequence file(in FASTA format) is needed.\n\nChain file\n-----------\n\nExample of `chain \u003chttp://genome.ucsc.edu/goldenPath/help/chain.html\u003e`_ file::\n\n chain 4900 chrY 58368225 + 25985403 25985638 chr5 151006098 - 43257292 43257528 1\n  9       1       0\n  10      0       5\n  61      4       0\n  16      0       4\n  42      3       0\n  16      0       8\n  14      1       0\n  3       7       0\n  48\n\n  chain 4900 chrY 58368225 + 25985406 25985566 chr5 151006098 - 43549808 43549970 2\n  16      0       2\n  60      4       0\n  10      0       4\n  70 \n \n`UCSC \u003chttp://genome.ucsc.edu/index.html\u003e`_ prebuilt most commonly used `chain \u003chttp://genome.ucsc.edu/goldenPath/help/chain.html\u003e`_ files:\n\n* Human (*Homo sapiens*)\n\n * `hg38ToHg19.over.chain.gz \u003chttp://hgdownload.soe.ucsc.edu/goldenPath/hg38/liftOver/hg38ToHg19.over.chain.gz\u003e`_ (Chain file needed to convert hg38 to hg19)\n \n * `hg19ToHg38.over.chain.gz \u003chttp://hgdownload.soe.ucsc.edu/goldenPath/hg19/liftOver/hg19ToHg38.over.chain.gz\u003e`_ (Chain file needed to convert hg19 to hg38)\n \n * `hg18ToHg38.over.chain.gz \u003chttp://hgdownload.soe.ucsc.edu/goldenPath/hg18/liftOver/hg18ToHg38.over.chain.gz\u003e`_ (Chain file needed to convert hg18 to hg38)\n\n * `hg19ToHg18.over.chain.gz \u003chttp://hgdownload.soe.ucsc.edu/goldenPath/hg19/liftOver/hg19ToHg18.over.chain.gz\u003e`_ (Chain file needed to convert hg19 to hg18)\n \n * `hg19ToHg17.over.chain.gz \u003chttp://hgdownload.soe.ucsc.edu/goldenPath/hg19/liftOver/hg19ToHg17.over.chain.gz\u003e`_ (Chain file needed to convert hg19 to hg17)\n \n * `hg18ToHg19.over.chain.gz \u003chttp://hgdownload.soe.ucsc.edu/goldenPath/hg18/liftOver/hg18ToHg19.over.chain.gz\u003e`_ (Chain file needed to convert hg18 to hg19)\n \n * `hg18ToHg17.over.chain.gz \u003chttp://hgdownload.soe.ucsc.edu/goldenPath/hg18/liftOver/hg18ToHg17.over.chain.gz\u003e`_ (Chain file needed to convert hg18 to hg17)\n \n * `hg17ToHg19.over.chain.gz \u003chttp://hgdownload.soe.ucsc.edu/goldenPath/hg17/liftOver/hg17ToHg19.over.chain.gz\u003e`_ (Chain file needed to convert hg17 to hg19)\n \n * `hg17ToHg18.over.chain.gz \u003chttp://hgdownload.soe.ucsc.edu/goldenPath/hg17/liftOver/hg17ToHg18.over.chain.gz\u003e`_ (Chain file needed to convert hg17 to hg18)\n \n * `GRCh37ToHg19.over.chain.gz \u003chttp://sourceforge.net/projects/crossmap/files/chain_files/GRCh37ToHg19.over.chain.gz/download\u003e`_ (Chain file needed to convert GRCh37 to hg19)\n \n * `hg19ToGRCh37.over.chain.gz \u003chttp://sourceforge.net/projects/crossmap/files/chain_files/hg19ToGRCh37.over.chain.gz/download\u003e`_ (Chain file needed to convert hg19 to GRCh37)\n\n \n* Mouse (*Mus musculus*)\n\n * `mm10ToMm9.over.chain.gz \u003chttp://hgdownload.soe.ucsc.edu/goldenPath/mm10/liftOver/mm10ToMm9.over.chain.gz\u003e`_  (Chain file needed to convert mm10 to mm9)\n * `mm9ToMm10.over.chain.gz \u003chttp://hgdownload.soe.ucsc.edu/goldenPath/mm9/liftOver/mm9ToMm10.over.chain.gz\u003e`_  (Chain file needed to convert mm9 to mm10)\n * `mm9ToMm8.over.chain.gz  \u003chttp://hgdownload.soe.ucsc.edu/goldenPath/mm9/liftOver/mm9ToMm8.over.chain.gz\u003e`_ (Chain file needed to convert mm9 to mm8)\n \nChain file of other species can be downloaded from `http://hgdownload.soe.ucsc.edu/downloads.html \u003chttp://hgdownload.soe.ucsc.edu/downloads.html\u003e`_ \n\nUser Input file\n----------------\n \n1. `BAM \u003chttp://samtools.sourceforge.net/SAMv1.pdf\u003e`_ or `SAM \u003chttp://samtools.sourceforge.net/SAMv1.pdf/\u003e`_ format.\n2. `BED \u003chttp://genome.ucsc.edu/FAQ/FAQformat.html#format1\u003e`_ or BED-like format. BED file must has at least 3 columns ('chrom', 'start', 'end').\n3. `Wiggle \u003chttp://genome.ucsc.edu/goldenPath/help/wiggle.html\u003e`_ format. \"variableStep\", \"fixedStep\" and \"bedGraph\" wiggle line are supported.\n4. `BigWig \u003chttp://genome.ucsc.edu/goldenPath/help/bigWig.html\u003e`_ format. \n5. `GFF \u003chttp://genome.ucsc.edu/FAQ/FAQformat.html#format3\u003e`_ or `GTF \u003chttp://genome.ucsc.edu/FAQ/FAQformat.html#format4\u003e`_ format.\n6. `VCF \u003chttp://vcftools.sourceforge.net/index.html\u003e`_ format.  \n\n\n**NOTE:** When converting **bedGraph** file, Treat it as **Wiggle** format rather than **BED** format.\n\nOutput file\n----------------\n\nFormat of Output files depends on the input format\n\n==============  =========================================================================================\nInput_format        Output_format         \n==============  =========================================================================================\nBED             BED (Genome coordinates will be updated to the target assembly)\nBAM             BAM (Genome coordinates, header section, all SAM flags, insert size will be updated accordingly)\nSAM             SAM (Genome coordinates, header section, all SAM flags, insert size will be updated accordingly)\nWiggle          bedGraph (if wigToBigWig executable does not exist) \nWiggle          BigWig (if wigToBigWig executable exists)\nBigWig          bedGraph (if wigToBigWig executable does not exist) \nBigWig          BigWig (if wigToBigWig executable exists)\nGFF\t\t        GFF (Genome coordinates will be updated to the target assembly)\nGTF             GTF (Genome coordinates will be updated to the target assembly)\nVCF             VCF (Genome coordinates and reference alleles will be updated to the target assembly)\n==============  =========================================================================================\n\nUsage\n=============\n\nRun CrossMap.py without any arguments will print help message::\n \n # run CrossMap without argument\n $ python CrossMap.py\n\nScreen output::\n\n Program: CrossMap (v0.1.1)\n\n Description: \n   CrossMap is a program for convenient conversion of genome coordinates\n   and genomeannotation files between assemblies (eg. lift from human\n   hg18 to hg19 or vice versa).It support file in BAM, SAM, BED, Wiggle,\n   BigWig, GFF, GTF, VCF, etc.\n\n Usage: CrossMap.py \u003ccommand\u003e [options]\n\n   bam\tconvert alignment file in BAM or SAM format.\n   bed\tconvert genome cooridnate or annotation file in BED or BED-like format.\n   bigwig\tconvert genome coordinate file in BigWig format.\n   gff\tconvert genome cooridnate or annotation file in GFF or GTF format.\n   vcf\tconvert genome coordinate file in VCF format.\n   wig\tconvert genome coordinate file in Wiggle, or bedGraph format.\n\nRun CrossMap.py with command keyword will print help message for that command::\n\n $ python CrossMap.py bed\n\nScreen output::\n \n Usage:\n   CrossMap.py bed input_chain_file input_bed_file [output_file]\n\n Description:\n   \"input_chain_file\" and \"input_bed_file\" can be regular or compressed\n   (*.gz, *.Z, *.z, *.bz, *.bz2, *.bzip2) file, local file or URL\n   (http://, https://, ftp://) pointing to remote file. BED file must\n   have at least 3 columns (chrom, start, end) and no more than 12\n   columns. If  no \"output_file\" was specified, output will be directed\n   to screen (console). BED format:\n   http://genome.ucsc.edu/FAQ/FAQformat.html#format1\n\n Example:\n   CrossMapy.py bed hg18ToHg19.over.chain.gz test.hg18.bed test.hg19.bed\n   # write output to \"test.hg19.bed\"\n\n Example:\n   CrossMapy.py bed hg18ToHg19.over.chain.gz test.hg18.bed\n   # write output to screen\n\nConvert BED format files\n-------------------------\nA `BED \u003chttp://genome.ucsc.edu/FAQ/FAQformat.html#format1\u003e`_ (Browser Extensible Data) file\nis a tab-delimited text file describing genome regions or gene annotations. It is the standard\nfile format used by UCSC. It consists of one line per feature, each containing 3-12 columns.\nCrossMap converts BED files with less than 12 columns to a different assembly by updating the\nchromosome and genome coordinates only; all other columns remain unchanged. Regions from old\nassembly mapping to multiple locations to the new assembly will be split.  For 12-columns BED\nfiles, all columns will be updated accordingly except the 4th column (name of bed line), 5th\ncolumn (score value) and 9th column (RGB value describing the display color). 12-column BED\nfiles usually define multiple blocks (eg. exon); if any of the exons fails to map to a new\nassembly, the whole BED line is skipped. \n\nThe input BED file can be plain text file, compressed file with extension of .gz, .Z, .z,\n.bz, .bz2 and .bzip2, or even a URL pointing to accessible remote files (http://, https://\nand ftp://). Compressed remote files are not supported. The output is a BED format file with\nexact the same number of columns as the original one.\n\nStandard `BED \u003chttp://genome.ucsc.edu/FAQ/FAQformat.html#format1\u003e`_ format has 12 columns, but CrossMap also supports BED-like formats:\n\n* BED3: The first 3 columns (\"chrom\", \"start\", \"end\") of BED format file.\n* BED6: The first 6 columns (\"chrom\", \"start\", \"end\", \"name\", \"score\", \"strand\") of BED format file.\n* Other: Format has at least 3 columns (\"chrom\", \"start\", \"end\") and no more than 12 columns. All other columns are arbitrary.\n\nNOTE:\n\n1. For BED-like formats mentioned above, CrossMap only updates \"chrom (1st column)\", \"start (2nd column) \", \"end (3rd column) \" and \"strand\" (if any). All other columns will keep AS-IS.\n2.  Lines starting with '#', 'browser', 'track' will be skipped.\n3.  Lines will less than 3 columns will be skipped.\n4.  2nd-column and 3-column must be integer, otherwise skipped.\n5.  \"+\" strand is assumed if no strand information was found.\n6.  For standard BED format (12 columns). If any of the defined exon blocks cannot be uniquely mapped to target assembly, the whole entry will be skipped.\n7. \"input_chain_file\" and \"input_bed_file\" can be regular or compressed (.gz, .Z, .z, .bz, .bz2, .bzip2) file, local file or URL (http://, https://, ftp://) pointing to remote file.\n8. If output_file was not specified, results will be printed to screen (console). In this case, the original bed entries (include items failed to convert) were also printed out.\n9. If input region cannot be consecutively mapped target assembly, it will be split.\n10. *.unmap file contains regions that cannot be unambiguously converted. \n\nExample (run CrossMap with **no** *output_file* specified)::\n\n $ python CrossMap.py bed hg18ToHg19.over.chain.gz test.hg18.bed3\n\nConversion results were printed to screen directly (column1-3 are hg18 based, column5-7 are hg19 based)::\n\n chr1\t142614848\t142617697\t-\u003e\tchr1\t143903503\t143906352\n chr1\t142617697\t142623312\t-\u003e\tchr1\t143906355\t143911970\n chr1\t142623313\t142623350\t-\u003e\tchr1\t143911971\t143912008\n chr1\t142623351\t142626523\t-\u003e\tchr1\t143912009\t143915181\n chr1\t142633862\t142633883\t-\u003e\tchr1\t143922520\t143922541\n chr1\t142633884\t142636152\t-\u003e\tchr1\t143922542\t143924810\n chr1\t142636152\t142636326\t-\u003e\tchr1\t143924813\t143924987\n chr1\t142636339\t142636391\t-\u003e\tchr1\t143925000\t143925052\n chr1\t142636392\t142637362\t-\u003e\tchr1\t143925052\t143926022\n chr1\t142637373\t142639738\t-\u003e\tchr1\t143926033\t143928398\n chr1\t142639739\t142639760\t-\u003e\tchr1\t143928399\t143928420\n chr1\t142639761\t142640145\t-\u003e\tchr1\t143928421\t143928805\n chr1\t142640153\t142641149\t-\u003e\tchr1\t143928813\t143929809 \n\nExample (run CrossMap with *output_file* **(test.hg19.bed3)** specified)::\n\n $ python CrossMap.py bed hg18ToHg19.over.chain.gz test.hg18.bed3 test.hg19.bed3\n\n $ cat test.hg19.bed3\n chr1\t143903503\t143906352\n chr1\t143906355\t143911970\n chr1\t143911971\t143912008\n chr1\t143912009\t143915181\n chr1\t143922520\t143922541\n chr1\t143922542\t143924810\n chr1\t143924813\t143924987\n chr1\t143925000\t143925052\n chr1\t143925052\t143926022\n chr1\t143926033\t143928398\n chr1\t143928399\t143928420\n chr1\t143928421\t143928805\n chr1\t143928813\t143929809\n\nExample (one input region was split because it cannot be consecutively mapped target assembly)::\n\n $ python CrossMap.py bed hg18ToHg19.over.chain.gz test.hg18.bed3\n\n chr10\t81346644\t81349952\t+\t-\u003e\tchr10\t81356692\t81360000\t+\n chr10\t81349952\t81364937\t+\t-\u003e\tchr10\t81360000\t81374985\t+\n chr10\t81364952\t81365854\t+\t-\u003e\tchr10\t81375000\t81375902\t+\n chr10\t81365875\t81369946\t+\t-\u003e\tchr10\t81375929\t81380000\t+\n chr10\t81369946\t81370453\t+\t-\u003e\tchr10\t81380000\t81380507\t+\n chr10\t81370483\t81371363\t+\t-\u003e\tchr10\t81380539\t81381419\t+\n chr10\t81371363\t81371365\t+\t-\u003e\tchr10\t62961832\t62961834\t+\n chr10\t81371412\t81371432\t+\t(split.1:chr10:81371412:81371422:+)\tchr10\t62961775\t62961785\t+\n chr10\t81371412\t81371432\t+\t(split.2:chr10:81371422:81371432:+)\tchrX\t63278348\t63278358\t+\n\n\nConvert BAM/SAM format files\n-----------------------------\n`SAM \u003chttp://samtools.sourceforge.net/samtools.shtml#5\u003e`_ (Sequence Alignment Map) format\nis a generic format for storing sequencing alignments, and BAM is binary and compressed\nversion of SAM (`Li et al., 2009 \u003chttp://bioinformatics.oxfordjournals.org/content/25/16/2078.full\u003e`_).\nMost high-throughput sequencing  (HTS) alignments were in SAM/BAM format and many HTS analysis\ntools work with SAM/BAM format. CrossMap updates chromosomes, genome coordinates, header\nsections, and all SAM flags accordingly.  The program version (of CrossMap) is inserted into\nthe header section, along with  the names of the original BAM file and the chain file.  For\npair-end sequencing, insert size is also recalculated. The input BAM file should be sorted\nand indexed properly using samTools (`Li et al., 2009 \u003chttp://bioinformatics.oxfordjournals.org/content/25/16/2078.full\u003e`_).\nOutput format is determined from the input format and BAM output will be sorted and indexed automatically.\n\n\nTyping command without any arguments will print help message::\n\n $ python CrossMap.py bam\n\nScreen output::\n \n Usage: CrossMap.py bam input_chain_file input_bam_file output_file \n\n Options:\n   -m INSERT_SIZE        Average insert size of pair-end sequencing (bp).\n                         [default=200.0]\n   -s INSERT_SIZE_STDEV  Stanadard deviation of insert size. [default=30.0]\n   -t INSERT_SIZE_FOLD   A mapped pair is considered as \"proper pair\" if both\n                         ends mapped to different strand and the distance\n                         between them is less then '-t' * stdev from the mean.\n                         [default=3.0]\n\nExample (Convert BAM from hg19 to hg18)::\n\n $ python2.7 CrossMap.py bam hg19ToHg18.over.chain.gz test.hg19.bam test.hg18\n @ 2013-11-15 14:08:01: Read hg19ToHg18.over.chain.gz ...\n @ 2013-11-15 14:08:01: Liftover BAM file: test.hg19.bam ==\u003e test.hg18.bam\n @ 2013-11-15 14:08:17: Done!\n @ 2013-11-15 14:08:17: Total entries: 164930\n @ 2013-11-15 14:08:17: Failed to map: 5257\n @ 2013-11-15 14:08:17: Sort \"test.hg18.bam\" ...\n @ 2013-11-15 14:08:23: Index \"test.hg18.sorted.bam\" ...\n\n# BAM/SAM header sections was updated::\n\n $ samtools view -H  test.hg19.bam \n @SQ\tSN:chr1\tLN:249250621\n @SQ\tSN:chr2\tLN:243199373\n @SQ\tSN:chr3\tLN:198022430\n @SQ\tSN:chr4\tLN:191154276\n @SQ\tSN:chr5\tLN:180915260\n @SQ\tSN:chr6\tLN:171115067\n @SQ\tSN:chr7\tLN:159138663\n @SQ\tSN:chr8\tLN:146364022\n @SQ\tSN:chr9\tLN:141213431\n @SQ\tSN:chr10\tLN:135534747\n @SQ\tSN:chr11\tLN:135006516\n @SQ\tSN:chr12\tLN:133851895\n @SQ\tSN:chr13\tLN:115169878\n @SQ\tSN:chr14\tLN:107349540\n @SQ\tSN:chr15\tLN:102531392\n @SQ\tSN:chr16\tLN:90354753\n @SQ\tSN:chr17\tLN:81195210\n @SQ\tSN:chr18\tLN:78077248\n @SQ\tSN:chr19\tLN:59128983\n @SQ\tSN:chr20\tLN:63025520\n @SQ\tSN:chr21\tLN:48129895\n @SQ\tSN:chr22\tLN:51304566\n @SQ\tSN:chrX\tLN:155270560\n @SQ\tSN:chrY\tLN:59373566\n @SQ\tSN:chrM\tLN:16571\n @RG\tID:Sample_618545BE\tSM:Sample_618545BE\tLB:Sample_618545BE\tPL:Illumina\n @PG\tID:bwa\tPN:bwa\tVN:0.6.2-r126\n\n $ samtools view -H  test.hg18.bam\n @HD\tVN:1.0\tSO:coordinate\n @SQ\tSN:chr1\tLN:247249719\n @SQ\tSN:chr10\tLN:135374737\n @SQ\tSN:chr11\tLN:134452384\n @SQ\tSN:chr11_random\tLN:215294\n @SQ\tSN:chr12\tLN:132349534\n @SQ\tSN:chr13\tLN:114142980\n @SQ\tSN:chr13_random\tLN:186858\n @SQ\tSN:chr14\tLN:106368585\n @SQ\tSN:chr15\tLN:100338915\n @SQ\tSN:chr15_random\tLN:784346\n @SQ\tSN:chr16\tLN:88827254\n @SQ\tSN:chr17\tLN:78774742\n @SQ\tSN:chr17_random\tLN:2617613\n @SQ\tSN:chr18\tLN:76117153\n @SQ\tSN:chr18_random\tLN:4262\n @SQ\tSN:chr19\tLN:63811651\n @SQ\tSN:chr19_random\tLN:301858\n @SQ\tSN:chr1_random\tLN:1663265\n @SQ\tSN:chr2\tLN:242951149\n @SQ\tSN:chr20\tLN:62435964\n @SQ\tSN:chr21\tLN:46944323\n @SQ\tSN:chr21_random\tLN:1679693\n @SQ\tSN:chr22\tLN:49691432\n @SQ\tSN:chr22_random\tLN:257318\n @SQ\tSN:chr3\tLN:199501827\n @SQ\tSN:chr3_random\tLN:749256\n @SQ\tSN:chr4\tLN:191273063\n @SQ\tSN:chr4_random\tLN:842648\n @SQ\tSN:chr5\tLN:180857866\n @SQ\tSN:chr6\tLN:170899992\n @SQ\tSN:chr6_random\tLN:1875562\n @SQ\tSN:chr7\tLN:158821424\n @SQ\tSN:chr7_random\tLN:549659\n @SQ\tSN:chr8\tLN:146274826\n @SQ\tSN:chr8_random\tLN:943810\n @SQ\tSN:chr9\tLN:140273252\n @SQ\tSN:chr9_random\tLN:1146434\n @SQ\tSN:chrM\tLN:16571\n @SQ\tSN:chrX\tLN:154913754\n @SQ\tSN:chrX_random\tLN:1719168\n @SQ\tSN:chrY\tLN:57772954\n @RG\tID:Sample_618545BE\tSM:Sample_618545BE\tLB:Sample_618545BE\tPL:Illumina\n @PG\tPN:bwa\tID:bwa\tVN:0.6.2-r126\n @PG\tID:CrossMap\tVN:0.1.3\n @CO\tLiftover from original BAM/SAM file: test.hg19.bam\n @CO\tLiftover is based on the chain file: ../test/hg19ToHg18.over.chain.gz \n                         \nNOTE:\n\n1. Input is BAM or SAM format file. Output format depends on input format. (i.e BAM -\u003e BAM, SAM -\u003e SAM)\n2. Alignments that are failed to convert will be saved in \"*.unmap.bam*\" or '*.unmap.sam*'. \n3. If output file is specified as \"STDOUT\", output will be directed to the screen. (in this case, unmapped alignments will be saved to \"input.unmap.bam\" or \"input.unmap.sam\")\n4. Header section will be updated to target assembly.\n5. Genome coordinates and all SAM flags in alignment section will be updated to target assembly.\n6. Optional fields in alignment section will not be updated in current version (v0.1.3).\n\nConvert Wiggle/BigWig format files\n-----------------------------------\n`Wiggle \u003chttp://genome.ucsc.edu/goldenPath/help/wiggle.html\u003e`_ (WIG) format is useful for\ndisplaying continuous data such as GC content and reads intensity of high-throughput sequencing data.\nBigWig is a self-indexed binary-format Wiggle file, and has the advantage of supporting random access.\nThis means only regions that need to be displayed are retrieved by genome browser, and it dramatically\nreduces the time needed for data transferring (`Kent et al., 2010 \u003chttp://bioinformatics.oxfordjournals.org/content/26/17/2204.long\u003e`_).\nInput wiggle data can be in variableStep (for data with irregular intervals) or fixedStep\n(for data with regular intervals). Regardless of the input, the output will always in bedGraph\nformat. bedGraph format is similar to wiggle format and can be converted into BigWig format\nusing UCSC `wigToBigWig \u003chttp://hgdownload.cse.ucsc.edu/admin/exe/\u003e`_ tool. We export files\nin bedGraph because it is usually much smaller than file in wiggle format, and more importantly,\nCrossMap internally transforms wiggle into bedGraph to increase running speed.\n\nIf an input file is in BigWig format, the output is BigWig format if UCSC’s\n'`wigToBigWig \u003chttp://hgdownload.cse.ucsc.edu/admin/exe/\u003e`_' executable can be found;\notherwise, the output file will be in bedGraph format.\n \n\nTyping command without any arguments will print help message::\n \n $ python2.7 CrossMap.py  wig\n\nScreen output::\n \n Usage:\n   CrossMap.py wig input_chain_file input_wig_file output_prefix\n\n Description:\n   \"input_chain_file\" can be regular or compressed (*.gz, *.Z, *.z, *.bz, *.bz2,\n   *.bzip2) file, local file or URL (http://, https://, ftp://) pointing to remote\n   file.  Both \"variableStep\" and \"fixedStep\" wiggle lines are supported. Wiggle\n   format: http://genome.ucsc.edu/goldenPath/help/wiggle.html\n\n Example:\n   CrossMapy.py wig hg18ToHg19.over.chain.gz test.hg18.wig test.hg19\n\nNOTE: \n\n1. To improve performance, this script calls `GNU \"sort\"\n   \u003chttp://www.gnu.org/software/coreutils/manual/html_node/sort-invocation.html\u003e`_ command internally.\n   If \"sort\" command does not exist, CrossMap will exit.    \n\n\nTyping command without any arguments will print help message::\n \n $ python2.7 CrossMap.py  bigwig\n\nScreen output::\n \n Usage:\n   CrossMap.py bigwig input_chain_file input__bigwig_file output_prefix\n\n Description:\n   \"input_chain_file\" can be regular or compressed (*.gz, *.Z, *.z, *.bz, *.bz2,\n   *.bzip2) file, local file or URL (http://, https://, ftp://) pointing to remote\n   file. Bigwig format: http://genome.ucsc.edu/goldenPath/help/bigWig.html\n\n Example:\n   CrossMapy.py bigwig hg18ToHg19.over.chain.gz test.hg18.bw test.hg19\n\nExample (Convert BigWig file from hg18 to hg19)::\n\n $ python CrossMap.py bigwig  hg19ToHg18.over.chain.gz  test.hg19.bw test.hg18\n @ 2013-11-17 22:12:42: Read chain_file:  ../data/hg19ToHg18.over.chain.gz\n @ 2013-11-17 22:12:44: Liftover bigwig file: test.hg19.bw ==\u003e test.hg18.bgr\n @ 2013-11-17 22:15:38: Merging overlapped entries in bedGraph file ...\n @ 2013-11-17 22:15:38: Sorting bedGraph file:test.hg18.bgr\n @ 2013-11-17 22:15:39: Convert wiggle to bigwig ...\n\nNOTE: \n\n1. To improve performance, this script calls `GNU \"sort\"\n   \u003chttp://www.gnu.org/software/coreutils/manual/html_node/sort-invocation.html\u003e`_ command\n   internally. If \"sort\" command does not exist, CrossMap will exit.\n2. Output files: output_prefix.bw, output_prefix.bgr, output_prefix.sorted.bgr \n\n  \nConvert GFF/GTF format files\n-----------------------------------\n`GFF \u003chttp://genome.ucsc.edu/FAQ/FAQformat.html#format3\u003e`_ (General Feature Format) is another\nplain text file used to describe gene structure. `GTF \u003chttp://genome.ucsc.edu/FAQ/FAQformat.html#format4\u003e`_\n(Gene Transfer Format) is a refined version of GTF. The first eight fields are the same as\nGFF. Plain text, compressed plain text, and URLs pointing to remote files are all supported.\nOnly chromosome and genome coordinates are updated. The format of output is determined from\nthe input.\n\nTyping command without any arguments will print help message::\n \n $ python2.7 CrossMap.py  gff\n\nScreen output::\n \n Usage:\n   CrossMap.py gff input_chain_file input_gff_file output_file\n\n Description:\n   \"input_chain_file\" can be regular or compressed (*.gz, *.Z, *.z, *.bz, *.bz2,\n   *.bzip2) file, local file or URL (http://, https://, ftp://) pointing to remote\n   file. input file must be in GFF or GTF format. GFF format:\n   http://genome.ucsc.edu/FAQ/FAQformat.html#format3 GTF format:\n   http://genome.ucsc.edu/FAQ/FAQformat.html#format4\n\n Example:\n   CrossMap.py gff  hg19ToHg18.over.chain.gz test.hg19.gtf test.hg18.gtf #write output to test.hg18.gtf\n\n Example:\n    CrossMap.py gff  hg19ToHg18.over.chain.gz test.hg19.gtf  # write output to screen\n\nExample (Convert GTF file from hg19 to hg18)::\n\n $ python CrossMap.py gff  hg19ToHg18.over.chain.gz test.hg19.gtf test.hg18.gtf\n @ 2013-11-17 20:44:47: Read chain_file:  ../data/hg19ToHg18.over.chain.gz\n \n $ head test.hg19.gtf \n chr1\thg19_refGene\tCDS\t48267145\t48267291\t0.000000\t-\t0\tgene_id \"NM_001194986\"; transcript_id \"NM_001194986\"; \n chr1\thg19_refGene\texon\t66081691\t66081907\t0.000000\t+\t.\tgene_id \"NM_002303\"; transcript_id \"NM_002303\"; \n chr1\thg19_refGene\tCDS\t145334684\t145334792\t0.000000\t+\t2\tgene_id \"NM_001039703\"; transcript_id \"NM_001039703\"; \n chr1\thg19_refGene\texon\t172017752\t172017890\t0.000000\t+\t.\tgene_id \"NM_001136127\"; transcript_id \"NM_001136127\"; \n chr1\thg19_refGene\tCDS\t206589249\t206589333\t0.000000\t+\t2\tgene_id \"NM_001170637\"; transcript_id \"NM_001170637\"; \n chr1\thg19_refGene\texon\t210573812\t210574006\t0.000000\t+\t.\tgene_id \"NM_001170580\"; transcript_id \"NM_001170580\"; \n chr1\thg19_refGene\tCDS\t235850249\t235850347\t0.000000\t-\t0\tgene_id \"NM_000081\"; transcript_id \"NM_000081\"; \n chr1\thg19_refGene\tCDS\t235880012\t235880078\t0.000000\t-\t1\tgene_id \"NM_000081\"; transcript_id \"NM_000081\"; \n chr1\thg19_refGene\texon\t3417741\t3417872\t0.000000\t-\t.\tgene_id \"NM_001409\"; transcript_id \"NM_001409\"; \n chr1\thg19_refGene\texon\t10190773\t10190871\t0.000000\t+\t.\tgene_id \"NM_006048\"; transcript_id \"NM_006048\"; \n \n $ head test.hg18.gtf\n chr1\thg19_refGene\tCDS\t48039732\t48039878\t0.000000\t-\t0\tgene_id \"NM_001194986\"; transcript_id \"NM_001194986\";\n chr1\thg19_refGene\texon\t65854279\t65854495\t0.000000\t+\t.\tgene_id \"NM_002303\"; transcript_id \"NM_002303\";\n chr1\thg19_refGene\tCDS\t144046041\t144046149\t0.000000\t+\t2\tgene_id \"NM_001039703\"; transcript_id \"NM_001039703\";\n chr1\thg19_refGene\texon\t170284375\t170284513\t0.000000\t+\t.\tgene_id \"NM_001136127\"; transcript_id \"NM_001136127\";\n chr1\thg19_refGene\tCDS\t204655872\t204655956\t0.000000\t+\t2\tgene_id \"NM_001170637\"; transcript_id \"NM_001170637\";\n chr1\thg19_refGene\texon\t208640435\t208640629\t0.000000\t+\t.\tgene_id \"NM_001170580\"; transcript_id \"NM_001170580\";\n chr1\thg19_refGene\tCDS\t233916872\t233916970\t0.000000\t-\t0\tgene_id \"NM_000081\"; transcript_id \"NM_000081\";\n chr1\thg19_refGene\tCDS\t233946635\t233946701\t0.000000\t-\t1\tgene_id \"NM_000081\"; transcript_id \"NM_000081\";\n chr1\thg19_refGene\texon\t3407601\t3407732\t0.000000\t-\t.\tgene_id \"NM_001409\"; transcript_id \"NM_001409\";\n chr1\thg19_refGene\texon\t10113360\t10113458\t0.000000\t+\t.\tgene_id \"NM_006048\"; transcript_id \"NM_006048\"; \n\n\nNOTE:\n\n1. Each feature  (exon, intron, UTR, etc) is processed separately and independently, and\n   we do NOT check if features originally belonging to the same gene were converted into the same gene.\n2. If user want to liftover gene annotation files, use BED12 format.\n3. If no output file was specified, output will be printed to screen (console). In this case, items failed to convert are also printed out.\n  \nConvert VCF format files\n-----------------------------------\n`VCF \u003chttp://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-41\u003e`_\n(variant call format) is a flexible and extendable line-oriented text format developed by\nthe `1000 Genome Project \u003chttp://www.1000genomes.org/\u003e`_. It is useful for representing single\nnucleotide variants, indels, copy number variants, and structural variants. Chromosomes,\ncoordinates, and reference alleles are updated to a new assembly, and all the other fields\nare not changed.\n\nTyping command without any arguments will print help message::\n\n $ python2.7 CrossMap.py  gff\n\nScreen output::\n\n usage:\n   CrossMap.py vcf input_chain_file input_VCF_file ref_genome_file output_file\n\n Description:\n   \"input_chain_file\" and \"input_VCF_file\" can be regular or compressed (*.gz, *.Z,\n   *.z, *.bz, *.bz2, *.bzip2) file, local file or URL (http://, https://, ftp://)\n   pointing to remote file. \"ref_genome_file\" is genome sequence file of 'target\n   assembly' in FASTA foramt.\n\n Example:\n   CrossMap.py vcf hg19ToHg18.over.chain.gz test.hg19.vcf hg18.fa test.hg18.vcf\n   \nExample (Convert VCF file from hg19 to hg18)::\n\n $ python CrossMap.py vcf hg19ToHg18.over.chain.gz test.hg19.vcf ../database/genome/hg18.fa  test.hg18.vcf\n @ 2015-07-27 10:14:23: Read chain_file:  ../data/hg19ToHg18.over.chain.gz\n @ 2013-11-17 20:53:39: Creating index for ../database/genome/hg18.fa\n @ 2015-07-27 10:14:50: Total entries: 497\n @ 2015-07-27 10:14:50: Failed to map: 0 \n \n $ grep -v '#' test.hg19.vcf  |head -10\n chr1\t10933566\t.\tC\tG\t.\tPASS\tADP=13;WT=0;HET=0;HOM=1;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t1/1:7:13:13:0:13:100%:9.6148E-8:0:36:0:0:8:5\n chr1\t11187893\t.\tT\tC\t.\tPASS\tADP=224;WT=0;HET=0;HOM=1;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t1/1:133:226:224:0:224:100%:3.6518E-134:0:38:0:0:41:183\n chr1\t11205058\t.\tC\tT\t.\tPASS\tADP=625;WT=0;HET=0;HOM=1;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t1/1:255:643:625:0:625:100%:0E0:0:37:0:0:294:331\n chr1\t11292753\t.\tA\tG\t.\tPASS\tADP=52;WT=0;HET=0;HOM=1;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t1/1:27:52:52:2:50:96.15%:9.0394E-28:39:38:0:2:0:50\n chr1\t11318763\t.\tC\tG\t.\tstr10\tADP=88;WT=0;HET=0;HOM=1;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t1/1:51:88:88:0:88:100%:1.7384E-52:0:38:0:0:1:87\n chr1\t11319587\t.\tA\tG\t.\tPASS\tADP=70;WT=0;HET=0;HOM=1;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t1/1:40:70:70:0:70:100%:1.0659E-41:0:38:0:0:0:70\n chr1\t16202995\t.\tC\tT\t.\tPASS\tADP=463;WT=0;HET=1;HOM=0;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t0/1:1:463:463:458:5:1.08%:3.0913E-2:37:33:188:270:4:1\n chr1\t27088546\t.\tA\tT\t.\tPASS\tADP=124;WT=0;HET=1;HOM=0;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t0/1:21:124:124:65:59:47.58%:1.7915E-22:37:38:59:6:55:4\n chr1\t27101390\t.\tT\tC\t.\tstr10\tADP=267;WT=0;HET=1;HOM=0;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t0/1:1:267:267:262:5:1.87%:3.0665E-2:32:22:85:177:5:0\n chr1\t34007097\t.\tT\tC\t.\tPASS\tADP=10;WT=0;HET=1;HOM=0;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t0/1:1:10:10:6:4:40%:4.3344E-2:34:32:0:6:0:4\n\n $ grep -v '#' test.hg18.vcf  |head -10\n 1\t10856153\t.\tC\tG\t.\tPASS\tADP=13;WT=0;HET=0;HOM=1;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t1/1:7:13:13:0:13:100%:9.6148E-8:0:36:0:0:8:5\n 1\t11110480\t.\tT\tC\t.\tPASS\tADP=224;WT=0;HET=0;HOM=1;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t1/1:133:226:224:0:224:100%:3.6518E-134:0:38:0:0:41:183\n 1\t11127645\t.\tC\tT\t.\tPASS\tADP=625;WT=0;HET=0;HOM=1;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t1/1:255:643:625:0:625:100%:0E0:0:37:0:0:294:331\n 1\t11215340\t.\tA\tG\t.\tPASS\tADP=52;WT=0;HET=0;HOM=1;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t1/1:27:52:52:2:50:96.15%:9.0394E-28:39:38:0:2:0:50\n 1\t11241350\t.\tC\tG\t.\tstr10\tADP=88;WT=0;HET=0;HOM=1;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t1/1:51:88:88:0:88:100%:1.7384E-52:0:38:0:0:1:87\n 1\t11242174\t.\tA\tG\t.\tPASS\tADP=70;WT=0;HET=0;HOM=1;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t1/1:40:70:70:0:70:100%:1.0659E-41:0:38:0:0:0:70\n 1\t16075582\t.\tC\tT\t.\tPASS\tADP=463;WT=0;HET=1;HOM=0;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t0/1:1:463:463:458:5:1.08%:3.0913E-2:37:33:188:270:4:1\n 1\t26961133\t.\tA\tT\t.\tPASS\tADP=124;WT=0;HET=1;HOM=0;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t0/1:21:124:124:65:59:47.58%:1.7915E-22:37:38:59:6:55:4\n 1\t26973977\t.\tT\tC\t.\tstr10\tADP=267;WT=0;HET=1;HOM=0;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t0/1:1:267:267:262:5:1.87%:3.0665E-2:32:22:85:177:5:0\n 1\t33779684\t.\tT\tC\t.\tPASS\tADP=10;WT=0;HET=1;HOM=0;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t0/1:1:10:10:6:4:40%:4.3344E-2:34:32:0:6:0:4\n\n $ grep -v '#' test.hg18.vcf.unmap \t#coordinates are still based on hg19\n chr14\t20084444\t.\tG\tC\t.\tPASS\tADP=253;WT=0;HET=1;HOM=0;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t0/1:1:253:253:247:5:1.98%:3.0631E-2:38:39:123:124:5:0\n chr14\t20086290\t.\tT\tC\t.\tPASS\tADP=441;WT=0;HET=1;HOM=0;NC=0\tGT:GQ:SDP:DP:RD:AD:FREQ:PVAL:RBQ:ABQ:RDF:RDR:ADF:ADR\t0/1:4:441:441:427:14:3.17%:5.4963E-5:37:38:236:191:6:8\n\n\nNOTE:\n\n1. Genome coordinates and reference allele will be updated to target assembly.\n2. Reference genome is genome sequence of target assembly.\n3. If the reference genome sequence file (../database/genome/hg18.fa) was not indexed, CrossMap will automatically indexed it (only the first time you run CrossMap). \n4. Output files: *output_file* and *output_file.unmap*. \n5. In the output VCF file, whether the chromosome IDs contain \"chr\" or not depends on the format of the input VCF file. \n\n\nCompare to UCSC liftover tool\n=======================================\n\nTo access the accuracy of CrossMap, we randomly generated 10,000 genome intervals (download from `here \u003chttps://sourceforge.net/projects/crossmap/files/hg19.rand.bed.gz/download\u003e`_) with the\nfixed interval size of 200 bp from hg19. Then we converted them into hg18 using CrossMap\nand `UCSC liftover tool \u003chttp://genome.ucsc.edu/cgi-bin/hgLiftOver\u003e`_ with default configurations. We compare CrossMap\nto `UCSC liftover tool \u003chttp://genome.ucsc.edu/cgi-bin/hgLiftOver\u003e`_ because it is the most widely\nused tool to convert genome coordinates.\n\nCrossMap failed to convert 613 intervals, and UCSC liftover tool failed to convert 614\nintervals. All failed intervals are exactly the same except one region (chr2 90542908 90543108).\nUCSC failed to convert it because this region needs to be split twice:\n\n==========================   ===========================   ====================================\nOriginal (hg19)              Split (hg19)                  Target (hg18)\n==========================   ===========================   ====================================\nchr2 90542908  90543108 -    chr2 90542908 90542933 -      chr2    89906445        89906470 -\nchr2 90542908  90543108 -    chr2 90542933 90543001 -      chr2    87414583        87414651 -\nchr2 90542908  90543108 -    chr2 90543010 90543108 -      chr2    87414276        87414374 -\n==========================   ===========================   ====================================\n\nFor genome intervals that were successfully converted to hg18, the start and end coordinates are\nexactly the same between UCSC conversion and CrossMap conversion.\n\n.. image:: _static/CrossMap_vs_UCSC.png\n   :height: 400 px\n   :width: 700 px\n   :scale: 100 %\n   :alt: CrossMap_vs_UCSC_liftover.png\n   \n   \nCitation\n=========\nZhao, H., Sun, Z., Wang, J., Huang, H., Kocher, J.-P., \u0026 Wang, L. (2013). CrossMap: a versatile tool for coordinate conversion between genome assemblies. Bioinformatics (Oxford, England), btt730.   \n\nLICENSE\n==========\nCrossMap is distributed under `GNU General Public License \u003chttp://www.gnu.org/copyleft/gpl.html\u003e`_\n\nThis program is free software; you can redistribute it and/or\nmodify it under the terms of the GNU General Public License as\npublished by the Free Software Foundation; either version 2 of the\nLicense, or (at your option) any later version. This program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\nGeneral Public License for more details. You should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA\n02110-1301 USA\n\n\nContact                        \n====================\n\n* Wang.Liguo AT mayo.edu\n\n.. image:: _static/mayo.jpg\n   :height: 80 px\n   :width: 80 px\n   :scale: 100 %\n   :alt: Mayo logo\n.. image:: _static/mdacc.jpg\n   :height: 80 px\n   :width: 150 px\n   :scale: 100 %\n   :alt: MDACC logo\n.. image:: _static/sourceforge.jpg\n   :height: 100 px\n   :width: 150 px\n   :scale: 100 %\n   :alt: sourceforege logo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultimeric%2Fcrossmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultimeric%2Fcrossmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultimeric%2Fcrossmap/lists"}