Skip to content

Commit

Permalink
resolved build error with convert addition
Browse files Browse the repository at this point in the history
  • Loading branch information
walaj committed Feb 9, 2017
1 parent 05d043d commit 7877485
Show file tree
Hide file tree
Showing 4 changed files with 760 additions and 38 deletions.
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -17,6 +17,7 @@ Table of contents
* [Tile](#tile)
* [Relabel](#relabel)
* [Mol](#mol)
* [Convert](#convert)
* [Example Recipes](#examples-recipes)
* [Attributions](#attributions)

Expand Down Expand Up @@ -91,6 +92,17 @@ The output BED format is chr, start, end, MI, BX, read_count
bxtools mol $bam > mol_footprint.bed
```

#### Convert
Switch the alignment chromosome with the BX tag. This is a hack to allow a 10X BAM to be sorted and indexed by BX tag, rather than coordinate.
Useful for rapid lookup of all BX reads from a particular BX. Note that this switches "-" for "_" to make query possible with ``samtools view``.
This also requires a two-pass solution. The first loop is to get all of the unique BX tags to build the new BAM header. The second makes the switches.
This means that streaming from ``stdin`` is not available.
``
bxtools convert $bam | samtools sort - -o bx_sorted.bam
samtools index bx_sorted.bam
samtools view AGTCCAAGTCGGAAGT_1
``

Example recipes
---------------
#### Get BX level coverage in 2kb bins across genome, ignore low-frequency tags
Expand Down
3 changes: 3 additions & 0 deletions config.h
Expand Up @@ -46,6 +46,9 @@
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "bxtools"

/* Define to the home page for this package. */
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "0.0"

Expand Down

0 comments on commit 7877485

Please sign in to comment.