Skip to content
Snippets Groups Projects
Commit 3d3fdb83 authored by Curtis Hendrickson's avatar Curtis Hendrickson
Browse files

refactor to put aligner versions in variables.

parent a73166b5
No related branches found
No related tags found
No related merge requests found
# editor files
*~
\#*
# snakemake temp
.snakemake
......@@ -15,7 +15,11 @@ NCBI = NCBIRemoteProvider(email=my_NCBI_Email) # email required by NCBI to preve
cov2acc="NC_045512.2"
cov2abbrev="cov2WuHan1"
MINIMAP2_PRESETS=["map-ont","map-pb","asm5"]
MINIMAP2_PRESETS=["map-ont","map-pb","asm5","asm20"]
STAR_VERS=["2.5.3a"]
BWA_VERS=["0.7.17"]
MINIMAP2_VERS=["2.17"]
rule all:
input:
......@@ -24,19 +28,19 @@ rule all:
# samtools faidx
,Idx=expand("{strain}/{genome}.{ext}",strain=[cov2abbrev],genome=[cov2acc],ext=["fasta.fai"]) #,"dict"])
# star index
,StarIDX=expand("{strain}/{genome}/STAR/STAR_2.5.3a-{overhang}/{index_file}",strain=[cov2abbrev],genome=[cov2acc],overhang=["100"],index_file=["SAindex"])
,StarIDX=expand("{strain}/{genome}/STAR/STAR_{align_ver}-{overhang}/{index_file}",strain=[cov2abbrev],genome=[cov2acc],overhang=["100"],index_file=["SAindex"],align_ver=STAR_VERS)
# bwa index
# MISSING - liamvdp did by hand
,BWAIdx=expand("{strain}/BWA/0.7.17/{genome}.{ext}",strain=[cov2abbrev],genome=[cov2acc],ext=["fasta.fai","fasta.bwt","fasta.sa"])#, "dict"])
,BWAIdx=expand("{strain}/BWA/{bwa_ver}/{genome}.{ext}",strain=[cov2abbrev],genome=[cov2acc],ext=["fasta.fai","fasta.bwt","fasta.sa"],bwa_ver=BWA_VERS)#, "dict"])
# minimap2 (ont & pb)
,minimap2=expand("{strain}/minimap2/minimap2_2.17/{preset}/{genome}.mmi", preset=MINIMAP2_PRESETS, strain=[cov2abbrev], genome=[cov2acc] )
,minimap2=expand("{strain}/minimap2/minimap2_{align_ver}/{preset}/{genome}.mmi", preset=MINIMAP2_PRESETS, strain=[cov2abbrev], genome=[cov2acc], align_ver=MINIMAP_VERS )
ruleorder: AGAT_gff2gtf > AGAT_gff2ext_cleaner > gunzip
ruleorder: gtf_get_rRNA_gene_list > gunzip
rule gunzip:
wildcard_constraints: file=".+(?<!gz)" # not ends with gz
output: "x{dir}/{file}"
output: "{dir}/{file}"
input: "{dir}/{file}.gz"
shell: "gunzip -c '{input}' > '{output}'"
......@@ -113,18 +117,18 @@ rule AGAT_gff2ext_cleaner:
# ----------------------------------------------------------------------
rule STAR_index_genome_with_gtf:
output:
expand("{{strain}}/{{genome}}/STAR/STAR_2.5.3a-{{overhang}}/{index_file}",
expand("{{strain}}/{{genome}}/STAR/STAR_{align_ver}-{{overhang}}/{index_file}",
index_file=["SAindex", "SA", "Genome", "sjdbInfo.txt"])
input:
fa="{strain}/{genome}.fasta",
gtf="{strain}/{genome}.gtf"
# MUST match that from CCTS-Informatics-Pipelines / Snakemake-Eukaryotic-RNAseq-Pipeline
# which comes from a plug-in. We grabbed the yaml file from .snakemake/conda/8a33389f.yaml after a run.
conda: "envs/STAR_2.5.3a.yaml"
conda: "envs/STAR_{align_ver}.yaml"
threads: 12
log:
stdout="{strain}/{genome}/STAR/STAR_2.5.3a-{overhang}/log_{overhang}_stdout.txt"
, stderr="{strain}/{genome}/STAR/STAR_2.5.3a-{overhang}/log_{overhang}_stderr.txt"
stdout="{strain}/{genome}/STAR/STAR_{align_ver}-{overhang}/log_{overhang}_stdout.txt"
, stderr="{strain}/{genome}/STAR/STAR_{align_ver}a-{overhang}/log_{overhang}_stderr.txt"
shell:
"STAR "
" --runThreadN {threads} "
......@@ -235,9 +239,9 @@ rule minimap2:
rule minimap2_index_preset:
input: fa="{strain}/{genome}.fasta"
output: mmi="{strain}/minimap2/minimap2_2.17/{preset}/{genome}.mmi"
output: mmi="{strain}/minimap2/minimap2_{align_ver}/{preset}/{genome}.mmi"
threads: 3
conda: "envs/minimap2_2.17.yaml"
conda: "envs/minimap2_{align_ver}.yaml"
shell:
"minimap2 "
" -t {threads} "
......
name: minimap2
channels:
- bioconda
- defaults
dependencies:
- minimap2=2.17
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment