Skip to content

Commit

Permalink
Merge pull request #34 from 3d-omics/ci
Browse files Browse the repository at this point in the history
fix: rename and replace rules
  • Loading branch information
jlanga authored Jun 6, 2024
2 parents 45fa95b + 19a5dba commit 4ef4a4d
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 40 deletions.
41 changes: 19 additions & 22 deletions profile/default/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,40 +32,37 @@ set-resources:
mem_mb: 4G
# align
align__index__:
mem_mb: 64 * 1024
runtime: 24 * 60
mem_mb: 64G
runtime: 1d
align__map__:
mem_mb: 64 * 1024
runtime: 24 * 60
mem_mb: 64G
runtime: 1d
align__mark_duplicates__:
mem_mb: 8 * 1024
runtime: 6 * 60
mem_mb: 8G
runtime: 6h
align__mark_duplicates__bam_to_cram__:
mem_mb: 8 * 1024
runtime: 12 * 60
mem_mb: 8G
runtime: 12h
align__bcftools__call__:
mem_mb: 8G
runtime: 1d
align__recalibrate__baserecalibrator__:
mem_mb: 8 * 1024
runtime: 24 * 60
align__recalibrate__applybqsr__:
mem_mb: 8 * 1024
runtime: 24 * 60
align__recalibrate__bam_to_cram__:
mem_mb: 4 * 1024
runtime: 24 * 60
# variants
variants__call__haplotype_caller__:
mem_mb: 8G
runtime: 1d
variants__combine_gvcfs__:
align__recalibrate__applybqsr__:
mem_mb: 8G
runtime: 1d
variants__genotype_gvcfs__:
align__recalibrate__bam_to_cram__:
mem_mb: 4G
runtime: 6h
# variants
variants__call__haplotype_caller__:
mem_mb: 8G
runtime: 1d
variants__calculate_genotype_posteriors__:
variants__call__combine_gvcfs__:
mem_mb: 8G
runtime: 1d
variants__variant_filtration__:
variants__genotype__genotype_gvcfs__:
mem_mb: 8G
runtime: 1d
# annotate
Expand Down
12 changes: 6 additions & 6 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ include: "rules/swaps/__main__.smk"
include: "rules/report/__main__.smk"


rule cache:
input:
rules.reference.input,
rules.align__index.input,


rule all:
"""Run the entire pipeline"""
input:
rules.report__step.input,
rules.report__sample.input,


rule cache:
input:
rules.reference.input,
rules.align__index.input,
25 changes: 15 additions & 10 deletions workflow/rules/variants/__functions__.smk
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,23 @@ def get_ploidy_of_sample_and_chromosome(wildcards):
return 1
if chromosome in autosomes:
return 2
if sex == "male" and chromosome not in male_chromosomes:
return 0
if sex == "female" and chromosome not in female_chromosomes:
return 0
if chromosome in male_chromosomes and len(male_chromosomes) == 1:
return 2
if chromosome in female_chromosomes and len(female_chromosomes) == 1:
return 2
if chromosome in male_chromosomes and len(male_chromosomes) == 2:
if sex == "male" and len(male_chromosomes) == 2 and chromosome in male_chromosomes:
return 1
if chromosome in female_chromosomes and len(female_chromosomes) == 2:
if sex == "male" and len(male_chromosomes) == 1 and chromosome in male_chromosomes:
return 2
if (
sex == "female"
and len(female_chromosomes) == 2
and chromosome in female_chromosomes
):
return 1
if (
sex == "female"
and len(female_chromosomes) == 1
and chromosome in female_chromosomes
):
return 2
return 0


def generate_mock_interval(wildcards):
Expand Down
4 changes: 2 additions & 2 deletions workflow/rules/variants/genotype.smk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rule variants__genotype_gvcfs__:
rule variants__genotype__genotype_gvcfs__:
"""Genotype a single region"""
input:
vcf_gz=CALL / "{region}.vcf.gz",
Expand All @@ -22,7 +22,7 @@ rule variants__genotype_gvcfs__:
"""


rule variants__genotype_gvcfs__merge_vcfs__:
rule variants__genotype__merge_vcfs__:
"""Join all the GVCFs into a single one
Mysterioustly MergeVcfs fucks up the file
Expand Down

0 comments on commit 4ef4a4d

Please sign in to comment.