Giter Site home page Giter Site logo

pindel2bam's Introduction

#Pindel2BAM Convert Pindel output into BAM format.

##Compiling To convert from Pindel to BAM, first compile pindel2sam.cpp with the provided Make file. Pindel2BAM can compile with gcc version 4.4.3.

##Usage Pindel2BAM takes four inputs in the following order:

  • Pindel data directory
  • desired output directory
  • Pindel config file that was used to generate the Pindel data
  • Genome reference index file (fa.fai) used to generate the Pindel data

Only the deletion and short insertion data are used (_D & _SI), and all Pindel data files within the Pindel data directory provided will be read, converted, and compiled initially into SAM files (same file names as in the config file with the .sam file extension appended). The SAM files are written into the desired output directory and converted to BAM files. Finally, the BAM files are sorted and indexed using the following samtools commands.

samtools view -bS convertedfilename.sam > bamfilename.bam
samtools sort bamfilename.bam sortedbamfilename.bam
samtools index sortedbamfilename.bam

The sorted files can then be used in a genome viewer such as IGV as normal.

##NOTES Pindel2BAM assumes that you have at least samtools version 1.5. Currently, filler data exists for the following SAM fields:

  • FLAG = 2
  • MAPQ = *
  • RNEXT = *
  • PNEXT = 0
  • TLEN = 0
  • QUAL = *

If the converter pin2sam has not been compiled, then Pindel2BAM will compile it automatically.

If your bam file names listed in the config file have a directory prefix, then the / will be turned into _ for the output file names.

If output files already exist, Pindel2SAM will append any data within the _D and _SI files to the existing output .sam files. You must therefore clean out the output directory before running if you want fresh conversions.

pindel2bam's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pindel2bam's Issues

incorrect CIGAR

Given this input:

####################################################################################################
31      D 9     NT 9 "TTTTTTTTT"        ChrID 5 BP 68565044     68565054        BP_range 68565044       68565054        Supports 17     17      + 0     0       - 17    17      S1 18   SUM_MS 1190     2       NumSupSamples 2 2       Normal 370 402 0 0 4 4  Tumor 187 209 0 0 13 13
ATTGCATCACTCACTGCAGCCTGGGTGACAGAGCGAGACTCTGTCTCTCTAAAAAAAGAAAAAAATTAAAAAAAAAAAACCCACCTTGAAAAGTCTCCCTCTTACTTTCTTTCAGGTTCCTTTTTT         TTCAGACCTTGATCAGCTAACAAGAATATTTGAAACTTTGGGCACACCAACTGAGGAACAGTGGCCGGTAAGCCTTTATGCATTTTCTTTGAAATGTAATTAGGACTCTGTAAAGTTCTTAAACTG
                                                                          AAAAACCCACCTTGAAAAGTCTCCCTCTTACTTTCTTTCAGGTTCCTTTTTTTTTTTTTGTTTCAGACCTTGATCAGCTAACAAGAATATTTGAAACTTTGGGCACACCAACTGAGGAACAGTGGC                -       68565142        70      Tumor   @K00346:24:HFKG7BBXX:3:2110:8633:41563/2

pin2sam generates the following SAM record:

K00346:24:HFKG7BBXX:3:2110:8633:41563	18	5	68564993	60	52M9I9D65M	*	0	0	AAAAACCCACCTTGAAAAGTCTCCCTCTTACTTTCTTTCAGGTTCCTTTTTTTTTTTTTGTTTCAGACCTTGATCAGCTAACAAGAATATTTGAAACTTTGGGCACACCAACTGAGGAACAGTGGC	*	PG:Z:Pindel,CI:Z:52M9I9D65M

This alignment does not contain a deletion. However, the generated CIGAR tag includes 9D.

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.