Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ input_manager:
# and script required for the various analysis

analysis_settings:

kmeraligner:
yaml : ../envs/kmeraligner.yaml

Expand Down Expand Up @@ -58,7 +58,10 @@ analysis_settings:
yaml : ../envs/CHtyper.yaml
script: workflow/scripts/ # Path to CHTyper script directory



amrfinder:
yaml : ../envs/amrfinder.yaml

# Illumina lineage determination (commented out for now):
# reference_fasta_file: /home/simonescrima/Desktop/ssi_analysis_utility/resources/lineage_determination/MGAS5005.fasta # Fasta file for reference genome
# lineage_variant_file: /home/simonescrima/Desktop/ssi_analysis_utility/resources/lineage_determination/Spyogenes_LOCs.tsv # File with lineage variants
Expand Down
8 changes: 8 additions & 0 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ rule all:
],
out=OUT_FOLDER
),
expand(
"{out}/{sample}/amrfinder",
sample=[
s for s in SAMPLES
if species_configs[sample_to_organism[s]]["analyses_to_run"]["amrfinder"]["status"] is True
],
out=OUT_FOLDER
),



Expand Down
27 changes: 17 additions & 10 deletions workflow/configs_species/E.coli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
analyses_to_run:

kmeraligner:
status : True
status : False
Title : Kmer Aligner on two pair reads
ID: 90
additional_option : -matrix
database : resources/plasmidfinder_db/enterobacteriales

emm_typing:
status : True
status : False
Title: Typing of M protein gene using blast against CDC curated alleles
cov_threshold: 90
emm_allele_file: resources/emm_typing/emm_alleles.fasta # Fasta file with emm alleles
emm_cluster_file: resources/emm_typing/emm_enn_mrp_subgroups.txt # File with emm allele clusters

assembly_lineage_determination:
status : True
status : False
Title: Lineage determination based on presence of specified SNPs when mapping genome assembly against reference genome
percent_snp_threshold: 50
nucmerargs : "\"\""
Expand All @@ -29,15 +29,15 @@ analyses_to_run:
lineage_variant_file: resources/lineage_determination/Spyogenes_LOCs.tsv

resistance_gene_detection:
status : True
status : False
Title: Presence of resistance gens tetM, ermA and ermB
query_fasta_resistance_gene_detection: resources/AMR/AMR_genes.fasta # Fasta file with AMR genes
query_fasta_virulence_gene_detection: resources/virulence_factors/VFDB_genes.fasta # Fasta file with virulence genes
pident_threshold: 80
cov_threshold: 80

virulence_gene_detection:
status : True
status : False
Title: Presence of Streptococcal virulence genes from the Virulence Factor Database

plasmidfinder:
Expand All @@ -58,24 +58,24 @@ analyses_to_run:
database: resources/virulencefinder_db # VirulenceFinder database

LRE-finder:
status : True
status : False
Title : LRE-Finder
min_consensus_ID : 80
additional_option : -1t1 -cge -matrix
database: resources/lre-finder_db/elm # Database for LRE-finder

serotypefinder :
status : True
status : False
Title : Serotypefinder
database: resources/serotypefinder_db/ # SerotypeFinder database

kleborate :
status : True
status : False
Title : Kleborate
preset : kpsc

CHtyper :
status : True
status : False
Title: Chtyper
threshold : 0.90
coverage : 0.60
Expand All @@ -88,7 +88,14 @@ analyses_to_run:
# database: resources/kmerfinder_db/kmerfinder_db_old/bacteria.ATG # KmerFinder database for bacterial genomes

cgMLSTFinder :
status : True
status : False
Title : cgMLST
scheme : ecoli # choose between salmonella,campylobacter,yersinia,clostridium,ecoli
database: resources/cgmlstfinder_db/ # cgMLSTFinder database


amrfinder:
status : True
Title : NCBI resistance gene finder
database: resources/amrfinderplus/latest
organism: --organism Escherichia # Leave blank or insert --organism alongside one of the supported organisms, listed here: https://github.com/evolarjun/amr/wiki/Curated-organisms
6 changes: 6 additions & 0 deletions workflow/envs/amrfinder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: AMRFinder
channels:
- conda-forge
- bioconda
dependencies:
- ncbi-amrfinderplus
21 changes: 21 additions & 0 deletions workflow/rules/finders.smk
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,24 @@ rule cgMLSTFinder:
# Run cgMLSTFinder with the specified inputs, outputs, and scheme.
python {params.app_path}/cgMLST.py -i {input.R1},{input.R2} -o {output} -db {params.db_path} -s {params.scheme}
"""

# Rule: AMRFinder
# Runs AMRFinder to identify acquired resistance genes in the sample.
rule AMRFinder:
input:
assembly = lambda wildcards: sample_to_assembly_file[wildcards.sample],
params:
# Paths to the databases
res_db_path = lambda wildcards: species_configs[sample_to_organism[wildcards.sample]]["analyses_to_run"]["amrfinder"]["database"],
# Point mutation
organism = lambda wildcards: species_configs[sample_to_organism[wildcards.sample]]["analyses_to_run"]["amrfinder"]["organism"]
output:
# "{out}/{sample}/amrfinder/{sample}.tsv"
directory("{out}/{sample}/amrfinder")
conda:
config["analysis_settings"]["amrfinder"]["yaml"]
shell:
"""
mkdir -p {output}
amrfinder --nucleotide {input.assembly} --database {params.res_db_path} {params.organism} --output {output}/{wildcards.sample}.tsv
"""
Loading