Skip to content

Commit

Permalink
add setuptools stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
brentp committed Dec 28, 2013
1 parent 1a90c2a commit 8f95001
Show file tree
Hide file tree
Showing 4 changed files with 396 additions and 9 deletions.
24 changes: 16 additions & 8 deletions README.md
Expand Up @@ -25,25 +25,33 @@ could be improvements.
QuickStart
==========

Without installation, you can use as `python bwameth.py` with install, the
command is `bwa-meth`.

The commands:

python bwa-meth.py index $REF
python bwa-meth.py --reference $REF some_R1.fastq.gz some_R2.fastq.gz --prefix some.output
bwa-meth index $REF
bwa-meth --reference $REF some_R1.fastq.gz some_R2.fastq.gz --prefix some.output

will create `some.output.bam` and `some.output.bam.bai`

Installation
============

`bwa-meth.py` depends on
`bwa-meth` depends on

+ python 2.7
- `toolshed` library. can be installed with:
* `easy_install toolshed` or
* `pip install toolshed`

- or run: `python setup.py install` from this directory

+ samtools command on the `$PATH` (https://github.com/samtools/samtools)




usage
=====

Expand All @@ -52,15 +60,15 @@ Index

One time only, you need to index a reference sequence.

python bwa-meth.py index $REFERENCE
bwa-meth index $REFERENCE

If your reference is `some.fasta`, this will create `some.c2t.fasta`
and all of the bwa indexes associated with it.

Align
-----

python bwa-meth.py --threads 16 \
bwa-meth --threads 16 \
--prefix $PREFIX \
--reference $REFERENCE \
$FQ1 $FQ2
Expand All @@ -75,10 +83,10 @@ or not.
The command above will be sent to BWA to do the work as something like:

bwa mem -L 25 -pCM -t 15 $REFERENCE.c2t.fa \
'<python bwa-meth.py c2t $FQ1 $FQ2'
'<python bwa-meth c2t $FQ1 $FQ2'

So the converted reads are streamed directly to bwa and **never written
to disk**. The output from that is modified by `bwa-meth.py` and streamed
to disk**. The output from that is modified by `bwa-meth` and streamed
straight to a bam file.

Tabulate
Expand All @@ -89,7 +97,7 @@ for SNPs.

E.g.:

bwa-meth.py tabulate \
bwa-meth tabulate \
--trim 3,3 \
--map-q 60 \
--bissnp BisSNP-0.82.2.jar \
Expand Down
2 changes: 1 addition & 1 deletion bwa-meth.py → bwameth.py
Expand Up @@ -429,7 +429,7 @@ def tabulate_main(args):
print >>fhs[sample], fmt.format(**d)


def main(args):
def main(args=sys.argv[1:]):

if len(args) > 0 and args[0] == "index":
sys.exit(bwa_index(convert_fasta(args[1])))
Expand Down

0 comments on commit 8f95001

Please sign in to comment.