Skip to content
/ hapviz Public

indel haplotype visualization on the command line from BAM files

Notifications You must be signed in to change notification settings

ekg/hapviz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hapviz: region-bounded haplotype pileup visualization for BAM files

it all happens in the terminal!

    % hapviz --help
    usage: hapviz [options] bam file [... bam file]

    options:
        -b, --bam           bam file to from which to extract reads
                            (may also be specified as positional arguments)
        -r, --region        region from which to extract grouped reads
        -a, --show-all      When visualizing, show all alignments, not just variant ones.
        -f, --reference     FASTA reference against which alignments have been aligned
        -q, --min-base-quality
                            minimum base quality required for all bases in a read

    Displays haplotype groups from the specified region across the BAM files provided as input.


Note: If you list 'stdin' as one of the BAM files, you can pipe BAM directly into hapviz.

This (slightly modified) example output shows how each indel haplotype is
grouped, and the reads from it are aligned to a reference sequence.  Relative
deletions between the reference and reads are replaced by '-'.


17 i:16817:GGCAC
                      16788   CCCAGCACTTCAGGGCTTTAGCTGGGAGGGA-----GGCAGTCCACAGGAATGAATTCATCACT   16862
sample08 31M5I34M              CCAGCACTTCAGGGCTTTAGCTGGGAGGGAGGCACGGCAGTCCACAGGAAT
sample03 30M5I35M               CAGCACTTCAGGGCTTTAGCTGGGAGGGAGGCACGGCAGTCCACAGGAATG
sample02 27M5I38M                 GCACTTCAGGGCTTTAGCTGGGAGGGAGGCACGGCAGTCCACAGGAATGAAT
sample05 26M5I39M                  CACTTCAGGGCTTTAGCTGGGAGGGAGGCACGGCAGTCCACAGGAATGAATT
sample05 24M5I41M                    CTTCAGGGCTTTAGCTGGGAGGGAGGCACGGCAGTCCACAGGAATGAATTCA
sample07 21M5I44M                       CAGGGCTTTAGCTGGGAGGGAGGCACGGCAGTCCACAGGAATGAATTCATCA
sample07 21M5I44M                       CAGGGCTTTAGCTGGGAGGGAGGCACGGCAGTCCACAGGAATGAATTCATCA
sample03 19M5I46M                         GGGCTTTAGCTGGGAGGGAGGCACGGCAGTCCACAGGAATGAATTCATCACT
sample08 14M5I51M                              TTAGCTGGGAGGGAGGCACGGCAGTCCACAGGAATGAATTCATCACT
--------------------------------------------------------------
1 i:16817:GGCAG
                      16765   GTGCTGCCCTCTCCCCAGCACTTCAGGGCTTTAGCTGGGAGGGA-----GGCAGTCCACAGG   16829
sample03 52M5I13M             GTGCTGCCCTCTCCCCAGCACTTCAGGGCTTTAGCTGGGAGGGAGGCAGGGCAGTCCACAGG
--------------------------------------------------------------
1 i:16821:T
                      16758   ATACAGGGTGCTGCCCTCTCCCCAGCACTTCAGGGCTTTAGCTGGGAGGGAGGCA-GTC   16823
sample03 63M1I3M3S            ATACAGGGTGCTGCCCTCTCCCCAGCACTTCAGGGCTTTAGCTGGGAGGGAGGCATGTC
--------------------------------------------------------------


Enjoy!


author: erik garrison <erik.garrison@bc.edu>
license: free

About

indel haplotype visualization on the command line from BAM files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published