Commit f4ca1ee2 authored by Curtis Hendrickson's avatar Curtis Hendrickson
Browse files

add minimap2 v2.17 indexing

parent 3c71e008
......@@ -15,6 +15,8 @@ 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"]
rule all:
input:
# SARS-CoV-2 download from Genbank and convert GFF3->GTF
......@@ -26,7 +28,8 @@ rule all:
# 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"])
# minimap2 (ont & pb)
,minimap2=expand("{strain}/minimap2/minimap2_2.17/{preset}/{genome}.mmi", preset=MINIMAP2_PRESETS, strain=[cov2abbrev], genome=[cov2acc] )
ruleorder: AGAT_gff2gtf > AGAT_gff2ext_cleaner > gunzip
ruleorder: gtf_get_rRNA_gene_list > gunzip
......@@ -206,3 +209,38 @@ rule gatk4_fna_dict:
" -R {input.fasta} "
" -O {output} "
######################################################################
#
# Minimap2 index
#
######################################################################
# convenience rule
localrules: minimap2
rule minimap2:
input: rules.all.input.minimap2
# input: mmi=expand("{strain}/minimap2/minimap2_2.17/{preset}/{genome}.mmi", preset=MINIMAP2_PRESETS, strain=[cov2abbrev], genome=[cov2acc] )
#
# Minimap2 index fasta
#
# -t INT Number of threads [3].
# Minimap2 uses at most three threads when indexing target sequences,
# and uses up to INT+1 threads when mapping (the extra thread is for I/O,
# which is frequently idle and takes little CPU time)
#
# hg38 uses about 14G vmem
# rule.threads * cluster.slurm.cheaha.json:rule.mem-per-cpu-mb
rule minimap2_index_preset:
input: fa="{strain}/{genome}.fasta"
output: mmi="{strain}/minimap2/minimap2_2.17/{preset}/{genome}.mmi"
threads: 3
conda: "envs/minimap2_2.17.yaml"
shell:
"minimap2 "
" -t {threads} "
" -x {wildcards.preset} "
" -d {output.mmi} "
" {input.fa} "
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment