|
1 | | -# plinkliftover |
| 1 | +# PLINKLiftOver |
2 | 2 |
|
3 | | -<div align="center"> |
| 3 | +<div align="justified"> |
4 | 4 |
|
5 | 5 | [](https://github.com/milescsmith/plinkliftover/actions?query=workflow%3Abuild) |
6 | 6 | [](https://pypi.org/project/plinkliftover/) |
7 | 7 | [](https://github.com/milescsmith/plinkliftover/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Aapp%2Fdependabot) |
8 | 8 |
|
9 | 9 | [](https://github.com/psf/black) |
10 | 10 | [](https://github.com/PyCQA/bandit) |
11 | | -[](https://github.com/milescsmith/plinkliftover/blob/master/.pre-commit-config.yaml) |
12 | 11 | [](https://github.com/milescsmith/plinkliftover/releases) |
13 | 12 | [](https://github.com/milescsmith/plinkliftover/blob/master/LICENSE) |
| 13 | + |
14 | 14 |
|
15 | | -Awesome `plinkliftover` is a Python cli/package created with https://github.com/TezRomacH/python-package-template |
| 15 | +**PLINKLiftOver** is a utility enabling [liftOver](http://genome.ucsc.edu/cgi-bin/hgLiftOver) |
| 16 | +to work on genomics files from [PLINK](https://www.cog-genomics.org/plink/), |
| 17 | +allowing one to update the coordinates from one genome reference version to |
| 18 | +another. |
16 | 19 |
|
17 | 20 | </div> |
18 | | - |
19 | 21 | ## Installation |
20 | 22 |
|
| 23 | +PLINKLiftOver requires |
| 24 | +* Python 3.8 |
| 25 | +* The command line version of [liftOver](http://genome.ucsc.edu/cgi-bin/hgLiftOver), |
| 26 | +installed and on the system path |
| 27 | +* An appropriate [chain file](http://hgdownload.soe.ucsc.edu/downloads.html#liftover) |
| 28 | +* The [MAP file](https://zzz.bwh.harvard.edu/plink/data.shtml) from a PLINK |
| 29 | +dataset |
| 30 | + |
21 | 31 | ```bash |
22 | 32 | pip install -U plinkliftover |
23 | 33 | ``` |
24 | 34 |
|
25 | | -or install with `Poetry` |
| 35 | +or install with the development version with |
26 | 36 |
|
27 | 37 | ```bash |
28 | | -poetry add plinkliftover |
| 38 | +pip install -U git+https://github.com/milescsmith/plinkliftover.git |
29 | 39 | ``` |
30 | 40 |
|
31 | | -Then you can run |
| 41 | +## Usage |
32 | 42 |
|
33 | 43 | ```bash |
34 | | -plinkliftover --help |
| 44 | +Usage: plinkliftover [OPTIONS] MAPFILE CHAINFILE |
| 45 | + |
| 46 | + Converts genotype data stored in plink's PED+MAP format from one genome |
| 47 | + build to another, using liftOver. |
| 48 | +
|
| 49 | +Arguments: |
| 50 | + MAPFILE The plink MAP file to `liftOver`. [required] |
| 51 | + CHAINFILE The location of the chain files to provide to `liftOver`. |
| 52 | + [required] |
| 53 | +
|
| 54 | +Options: |
| 55 | + --pedfile TEXT Optionally remove "unlifted SNPs" from the plink |
| 56 | + PED file after running `liftOver`. |
| 57 | + --datfile TEXT Optionally remove 'unlifted SNPs' from a data |
| 58 | + file containing a list of SNPs (e.g. for |
| 59 | + --exclude or --include in `plink`) |
| 60 | + --prefix TEXT The prefix to give to the output files. |
| 61 | + --liftoverexecutable TEXT The location of the `liftOver` executable. |
| 62 | + -v, --version Prints the version of the plinkliftover package. |
| 63 | + --help Show this message and exit. |
35 | 64 | ``` |
36 | 65 |
|
| 66 | +For example |
| 67 | +
|
37 | 68 | ```bash |
38 | | -plinkliftover --name Roman |
| 69 | +plinkliftover updating.map hg19ToHg38.over.chain.gz |
39 | 70 | ``` |
40 | 71 |
|
41 | | -or if installed with `Poetry`: |
| 72 | +### Note! |
42 | 73 |
|
43 | | -```bash |
44 | | -poetry run plinkliftover --help |
45 | | -``` |
| 74 | +By default, [PLINK 2.0](https://www.cog-genomics.org/plink/2.0/) does not |
| 75 | +use/create the required MAP file. It can be generated using PLINK 1.9 by |
46 | 76 |
|
47 | 77 | ```bash |
48 | | -poetry run plinkliftover --name Roman |
| 78 | +plink --bfile original --recode --out to_update |
49 | 79 | ``` |
50 | 80 |
|
51 | | -## 📈 Releases |
52 | | - |
53 | | -You can see the list of available releases on the [GitHub Releases](https://github.com/milescsmith/plinkliftover/releases) page. |
54 | | - |
55 | | -We follow [Semantic Versions](https://semver.org/) specification. |
56 | | - |
57 | | -We use [`Release Drafter`](https://github.com/marketplace/actions/release-drafter). As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when you’re ready. With the categories option, you can categorize pull requests in release notes using labels. |
58 | | - |
59 | | -For Pull Request this labels are configured, by default: |
60 | | - |
61 | | -| **Label** | **Title in Releases** | |
62 | | -| :-----------------------------------: | :---------------------: | |
63 | | -| `enhancement`, `feature` | 🚀 Features | |
64 | | -| `bug`, `refactoring`, `bugfix`, `fix` | 🔧 Fixes & Refactoring | |
65 | | -| `build`, `ci`, `testing` | 📦 Build System & CI/CD | |
66 | | -| `breaking` | 💥 Breaking Changes | |
67 | | -| `documentation` | 📝 Documentation | |
68 | | -| `dependencies` | ⬆️ Dependencies updates | |
69 | | - |
70 | | -You can update it in [`release-drafter.yml`](https://github.com/milescsmith/plinkliftover/blob/master/.github/release-drafter.yml). |
71 | | - |
72 | | -GitHub creates the `bug`, `enhancement`, and `documentation` labels for you. Dependabot creates the `dependencies` label. Create the remaining labels on the Issues tab of your GitHub repository, when you need them. |
| 81 | +where `original` is the prefix for the bed/bim/fam files and `to_update` is the prefix to give the new files. |
73 | 82 |
|
74 | 83 | ## 🛡 License |
75 | 84 |
|
|
0 commit comments