Skip to content

Commit

Permalink
Merge branch 'deepripe-batch' of github.com:PMBio/deeprvat into deepr…
Browse files Browse the repository at this point in the history
…ipe-batch
  • Loading branch information
“Marcel-Mueck” committed Oct 17, 2023
2 parents 0599c89 + c4b452c commit 5affade
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
1 change: 1 addition & 0 deletions deeprvat/annotations/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,7 @@ def merge_annotations(vep_header_line:int,
vep_file,
header=vep_header_line,
sep="\t",
na_values = "-"
)
vep_df = process_vep(vep_file=vep_df)
logger.info(f"vep_df shape is {vep_df.shape}")
Expand Down
28 changes: 14 additions & 14 deletions pipelines/annotations.snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ rule aggregate_and_merge_absplice:
),
current_annotation_file=anno_dir / "vep_deepripe_deepsea.parquet"
output:
annotations=anno_dir / "current_annotations_absplice.parquet"
scores=anno_tmp_dir / "abSplice_score_file.parquet",
annotations=anno_dir / "current_annotations_absplice.parquet",
scores=anno_tmp_dir / "abSplice_score_file.parquet"

shell:
" ".join(
Expand All @@ -131,7 +131,7 @@ rule aggregate_and_merge_absplice:

rule merge_deepsea_pcas:
input:
annotations=anno_dir / "vep_deepripe.parquet",
annotations=anno_dir / "vep_deepripe.parquet",
deepsea_pcas=anno_dir / "deepSea_pca" / "deepsea_pca.parquet",
output:
anno_dir / "vep_deepripe_deepsea.parquet"
Expand All @@ -145,21 +145,21 @@ rule merge_deepsea_pcas:
"{input.deepsea_pcas}",
"{output}",
]
)
)

rule concat_annotations:
input:
pvcf = metadata_dir / config['pvcf_blocks_file'],
anno_dir = anno_dir,
vcf_files=
vcf_files=
expand([anno_dir / f"{vcf_pattern}_merged.parquet"],
zip,
chr=chromosomes,
block=block)
output: anno_dir / "vep_deepripe.parquet"
shell:
shell:
" ".join([
"python",
"python",
str(annotation_python_file),
"concat-annotations",
"{input.pvcf}",
Expand All @@ -172,10 +172,10 @@ rule concat_annotations:
rule merge_annotations:
input:
vep = anno_dir / (vcf_pattern + "_vep_anno.tsv"),
deepripe_parclip = anno_dir / (vcf_pattern + "_variants.parclip_deepripe.csv"),
deepripe_k5 = anno_dir / (vcf_pattern + "_variants.eclip_k5_deepripe.csv"),
deepripe_hg2 = anno_dir / (vcf_pattern + "_variants.eclip_hg2_deepripe.csv"),
variant_file = variant_file
deepripe_parclip = anno_dir / (vcf_pattern + "_variants.parclip_deepripe.csv.gz"),
deepripe_k5 = anno_dir / (vcf_pattern + "_variants.eclip_k5_deepripe.csv.gz"),
deepripe_hg2 = anno_dir / (vcf_pattern + "_variants.eclip_hg2_deepripe.csv.gz"),
variant_file = variant_file


output:
Expand Down Expand Up @@ -362,7 +362,7 @@ rule deepRiPe_parclip:
variants=anno_tmp_dir / (vcf_pattern + "_variants.vcf"),
fasta=fasta_dir / fasta_file_name,
output:
anno_dir / (vcf_pattern + "_variants.parclip_deepripe.csv"),
anno_dir / (vcf_pattern + "_variants.parclip_deepripe.csv.gz"),

shell:
f"mkdir -p {pybedtools_tmp_path/'parclip'} && python {annotation_python_file} scorevariants-deepripe {{input.variants}} {anno_dir} {{input.fasta}} {pybedtools_tmp_path/'parclip'} {saved_deepripe_models_path} {{threads}} 'parclip'"
Expand All @@ -373,7 +373,7 @@ rule deepRiPe_eclip_hg2:
variants=anno_tmp_dir / (vcf_pattern + "_variants.vcf"),
fasta=fasta_dir / fasta_file_name,
output:
anno_dir / (vcf_pattern + "_variants.eclip_hg2_deepripe.csv"),
anno_dir / (vcf_pattern + "_variants.eclip_hg2_deepripe.csv.gz"),
threads: lambda wildcards, attempt: n_jobs_deepripe * attempt
shell:
f"mkdir -p {pybedtools_tmp_path/'hg2'} && python {annotation_python_file} scorevariants-deepripe {{input.variants}} {anno_dir} {{input.fasta}} {pybedtools_tmp_path/'hg2'} {saved_deepripe_models_path} {{threads}} 'eclip_hg2'"
Expand All @@ -384,7 +384,7 @@ rule deepRiPe_eclip_k5:
variants=anno_tmp_dir / (vcf_pattern + "_variants.vcf"),
fasta=fasta_dir / fasta_file_name,
output:
anno_dir / (vcf_pattern + "_variants.eclip_k5_deepripe.csv"),
anno_dir / (vcf_pattern + "_variants.eclip_k5_deepripe.csv.gz"),

threads: lambda wildcards, attempt: n_jobs_deepripe * attempt
shell:
Expand Down

0 comments on commit 5affade

Please sign in to comment.