-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gimme maelstrom #869
Merged
Merged
Gimme maelstrom #869
Changes from all commits
Commits
Show all changes
119 commits
Select commit
Hold shift + click to select a range
97ecd3e
merge
siebrenf 3fd67cd
merge develop
siebrenf 52ff7a2
nitpicking
siebrenf 95ca2b1
more renaming
siebrenf b5d419f
my secret sauce escaping again
siebrenf 69933fc
sieve_bam
siebrenf 13ee72a
Merge branch 'develop' into refactor
Maarten-vd-Sande 4692f7c
revert subsampling
siebrenf 91ef4d6
first work
Maarten-vd-Sande 29ac1b1
Merge branch 'develop' into gimme_maelstrom
Maarten-vd-Sande 2b16f08
not for broad peaks!
Maarten-vd-Sande 0963bd7
more wip
Maarten-vd-Sande 0524bf9
update requirements
Maarten-vd-Sande c077ee0
fix
Maarten-vd-Sande 9e4175f
Update dag_tests.sh
Maarten-vd-Sande 7c8a80f
fx
Maarten-vd-Sande 2553b58
better
Maarten-vd-Sande 90f03c6
Update gimme.yaml
Maarten-vd-Sande c4d52cb
Merge branch 'gimme_maelstrom' of github.com:vanheeringen-lab/seq2sci…
Maarten-vd-Sande e8a95b3
Merge branch 'develop' into gimme_maelstrom
Maarten-vd-Sande 14a0e29
more worky
Maarten-vd-Sande 13304b7
Merge branch 'gimme_maelstrom' of github.com:vanheeringen-lab/seq2sci…
Maarten-vd-Sande 4bfcaad
used assembleis
Maarten-vd-Sande 98c9475
something
Maarten-vd-Sande 0f79702
more
Maarten-vd-Sande 9f93975
more
Maarten-vd-Sande 3600e0b
more
Maarten-vd-Sande 710b184
more
Maarten-vd-Sande b39f40c
dsadsa
Maarten-vd-Sande 7a82b0a
wip
Maarten-vd-Sande 5aa42fa
Merge branch 'gimme_maelstrom' of github.com:vanheeringen-lab/seq2sci…
Maarten-vd-Sande a2b5cd5
check pls
Maarten-vd-Sande 79490e2
Merge branch 'develop' into gimme_maelstrom
Maarten-vd-Sande 9679816
more
Maarten-vd-Sande 433c756
Merge branch 'gimme_maelstrom' of github.com:vanheeringen-lab/seq2sci…
Maarten-vd-Sande 0223dba
cleanup
Maarten-vd-Sande ddc9a27
cleanup
Maarten-vd-Sande fe66a0d
fix
Maarten-vd-Sande ed77600
more fix
Maarten-vd-Sande 5ade8fe
breps
Maarten-vd-Sande 5150cde
does this work in one go?
Maarten-vd-Sande f5abec3
more wip
Maarten-vd-Sande 900f976
wip
Maarten-vd-Sande aeaced9
Merge branch 'gimme_maelstrom' of github.com:vanheeringen-lab/seq1sci…
Maarten-vd-Sande 336f24a
wip
Maarten-vd-Sande 3ad4c11
wip
Maarten-vd-Sande 4f1900b
test
Maarten-vd-Sande 8f9b7f9
more
Maarten-vd-Sande 512c510
Update motif_scan.smk
Maarten-vd-Sande 92ff4e4
fix envs
Maarten-vd-Sande 085ceb4
envs
Maarten-vd-Sande 757ed16
requirements
Maarten-vd-Sande c00f7d0
Update gimme.yaml
Maarten-vd-Sande 302a386
Update requirements.yaml
Maarten-vd-Sande fcb7388
Update requirements.yaml
Maarten-vd-Sande 98d0d58
Update gimme.yaml
Maarten-vd-Sande 66678f0
Update htmltable.yaml
Maarten-vd-Sande 7ca3060
Update requirements.yaml
Maarten-vd-Sande 4343bae
Update requirements.yaml
Maarten-vd-Sande f28e6f4
Update requirements.yaml
Maarten-vd-Sande 2eb1ad8
Update requirements.yaml
Maarten-vd-Sande 05d0b4a
Update gimme.yaml
Maarten-vd-Sande e618392
Update htmltable.yaml
Maarten-vd-Sande 806cab6
Update requirements.yaml
Maarten-vd-Sande b021e5f
Update motif_scan.smk
Maarten-vd-Sande c02699f
Update requirements.yaml
Maarten-vd-Sande 33e2d25
Update gimme.yaml
Maarten-vd-Sande 7b9ea70
Update requirements.yaml
Maarten-vd-Sande 9ceedbc
Update htmltable.yaml
Maarten-vd-Sande 969f47d
thread parsing works okay again :D
Maarten-vd-Sande 30486fe
slurm fixes
Maarten-vd-Sande 8b04e5c
Delete Snakefile
Maarten-vd-Sande 41e2530
Delete 2.txt
Maarten-vd-Sande 7564dce
Delete 1.txt
Maarten-vd-Sande 200d606
Delete 2.txt
Maarten-vd-Sande eccd31a
Update util.py
Maarten-vd-Sande 6bbec1d
Update CHANGELOG.md
Maarten-vd-Sande ea78435
localrules
Maarten-vd-Sande f4d753c
Merge branch 'develop' into slurm
Maarten-vd-Sande 325b60f
Merge branch 'develop' into gimme_maelstrom
Maarten-vd-Sande 1c0ff08
Update gimme.yaml
Maarten-vd-Sande ab0c1ec
Merge branch 'slurm' into gimme_maelstrom
Maarten-vd-Sande 0a926b9
breps fix
Maarten-vd-Sande 5f6b181
Merge branch 'develop' into gimme_maelstrom
Maarten-vd-Sande 156903e
Update peak_counts.smk
Maarten-vd-Sande cb0cd2d
Update run_tests.sh
Maarten-vd-Sande 3f3639e
Update run_tests.sh
Maarten-vd-Sande 433eeff
Update run_tests.sh
Maarten-vd-Sande 60d8f0d
rename files
Maarten-vd-Sande d9d57e7
Merge branch 'gimme_maelstrom' of github.com:vanheeringen-lab/seq2sci…
Maarten-vd-Sande 109e81a
new multiqc report
Maarten-vd-Sande 8d4aebe
Merge branch 'develop' into gimme_maelstrom
Maarten-vd-Sande bc4f424
Update trackhub.smk
Maarten-vd-Sande ea5f1f1
Update motif_scan.smk
Maarten-vd-Sande ab9e05e
Update combine_biological_reps.py
Maarten-vd-Sande d679145
Update Snakefile
Maarten-vd-Sande b10d76d
Update Snakefile
Maarten-vd-Sande 32f75a3
Update qc_peaks.smk
Maarten-vd-Sande e9b656c
Update htmltable.yaml
Maarten-vd-Sande 885ca85
docs
Maarten-vd-Sande 588a510
Update trackhub.smk
Maarten-vd-Sande 5cb986e
Update htmltable.yaml
Maarten-vd-Sande 2f18af2
no localrules
Maarten-vd-Sande 66d3108
Update multiqc_config.yaml
Maarten-vd-Sande 4efa754
Update multiqc_config.yaml
Maarten-vd-Sande 58ca8ca
Update multiqc_config.yaml
Maarten-vd-Sande 078f0da
Update qc.smk
Maarten-vd-Sande 379f483
review
Maarten-vd-Sande 9bbccf8
Merge branch 'gimme_maelstrom' of github.com:vanheeringen-lab/seq2sci…
Maarten-vd-Sande 454195c
cpulimit
Maarten-vd-Sande a8e7420
Merge branch 'gimme_maelstrom' of github.com:vanheeringen-lab/seqscie…
Maarten-vd-Sande e2ea9b0
fix
Maarten-vd-Sande cb4128b
fix
Maarten-vd-Sande 9b15a7d
fix
Maarten-vd-Sande f534b22
Update util.py
Maarten-vd-Sande c3e01dc
Update combine_biological_reps.py
Maarten-vd-Sande 372051e
last fixe
Maarten-vd-Sande a8fee23
Merge branch 'gimme_maelstrom' of github.com:vanheeringen-lab/seq2sci…
Maarten-vd-Sande 565c91b
really last
Maarten-vd-Sande File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
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
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
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
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
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,76 @@ | ||
""" | ||
all rules/logic related to motif scanning of peaks is found here. | ||
""" | ||
def get_motif2factors_input_genomes(wildcards): | ||
all_out = [] | ||
if str(wildcards.assembly)[0:4] in ["GRCh", "GRCm", "hg19", "hg38", "mm10", "mm39"]: | ||
return all_out | ||
|
||
for assembly in config.get("motif2factors_database_references", []) + config.get("motif2factors_reference", []) + [wildcards.assembly]: | ||
all_out.append(expand(f"{{genome_dir}}/{assembly}/{assembly}.annotation.gtf", **config)[0]) | ||
all_out.append(expand(f"{{genome_dir}}/{assembly}/{assembly}.fa", **config)[0]) | ||
return all_out | ||
|
||
|
||
rule motif2factors: | ||
""" | ||
Create a gimme pfm/motif2factor file with the gimme motif2factors command. | ||
For human/mouse it just uses the default database, for other species it is based | ||
on TF orthologs. | ||
""" | ||
input: | ||
genome=rules.get_genome.output, | ||
all_genomes=get_motif2factors_input_genomes | ||
output: | ||
expand("{result_dir}/gimme/{{assembly}}.{{gimme_database}}.pfm", **config), | ||
log: | ||
expand("{log_dir}/gimme/motif2factors/{{assembly}}-{{gimme_database}}.log", **config), | ||
benchmark: | ||
expand("{benchmark_dir}/gimme/motif2factors/{{assembly}}-{{gimme_database}}.log", **config)[0], | ||
params: | ||
genomes_dir=config.get("genome_dir"), | ||
database=config.get("gimme_maelstrom_database"), | ||
motif2factors_reference=config.get("motif2factors_reference") | ||
threads: 24 | ||
conda: | ||
"../envs/gimme.yaml" | ||
script: | ||
f"{config['rule_dir']}/../scripts/motif2factors.py" | ||
|
||
|
||
rule gimme_maelstrom: | ||
""" | ||
Gimme maelstrom is a method to infer differential motifs between two or more biological replicates. | ||
""" | ||
input: | ||
genome=rules.get_genome.output, | ||
count_table=expand("{counts_dir}/{{peak_caller}}/{{assembly}}_log2_quantilenorm_biological_reps.tsv", **config), | ||
pfm=rules.motif2factors.output | ||
output: | ||
output=directory(expand("{result_dir}/gimme/maelstrom/{{assembly}}-{{gimme_database}}-{{peak_caller}}", **config)), | ||
cache=temp(directory(expand("{result_dir}/gimme/maelstrom/cache/{{assembly}}-{{gimme_database}}-{{peak_caller}}", **config))), | ||
params: config.get("gimme_maelstrom_params", "") | ||
log: | ||
expand("{log_dir}/gimme_maelstrom/{{assembly}}-{{gimme_database}}-{{peak_caller}}.log", **config), | ||
benchmark: | ||
expand("{benchmark_dir}/gimme_maelstrom/{{assembly}}-{{gimme_database}}-{{peak_caller}}.log", **config)[0], | ||
resources: | ||
mem_gb=40, | ||
message: EXPLAIN["gimme_maelstrom"] | ||
conda: | ||
"../envs/gimme.yaml" | ||
threads: 24 | ||
shell: | ||
""" | ||
NEW_CACHE={output.cache} | ||
mkdir -p $NEW_CACHE | ||
if [ -z $XDG_CACHE_HOME ]; then | ||
XDG_CACHE_HOME=$HOME/.cache | ||
fi | ||
cp -r $XDG_CACHE_HOME/gimmemotifs $NEW_CACHE/ | ||
export XDG_CACHE_HOME=$NEW_CACHE | ||
""" + | ||
("cpulimit --include-children -l {threads}00 --\\" if config.get("cpulimit", True) else "") + | ||
""" | ||
gimme maelstrom {input.count_table} {input.genome} {output.output} --pfmfile {input.pfm} --nthreads {threads} {params} > {log} 2>&1 | ||
""" |
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing via
pip
might be way faster, as this does not include most of the motif discovery tools (2 GB vs 250 MB). Some dependencies might be missing/outdated on pip.unless we need motive scanning, then you're out of luck...