Last active
August 29, 2015 13:57
-
-
Save porterjamesj/9399294 to your computer and use it in GitHub Desktop.
the interface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pipeline.main import pipeline_from_config | |
from pipeline.tools import async | |
from genomics_tools import parse_bowtie_output | |
with pipeline_from_config("/path/to/config.yaml") as p: | |
with async(): | |
p.run("cutadapt --quality-base=33 --quality-cutoff=20 --format=fastq --minimum-length=0 --output={path1}/{name1}.trimmed.fastq {path1}/{name1}.fastq") | |
p.run("cutadapt --quality-base=33 --quality-cutoff=20 --format=fastq --minimum-length=0 --output={path2}/{name2}.trimmed.fastq {path2}/{name1}.fastq") | |
p.run("mkdir {workdir}/bowtie") | |
innder_dist,std_dev = parse_bowtie_output(p.run("bowtie2 -p 8 -s 100000 -u 250000 -q -x /path/to/bowtie/index -1 {path1}/{name1}.trimmed.fastq -2 {path2}/{name2}.trimmed.fastq -S {workdir}/bowtie/{description}.bam")) | |
p.run("tophat --num-threads=8 --GTF={gtf} --no-coverage-search --output-dir={workdir}/tophat --mate-std-dev={std_dev} --mate-inner-dist={inner_dist} /path/to/bowtie/index {name1}.trimmed.fastq {name2}.trimmed.fastq") | |
p.run("cufflinks . . . ") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
things to think about:
p.run
. maybe another context manager? scripts could get fairly throny. the core problem is that we don't want this to be too magical (i.e. it should feel like writing a bash script that gets applied in parallel), but having the user manually specify the cleanup procedure for each step would make it very unwieldly to write. (every step would have to have an extra context manager or whatever wrapping it.