Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added Salsa2 wrapper * Fixed typo * improve env Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>
- Loading branch information
1 parent
3af38c8
commit 8cb4137
Showing
8 changed files
with
102 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: | ||
- salsa2 =2.3 |
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,15 @@ | ||
name: Salsa2 | ||
description: | | ||
A tool to scaffold long read assemblies with Hi-C data | ||
url: https://github.com/marbl/SALSA | ||
authors: | ||
- Filipe G. Vieira | ||
input: | ||
- BED file | ||
- FASTA file | ||
- FASTA index file | ||
output: | ||
- polished assembly (FASTA format) | ||
- polished assembly (AGP format) | ||
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,17 @@ | ||
rule salsa2: | ||
input: | ||
fas="{sample}.fasta", | ||
fai="{sample}.fasta.fai", | ||
bed="{sample}.bed", | ||
output: | ||
agp="out/{sample}.agp", | ||
fas="out/{sample}.fas", | ||
log: | ||
"logs/salsa2/{sample}.log", | ||
params: | ||
enzyme="CTTAAG", # optional | ||
extra="--clean yes", # optional | ||
resources: | ||
mem_mb=1024, | ||
wrapper: | ||
"master/bio/salsa2" |
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,2 @@ | ||
lambda_NEB3011_3 89 571 m130725_000747_00121_c100518582550000001823079209281362_s1_p0/15956/701_2749 60 - 89 571 255,0,0 1 482 0 | ||
lambda_NEB3011_3 639 987 m130725_000747_00121_c100518582550000001823079209281362_s1_p0/82740/1942_3951 60 - 639 987 255,0,0 1 348 0 |
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,14 @@ | ||
>lambda_NEB3011_3 | ||
AACGGTGTATTACCGGTTTGCTACCAGGGAAGAACGGGAAGGAAAGATGAGCACGAACCTGGTTTTTAAGGAGTGTCGCC | ||
AGAGTGCCGCGATGAAACGGGTATTGGCGGTATATGGAGTTAAAAGATGACCATCTACATTACTGAGCTAATAACAGGCC | ||
TGCTGGTAATCGCAGGCCTTTTTATTTGGGGGAGAGGGAAGTCATGAAAAAACTAACCTTTGAAATTCGATCTCCAGCAC | ||
ATCAGCAAAACGCTATTCACGCAGTACAGCAAATCCTTCCAGACCCAACCAAACCAATCGTAGTAACCATTCAGGAACGC | ||
AACCGCAGCTTAGACCAAAACAGGAAGCTATGGGCCTGCTTAGGTGACGTCTCTCGTCAGGTTGAATGGCATGGTCGCTG | ||
GCTGGATGCAGAAAGCTGGAAGTGTGTGTTTACCGCAGCATTAAAGCAGCAGGATGTTGTTCCTAACCTTGCCGGGAATG | ||
GCTTTGTGGTAATAGGCCAGTCAACCAGCAGGATGCGTGTAGGCGAATTTGCGGAGCTATTAGAGCTTATACAGGCATTC | ||
GGTACAGAGCGTGGCGTTAAGTGGTCAGACGAAGCGAGACTGGCTCTGGAGTGGAAAGCGAGATGGGGAGACAGGGCTGC | ||
ATGATAAATGTCGTTAGTTTCTCCGGTGGCAGGACGTCAGCATATTTGCTCTGGCTAATGGAGCAAAAGCGACGGGCAGG | ||
TAAAGACGTGCATTACGTTTTCATGGATACAGGTTGTGAACATCCAATGACATATCGGTTTGTCAGGGAAGTTGTGAAGT | ||
TCTGGGATATACCGCTCACCGTATTGCAGGTTGATATCAACCCGGAGCTTGGACAGCCAAATGGTTATACGGTATGGGAA | ||
CCAAAGGATATTCAGACGCGAATGCCTGTTCTGAAGCCATTTATCGATATGGTAAAGAAATATGGCACTCCATACGTCGG | ||
CGGCGCGTTCTGCACTGACAGATTAAAACTCGTTCCCTTC |
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 @@ | ||
lambda_NEB3011_3 1000 18 80 81 |
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,39 @@ | ||
__author__ = "Filipe G. Vieira" | ||
__copyright__ = "Copyright 2022, Filipe G. Vieira" | ||
__license__ = "MIT" | ||
|
||
|
||
import tempfile | ||
from snakemake.shell import shell | ||
|
||
|
||
extra = snakemake.params.get("extra", "") | ||
log = snakemake.log_fmt_shell(stdout=True, stderr=True) | ||
|
||
|
||
enzyme = snakemake.params.get("enzyme", "") | ||
if enzyme: | ||
enzyme = f"--enzyme {enzyme}" | ||
|
||
gfa = snakemake.input.get("gfa", "") | ||
if gfa: | ||
gfa = f"--gfa {gfa}" | ||
|
||
|
||
with tempfile.TemporaryDirectory() as tmpdir: | ||
shell( | ||
"run_pipeline.py" | ||
" --assembly {snakemake.input.fas}" | ||
" --length {snakemake.input.fai}" | ||
" --bed {snakemake.input.bed}" | ||
" {enzyme}" | ||
" {gfa}" | ||
" {extra}" | ||
" --output {tmpdir}" | ||
" {log}" | ||
) | ||
|
||
if snakemake.output.get("agp"): | ||
shell("cat {tmpdir}/scaffolds_FINAL.agp > {snakemake.output.agp}") | ||
if snakemake.output.get("fas"): | ||
shell("cat {tmpdir}/scaffolds_FINAL.fasta > {snakemake.output.fas}") |
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