Skip to content

Commit

Permalink
Merge pull request #27 from UCSC-Treehouse/issue-25-add-jfkm-pipeline
Browse files Browse the repository at this point in the history
Add JFKM Pipeline
  • Loading branch information
e-t-k authored Feb 7, 2019
2 parents cb23fb7 + d4904a7 commit 7fac2f2
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,19 @@ variants:
/inputs/sample.bam \
/outputs

jfkm:
echo "Running Jellyfish - Km pipeline on $(R1) and $(R2)"
mkdir -p outputs/jfkm
docker run --rm \
-v $(shell pwd)/samples:/data/samples \
-v $(shell pwd)/outputs/jfkm:/data/outputs \
jpfeil/jfkm:0.1.0 \
--CPU `nproc` \
--FLT3-ITD \
--left-fq $(R1) \
--right-fq $(R2) \
--output-dir outputs

verify:
echo "Verifying md5 of output of TEST file"
tar -xOzvf outputs/expression/TEST_R1merged.tar.gz TEST_R1merged/RSEM/rsem_genes.results | md5sum -c md5/expression.md5
Expand Down
26 changes: 26 additions & 0 deletions fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,32 @@ def process(manifest="manifest.tsv", base=".", checksum_only="False"):
with open("{}/methods.json".format(dest), "w") as f:
f.write(json.dumps(methods, indent=4))

# Calculate jfkm
methods["start"] = datetime.datetime.utcnow().isoformat()
with settings(warn_only=True):
result = run("cd /mnt && make jfkm")
if result.failed:
_log_error("{} Failed jfkm: {}".format(sample_id, result))
continue

# Update methods.json and copy output back
dest = "{}/jpfeil-jfkm-0.1.0-26350e0".format(output)
local("mkdir -p {}".format(dest))
methods["inputs"] = fastqs
methods["outputs"] = [
os.path.relpath(p, base) for p in get("/mnt/outputs/jfkm/*", dest)]
methods["end"] = datetime.datetime.utcnow().isoformat()
methods["pipeline"] = {
"source": "https://github.com/UCSC-Treehouse/jfkm",
"docker": {
"url": "https://cloud.docker.com/repository/docker/jpfeil/jfkm",
"version": "0.1.0",
"hash": "sha256:26350e02608115341fe8e735ef6d08216e71d962b176eb53b9a7bc54ef715c10" # NOQA
}
}
with open("{}/methods.json".format(dest), "w") as f:
f.write(json.dumps(methods, indent=4))

# Calculate variants
methods["start"] = datetime.datetime.utcnow().isoformat()
with settings(warn_only=True):
Expand Down

0 comments on commit 7fac2f2

Please sign in to comment.