Skip to content

Instantly share code, notes, and snippets.

@hanfeisun
Created November 20, 2013 13:13
Show Gist options
  • Save hanfeisun/7562973 to your computer and use it in GitHub Desktop.
Save hanfeisun/7562973 to your computer and use it in GitHub Desktop.
def _bowtie(workflow, conf):
for target in conf.sample_targets:
bowtie = attach_back(workflow,
ShellCommand(
"{tool} -p {param[threads]} -S -m {param[max_align]} \
{param[genome_index]} {input[fastq]} {output[sam]} 2> {output[bowtie_summary]}",
input={"genome_dir": os.path.dirname(conf.get_path("lib", "genome_index")),
"fastq": target + ".fastq"},
output={"sam": target + ".sam",
"bowtie_summary": target + "_bowtie_summary.txt", },
tool="bowtie",
param={"threads": 4,
"max_align": 1,
"genome_index": conf.get_path("lib", "genome_index")}))
bowtie.update(param=conf.items("bowtie"))
__sam2bam(workflow, conf)
## using bowtie standard error output
attach_back(workflow,
PythonCommand(stat_bowtie,
input={"bowtie_summaries": [t + "_bowtie_summary.txt" for t in conf.sample_targets],
"db": ChiLinQC_db,
"template": rlang_template},
output={"json": conf.json_prefix + "_bowtie.json",
"R": conf.prefix + "_bowtie.R",
"pdf": conf.prefix + "_bowtie.pdf"},
param={"sams": [t + ".sam" for t in conf.sample_targets], }))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment