GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - davidenoma/LiftOver: Liftover genotype files from different builds for Plink formatted genotype files.

BranchesTags
Open more actions menu

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
README.md
README.md
 
 
liftover_python_umich_update.py
liftover_python_umich_update.py
 
 

Repository files navigation


Plink LiftOver Python Script

Overview

This Python script facilitates lifting of genetic data files (Plink format MAP, PED) from one Human genome build version to another using the liftOver tool . It can liftover from easily between multiple builds available. E.g Hg19, Hg18, GRCH36 and others.

wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/liftOver
export PATH=$PATH:/~liftOver PATH

The script converts input files to BED format, performs lifting, and converts back to the original format, providing a seamless transition between genome versions.

Usage

python liftover_python_umich_update.py -m old.map -p old.ped -c chain_file -o new.prefix

Arguments

  • -m, --map: Input MAP file containing genetic marker information (required).
  • -p, --ped: Input PED file containing genotype information (optional).
  • -- CHAIN: Liftover Chain File.
  • -o, --prefix: Prefix for output files (required).
  • --LIFTOVER_BIN: Lifover Binaries.

Functions

  1. usage(): Prints the usage information of the script.
  2. die(msg): Prints error message and exits the script.
  3. myopen(fn): Opens a file and handles gzip format if applicable.
  4. map2bed(fin, fout): Converts MAP file to BED format.
  5. liftBed(fin, fout, unlifted): Lifts BED file using liftOver tool.
  6. bed2map(fin, fout): Converts BED file back to MAP format.
  7. liftPed(fin, fout, fOldMap): Lifts PED file.

Execution

  • The script parses command-line arguments.
  • Converts MAP to BED format.
  • Performs lifting using liftOver.
  • LIFTOVER_BIN
$ wget https://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/liftOver
$ chmod +x ./filePath/liftOver
$ ./filePath/liftOver
  • Converts lifted files back to original formats.

Dependencies

  • Ensure that the liftOver tool is installed and accessible in the system path.
  • Ensure that you get the appropriate chain file (that conversts one build to another) from https://hgdownload2.soe.ucsc.edu/downloads.html
  • Plink genotype files can be recoded from binary (bed, bim and fam) to text (map and ped) formats
plink --bfile {prefix} --recode --out {output_file_name}

To re-obtain binary formats we do:

plink --file {} --recode --make-bed --out {output_file_name}

About

Liftover genotype files from different builds for Plink formatted genotype files.

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.