Skip to content

Commit

Permalink
Add viral reference, only use after removing human and bacterial read…
Browse files Browse the repository at this point in the history
…s eg with unmapped.fastq
  • Loading branch information
colindaven committed Mar 9, 2020
1 parent 18a1ac9 commit c062aab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
14 changes: 4 additions & 10 deletions run_Wochenende.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@
A whole genome/metagenome analysis pipeline in Python3
Author: Tobias Scheithauer
Author: Dr. Colin Davenport
Author: Fabian Friedrich
TODOs:
- Also trial with far more comprehensive bbmap adapters
- Add test slurmscripts to check errors
- handle TruSeq and NEB Next adapters
and test this vs alternatives to Trimmomatic, eg
Changelog
1.5 restructure wochenende_reporting, requires Python3.6+
1.4 add wochenende_plot.py file plotting
1.3 add samtools flagstat to get per cent reads aligned
1.3 add --testWochenende tests to test pipeline functionality and report success on a small reference
Expand All @@ -30,13 +25,13 @@
import argparse
import time

version = "1.5 - Mar 2020"
version = "1.4 - Feb 2020"

##############################
# CONFIGURATION
##############################

## Paths to commands - please edit as appropriate. If it is in your PATH just type the command. We recommend conda.
## Paths to commands. If it is in your PATH just type the command. We recommend conda.
path_fastqc = 'fastqc'
path_afterqc = '/mnt/ngsnfs/tools/afterQC/AfterQC-0.9.6/after.py'
path_fastp = '/mnt/ngsnfs/tools/fastp/fastp'
Expand All @@ -53,7 +48,7 @@
path_java = 'java'
path_abra_jar = '/mnt/ngsnfs/tools/abra2/abra2_latest.jar'
path_minimap2 = 'minimap2'
## Paths to reference seqs. Edit as appropriate!
## Paths to reference seqs
path_refseq_dict = {
"2016_06_1p_genus" : "/working2/tuem/metagen/refs/2016/bwa/2016_06_PPKC_metagenome_test_1p_genus.fa",
"2016_06_1p_spec_corrected" : "/lager2/rcug/seqres/metagenref/bwa/2016_06_PPKC_metagenome_test_1p_spec_change_cln.fa",
Expand All @@ -75,9 +70,9 @@
"zf10": "/lager2/rcug/seqres/DR/bwa/GRCz10.fa",
"ss11": "/lager2/rcug/seqres/SS/bwa/Sus_scrofa.Sscrofa11.1.dna.toplevel.fa",
"PA14": "/lager2/rcug/seqres/PA/bwa/NC_008463.fna",
"nci_viruses": "/lager2/rcug/seqres/metagenref/bwa/nci_viruses.fa",
"testdb": "testdb/ref.fa",
}
# Adapters - edit as appropriate
ea_adapter_fasta = '/mnt/ngsnfs/tools/miniconda2/pkgs/bbmap-37.17-0/opt/bbmap-37.17/resources/adapters.fa'
adapter_fasta = '/mnt/ngsnfs/tools/miniconda3/envs/wochenende/share/trimmomatic-0.38-0/adapters/TruSeq3-PE.fa'
## Other
Expand Down Expand Up @@ -262,7 +257,6 @@ def runFastpPE(stage_infile_1, stage_infile_2, noThreads):
fastpcmd = [path_fastp, '--in1='+ stage_infile_1, '--out1='+ stage_outfile,
'--in2='+ stage_infile_2, '--out2='+ deriveRead2Name(stage_outfile),
'--disable_quality_filtering', '--disable_length_filtering',
'--length_required=35',
'--cut_by_quality5', '--cut_window_size=5',
'--cut_mean_quality=15', '--html='+ prefix + '.html',
'--json='+ prefix + '.json', '--thread='+ noThreads]
Expand Down
10 changes: 7 additions & 3 deletions run_Wochenende_SLURM.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
## A SLURM sbatch script which is part of the Wochenende Pipeline
## Supply the FASTA input as arg1, bash run_Wochenende_slurm.sh in_R1.fastq
## Supply the FASTA input as arg1, bash run_Wochenende_slurm.sh in.fastq

# set partition
#SBATCH -p normal
Expand Down Expand Up @@ -61,7 +60,7 @@ cpus=12
# Run script - Paired end reads R2 will be calculated by replacing R1 with R2

# Test wochenende pipeline. Run tests with sbatch run_Wochenende_SLURM.sh testdb/reads_R1.fastq
python3 run_Wochenende.py --metagenome testdb --threads $cpus --testWochenende --aligner bwamem --mq30 --remove_mismatching --readType SE --debug --force_restart $fastq
#python3 run_Wochenende.py --metagenome testdb --threads $cpus --testWochenende --aligner bwamem --mq30 --remove_mismatching --readType SE --debug --force_restart $fastq

# Test wochenemde with fastp - the auto tests here will fail here since fastp not trm is in the filename
#python3 run_Wochenende.py --metagenome testdb --fastp --threads $cpus --testWochenende --aligner bwamem --mq30 --remove_mismatching --readType SE --debug --force_restart $fastq
Expand All @@ -79,6 +78,11 @@ python3 run_Wochenende.py --metagenome testdb --threads $cpus --testWochenende -
#python3 run_Wochenende.py --metagenome 2019_01_meta_mouse_ASF --threads $cpus --aligner bwamem --no_abra --mq30 --remove_mismatching --readType SE --debug --force_restart $fastq
#python3 run_Wochenende.py --metagenome 2019_01_meta_mouse_OMM --threads $cpus --aligner bwamem --no_abra --mq30 --remove_mismatching --readType SE --debug --force_restart $fastq

## 2020 03 NCI viruses only - with mq30
#python3 run_Wochenende.py --metagenome nci_viruses --threads $cpus --aligner bwamem --no_abra --mq30 --remove_mismatching --readType SE --debug --force_restart $fastq
## 2020 03 NCI viruses only - no mq30
python3 run_Wochenende.py --metagenome nci_viruses --threads $cpus --aligner bwamem --no_abra --remove_mismatching --readType SE --debug --force_restart $fastq

#2016 2016_06_PPKC_metagenome_test_1p_spec_change
#python3 run_Wochenende.py --metagenome 2016_06_1p_spec_corrected --threads $cpus --readType SE --debug --force_restart $fastq
#python3 run_Wochenende.py --metagenome 2016_06_1p_spec_corrected --threads $cpus --aligner bwamem --no_abra --mq30 --readType SE --debug --force_restart $fastq
Expand Down

0 comments on commit c062aab

Please sign in to comment.