Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* First try cooltools insulation wrapper * Fix env formatting? * Fix test workflow * add comments to snakefile * Add expected, add view to insulation * Add eigenvector wrappers * Add forgotten tests * Add saddle, fix so tests pass * Remove file path for saddle * Add pileup, small fixes * FIx pileup meta * Add genome binnify and gc * Remove unnecessary empty view assignment Co-authored-by: Filipe G. Vieira <fgarrettvieira@gmail.com> * Remove unnecessary empty view assignment Co-authored-by: Filipe G. Vieira <fgarrettvieira@gmail.com> * Remove unnecessary empty view assignment Co-authored-by: Filipe G. Vieira <fgarrettvieira@gmail.com> * Requested fixes * Small fixes in gc and binnify wrappers * Simplify environment * Requested changes - env, view input, all outputs * Add example with track for eigs * Remove extra newline? * Move note to notes * Suggested changes, and better wrapper for saddle * Fix for no fig in saddle * Only get fig once * Removed unnecessary else * Removed format * Add cooltools dots wrapper * Changed pinned version * Remove unnecessary param * Remove unnecessary import * Add small test file for dots * Move view description to input * Update bio/cooltools/dots/environment.yaml * Update bio/cooltools/dots/test/Snakefile Co-authored-by: Filipe G. Vieira <fgarrettvieira@gmail.com> Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>
- Loading branch information
1 parent
eea67d4
commit d28de15
Showing
67 changed files
with
72,321 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,7 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- nodefaults | ||
dependencies: | ||
- scikit-learn==1.0 # doesn't work with 1.1 | ||
- cooltools =0.5 |
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,19 @@ | ||
name: cooltools dots | ||
description: Calculate cis eigenvectors for a resolution in an .mcool file | ||
url: https://github.com/open2c/cooltools | ||
authors: | ||
- Ilya Flyamer | ||
input: | ||
- a multiresolution cooler file (.mcool) | ||
- an expected file | ||
- (optional) view, a bed-style file with region coordinates and names to use for analysis | ||
output: | ||
- > | ||
A .bedpe file with coordinates of detected dots. | ||
Can have a {resolution} wildcard that specifies the resolution for the analysis, | ||
then it doesn't need to be specified as a parameter. | ||
params: | ||
resolution: > | ||
Optional, can be instead specified as a wildcard in the output | ||
extra: Any additional arguments to pass | ||
notes: |
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 @@ | ||
|
||
rule cooltools_dots: | ||
input: | ||
cooler="small_test.mcool", ## Multiresolution cooler file | ||
expected="test_expected.tsv", ## Expected file | ||
view="test_view.txt", ## File with the region names and coordinates | ||
output: | ||
"HFF_{resolution,[0-9]+}.dots.bedpe", | ||
params: | ||
extra="", ## Add extra parameters | ||
threads: 4 | ||
log: | ||
"logs/HFF_{resolution}_dots.log", | ||
wrapper: | ||
"master/bio/cooltools/dots" |
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
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 @@ | ||
chr17 0 24714921 chr17_p |
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 @@ | ||
__author__ = "Ilya Flyamer" | ||
__copyright__ = "Copyright 2022, Ilya Flyamer" | ||
__email__ = "flyamer@gmail.com" | ||
__license__ = "MIT" | ||
|
||
from snakemake.shell import shell | ||
|
||
## Extract arguments | ||
view = snakemake.input.get("view", "") | ||
if view: | ||
view = f"--view {view}" | ||
|
||
expected = snakemake.input.get("expected", "") | ||
|
||
extra = snakemake.params.get("extra", "") | ||
log = snakemake.log_fmt_shell(stdout=False, stderr=True) | ||
|
||
resolution = snakemake.params.get( | ||
"resolution", snakemake.wildcards.get("resolution", 0) | ||
) | ||
if not resolution: | ||
raise ValueError( | ||
"Please specify ressolution either as a wildcard or as a parameter" | ||
) | ||
|
||
shell( | ||
"(cooltools dots" | ||
" {snakemake.input.cooler}::resolutions/{resolution} " | ||
" {expected} " | ||
" {view} " | ||
" -p {snakemake.threads} " | ||
" {extra} " | ||
" -o {snakemake.output}) {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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
channels: | ||
- conda-forge | ||
- defaults | ||
- bioconda | ||
dependencies: | ||
- ucsc-bedgraphtobigwig | ||
- cooltools =0.5 |
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,22 @@ | ||
name: cooltools eigs_cis | ||
description: Calculate cis eigenvectors for a resolution in an .mcool file | ||
url: https://github.com/open2c/cooltools | ||
authors: | ||
- Ilya Flyamer | ||
input: | ||
- a multiresolution cooler file (.mcool) | ||
- (optional) phasing track file | ||
- (optional) view, a bed-style file with region coordinates and names to use for analysis | ||
output: | ||
vecs: A .tsv file with values of cis eigenvectors at each bin. | ||
lams: A file with eigenvalues | ||
bigwig: A .bigwig file for visualization of the first eigenvector | ||
params: | ||
resolution: > | ||
Optional, can be instead specified as a wildcard in the output | ||
track_col_name: > | ||
Name of the column in the track file to use | ||
extra: Any additional arguments to pass | ||
notes: | ||
- Output files can have a {resolution} wildcard that specifies the resolution for | ||
the analysis, then it doesn't need to be specified as a parameter. |
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,17 @@ | ||
rule cooltools_eigs_cis: | ||
input: | ||
cooler="CN.mm9.1000kb.mcool", ## Multiresolution cooler file | ||
view="mm9_view.txt", ## File with the region names and coordinates | ||
track="mm9_1000000_gc.bed", | ||
output: | ||
vecs="CN_{resolution,[0-9]+}.cis.vecs.tsv", | ||
lam="CN_{resolution,[0-9]+}.cis.lam.tsv", | ||
bigwig="CN_{resolution,[0-9]+}.cis.bw", | ||
params: | ||
## Add optional parameters | ||
track_col_name="GC", | ||
extra="", | ||
log: | ||
"logs/CN_{resolution}_cis_eigs.log", | ||
wrapper: | ||
"master/bio/cooltools/eigs_cis" |
Oops, something went wrong.