Lifting over bam
Sometimes for amplicon sequencings, we would like to map reads to the amplicon sequence only but bringing them back to genomic coordinates for easy variant calling and viewing.
Let's say we have a gene in chr1:100-1000, and we would first extract this locus from the genome fasta file to make a new fasta record with name >chr1:100-1000, this can be done with:
echo "chr1:100-1000" | samtools faidx -r - genome.fa > gene.fa
and map the reads to this single gene fasta file with bwa or bowtie2 to make a bam alignment file:
bwa mem gene.fa query.fq | samtools view -b > gene.bam
So what if you want to put these alignments back to the genomic coordinates after that?
The liftover_bam.liftover function is trying to solve this problem in pure python!
gene_bam="gene.bam"
genome_bam="any.bam_file_that_maps_to_the_genome"
out_bam="where_you_want_your_output_bam_file_to_be"
liftover(gene_bam, genome_bam, out_bam)
Metadata
Release files for liftover-bam 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| liftover_bam-0.1.0.tar.gz | 3.7 kB | Without provenance | Details for liftover_bam-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| liftover_bam-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for liftover_bam-0.1.0-py3-none-any.whl |
Total release size: 7.3 kB
Release files / liftover_bam-0.1.0.tar.gz
| Download URL | liftover_bam-0.1.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
501c7e7d8f073ea3ea125ea4b1210810a3c9707e1fea90bc40f3134bc8fcc31a
|
|
BLAKE2b-256 checksum How to use checksums |
098a82ad1a8841b20ac6746bc0dadbb4357fec2226dbf2d8db83ebd00a59833b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.9.13 Darwin/21.5.0
|
Release files / liftover_bam-0.1.0-py3-none-any.whl
| Download URL | liftover_bam-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fde20fa7dfb8cc1585b69fc00354ab20d15e472fc38d321ac0ea652968915ba9
|
|
BLAKE2b-256 checksum How to use checksums |
3c20eb4efda3d3ee8c2acd7aa412535ced849aaa3b06b142d2e64bd4b7176485
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.9.13 Darwin/21.5.0
|
Security for liftover-bam 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.