Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added hifiasm wrapper * Finished doc * Added some files to keep memory usage down * Update bio/hifiasm/environment.yaml * Update test.py Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>
- Loading branch information
1 parent
bb050e4
commit 5360346
Showing
10 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- nodefaults | ||
dependencies: | ||
- hifiasm =0.16 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Hifiasm | ||
description: A haplotype-resolved assembler for accurate Hifi reads | ||
url: https://github.com/chhylp123/hifiasm | ||
authors: | ||
- Filipe G. Vieira | ||
input: | ||
- PacBio HiFi reads (fasta) | ||
- Hi-C reads (fastq; optional) | ||
output: | ||
- assembly graphs (GFA) | ||
notes: | | ||
* The `extra` param allows for additional program arguments. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
rule hifiasm: | ||
input: | ||
fasta=[ | ||
"reads/HiFi_dataset_01.fasta.gz", | ||
"reads/HiFi_dataset_02.fasta.gz", | ||
], | ||
# optional | ||
# hic1="reads/Hi-C_dataset_R1.fastq.gz", | ||
# hic2="reads/Hi-C_dataset_R2.fastq.gz", | ||
output: | ||
multiext( | ||
"hifiasm/{sample}.", | ||
"a_ctg.gfa", | ||
"a_ctg.lowQ.bed", | ||
"a_ctg.noseq.gfa", | ||
"p_ctg.gfa", | ||
"p_ctg.lowQ.bed", | ||
"p_ctg.noseq.gfa", | ||
"p_utg.gfa", | ||
"p_utg.lowQ.bed", | ||
"p_utg.noseq.gfa", | ||
"r_utg.gfa", | ||
"r_utg.lowQ.bed", | ||
"r_utg.noseq.gfa", | ||
), | ||
log: | ||
"logs/hifiasm/{sample}.log", | ||
params: | ||
extra="--primary -f 37 -l 1 -s 0.75 -O 1", | ||
threads: 2 | ||
resources: | ||
mem_mb=1024, | ||
wrapper: | ||
"master/bio/hifiasm" |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
__author__ = "Filipe G. Vieira" | ||
__copyright__ = "Copyright 2022, Filipe G. Vieira" | ||
__license__ = "MIT" | ||
|
||
|
||
import os | ||
from snakemake.shell import shell | ||
|
||
|
||
log = snakemake.log_fmt_shell() | ||
extra = snakemake.params.get("extra", "") | ||
|
||
|
||
hic1 = snakemake.input.get("hic1", "") | ||
if hic1: | ||
if isinstance(hic1, list): | ||
hic1 = ",".join(hic1) | ||
hic1 = "--h1 {}".format(hic1) | ||
|
||
hic2 = snakemake.input.get("hic2", "") | ||
if hic2: | ||
if isinstance(hic2, list): | ||
hic2 = ",".join(hic2) | ||
hic2 = "--h2 {}".format(hic2) | ||
|
||
|
||
out_prefix = os.path.commonprefix(snakemake.output).rstrip(".") | ||
|
||
|
||
shell( | ||
"hifiasm" | ||
" -t {snakemake.threads}" | ||
" {extra}" | ||
" {hic1} {hic2}" | ||
" -o {out_prefix}" | ||
" {snakemake.input.fasta}" | ||
" {log}" | ||
) |
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