Skip to content
Snippets Groups Projects

WIP: Checkpoint snakefile

Merged Susheel Busi requested to merge checkpoint_snakefile into master
Compare and Show latest version
4 files
+ 194
0
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 48
0
# For running the MMSEQ2 comparison of proteins after assemblies are run through prokka/prodigal
import os
#from tempfile import TemporaryDirectory
configfile: "config/CONFIG.yaml"
#DATA_DIR = config["data_dir"]
RESULTS_DIR = config["results_dir"]
#DB_DIR=config["db_dir"]
BARCODES=config["barcodes"]
#ASSEMBLERS=config["assemblers"]
#MAPPERS=["bwa", "mm"]
## SAMPLES=config["samples"]
#SAMPLES=["flye", "megahit", "metaspades_hybrid"]
#BINNING_SAMPLES=config["binning_samples"]
#HYBRID_ASSEMBLER=config["hybrid_assembler"]
SR_PREFIX="ONT3_MG_xx_Rashi_S11"
#############################
###### IGC COVERAGE ########
#############################
rule all:
input:
expand("{results_dir}/plots/genomecov/{sr_prefix}_vs_{lr_prefix}-x-{reference}_coverage.html", results_dir=RESULTS_DIR, sr_prefix=SR_PREFIX, lr_prefix=BARCODES, reference="igc"),
expand("{results_dir}/plots/annotation/diamond/lr_{lr_prefix}-sr{sr_prefix}-gene_length_ratio.html", results_dir=RESULTS_DIR, sr_prefix=SR_PREFIX, lr_prefix=BARCODES)
rule igc_correlation_plot:
input:
sr_cov=os.path.join(RESULTS_DIR, "genomecov/sr/bwa_mem/{sr_prefix}-x-{reference}.avg_cov.txt"),
lr_cov=os.path.join(RESULTS_DIR, "genomecov/lr/merged/{lr_prefix}/{lr_prefix}-x-{reference}.avg_cov.txt")
output: os.path.join(RESULTS_DIR, "plots/genomecov/{sr_prefix}_vs_{lr_prefix}-x-{reference}_coverage.html")
#log: os.path.join(RESULTS_DIR, "plots/mapping/sr_lr_igc_coverage.log")
conda: "../../envs/r_ggplot2_datatable_tidyverse.yaml"
script:
"../scripts/sr_lr_igc_coverage_correlation.Rmd"
rule gene_length_ratio_plot:
input:
sr_diamond=os.path.join(RESULTS_DIR, "annotation/diamond/megahit/{sr_prefix}/final.contigs.tsv"),
lr_diamond=os.path.join(RESULTS_DIR, "annotation/diamond/flye/lr/merged/{lr_prefix}/assembly.tsv"),
hybrid_diamond=os.path.join(RESULTS_DIR, "annotation/diamond/metaspades_hybrid/lr_{lr_prefix}-sr_{sr_prefix}/contigs.tsv")
output: os.path.join(RESULTS_DIR, "plots/annotation/diamond/lr_{lr_prefix}-sr{sr_prefix}-gene_length_ratio.html")
#log: os.path.join(RESULTS_DIR, "plots/mapping/sr_lr_igc_coverage.log")
conda: "../../envs/r_ggplot2_datatable_tidyverse.yaml"
script:
"../scripts/gene_length_ratio.Rmd"
Loading