Git Product home page Git Product logo

split_bam_into_hp's Introduction

Split haplotype BAM by haplotag

Split Bam file in to three isolated bam by using Haplotype tags (HP:i:1 or HP:i:2)

There are two step:
(1) Divide Input-Bam into 3 files:
'Haplotype 1 Bam'--'1.0.bam'
'Haplotype 2 Bam'--'2.0.bam'
'Unphased Bam' --'0.0.bam'
(2) Index and Sort 3 new Bam files (Require samtools env)


Proactive

Example:

conda create -n py39 -c bioconda python=3.9.13 pysam==0.19.1
conda activate py39

Usage

This generator requires pysam, samtools when use it in HPC.

You can simply run it by using this script:

python3 Split_bam_into_HP.py -b my.bam -hp HP

You can Specify the output file name and output folder:

python3 Split_bam_into_HP.py -b my.bam -hp HP -o1 new_HP_1.bam -o2 new_HP_2.bam  -o3 new_noHP.bam -d /outputdirection/

Note

This small tool adapts to duel with bam file which added 'HP:i' tags by longshot, longphase๏ผŒ etc..

split_bam_into_hp's People

Contributors

btbtbtqqq avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.