Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tpall committed Nov 5, 2018
1 parent 46ae23a commit f761a08
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 362 deletions.
3 changes: 1 addition & 2 deletions cluster.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"__default__" :
{
"name" : "{rule}.{wildcards}",
"time" : "00:10:00",
"partition" : "main",
"cpus-per-task" : 1,
"mem" : 2000,
"output" : "logs/{rule}_{wildcards}_slurm_%j.log"
"output" : "logs/slurm/slurm_%j.log"
},
"fastp" :
{
Expand Down
12 changes: 0 additions & 12 deletions config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@

# Global parameters -------------------

# Run virome characterisation (default) or virus discovery workflow (set virome to False)
virome: True

# Option to save time by not running blastx
run_blastx: False

Expand All @@ -23,22 +20,13 @@ virus_nr: "/gpfs/software/VirusSeeker/databases/VirusDBNR_20160802/VirusDBNR_201

# Path to taxonomy database
vhunter: "/gpfs/software/VirusSeeker/databases/taxdump_300817/vhunter.db"
names: "/gpfs/software/VirusSeeker/databases/taxdump_300817/names.dmp"
nodes: "/gpfs/software/VirusSeeker/databases/taxdump_300817/nodes.dmp"
division: "/gpfs/software/VirusSeeker/databases/taxdump_300817/division.dmp"
gi_taxid_nucl: "/gpfs/software/VirusSeeker/databases/taxdump_300817/gi_taxid_nucl.dmp"
gi_taxid_prot: "/gpfs/software/VirusSeeker/databases/taxdump_300817/gi_taxid_prot.dmp"

# Paths to nt and nr blast database to be used for environment variable
nt: "/gpfs/software/VirusSeeker/databases/nt/nt"
nr: "/gpfs/software/VirusSeeker/databases/nr/nr"

# Rule parameters ---------------------

# Fastp
fastp:
threads: 4

# fastq-join
fastq-join:
maximum_difference: 5
Expand Down
11 changes: 5 additions & 6 deletions rules/common.smk
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@

# Load required libraries
import os.path
import os
import json
from os import listdir
import glob
import pandas as pd
shell.executable("bash")

# Load configuration file with sample and path info
configfile: "config.yml"
samples = pd.read_table(config["samples"], sep = "\s+", index_col = "sample", dtype = str)
sample_ids = samples.index.values.tolist()
n_files = config["split_fasta"]["n_files"]

# Create logs dir
import os
if not os.path.exists("logs"):
os.makedirs("logs")
# Create slurm logs dir
if not os.path.exists("logs/slurm"):
os.makedirs("logs/slurm")

6 changes: 3 additions & 3 deletions rules/refgenomefilter.smk
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ rule megablast_refgenome:
db = config["ref_genome"],
query = rules.refgenome_unmapped_masked.output
output:
out = "refgenomefilter2/{sample}_megablast_{n}.tsv"
out = "refgenomefilter/{sample}_megablast_{n}.tsv"
params:
task = "megablast",
perc_identity = config["megablast_ref_genome"]["perc_identity"],
Expand All @@ -68,8 +68,8 @@ rule parse_megablast:
blast_result = rules.megablast_refgenome.output.out,
query = rules.refgenome_unmapped_masked.output
output:
mapped = "refgenomefilter2/{sample}_refgenome_filtered_{n}_known-host.tsv",
unmapped = "refgenomefilter2/{sample}_refgenome_filtered_{n}_unmapped.fa"
mapped = "refgenomefilter/{sample}_refgenome_filtered_{n}_known-host.tsv",
unmapped = "refgenomefilter/{sample}_refgenome_filtered_{n}_unmapped.fa"
params:
e_cutoff = 1e-10,
outfmt = rules.megablast_refgenome.params.outfmt
Expand Down
254 changes: 0 additions & 254 deletions scripts/run-slurm-snakemake.sh

This file was deleted.

Loading

0 comments on commit f761a08

Please sign in to comment.