-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathB04Sm5_genome_tool_parameters.sh
89 lines (77 loc) · 2.47 KB
/
B04Sm5_genome_tool_parameters.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
## Quality control of read libraries ##
# Quality control of short (Illumina) reads using Kneaddata
kneaddata \
-i illumina_reads_raw_1.fastq \
-i illumina_reads_raw_2.fastq \
-o illumina_reads_qc \
--trimmomatic-options SLIDINGWINDOW:4:20 \
--trimmomatic-options MINLEN:90
# Quality control of long (Oxford Nanopore) reads using filtlong
# (in addition to length target bases cutoffs, filters out long reads that don't have k-mer matches to the short read library)
filtlong \
-1 illumina_reads_qc_1.fastq \
-2 illumina_reads_qc_2.fastq \
--min_length 10000 \
--target_bases 100000000 \
--trim \
--split 100 \
nanopore_reads_raw.fastq > filtered_nanopore_reference_split.fastq
## Generation of draft assemblies ##
# flye
flye \
--nano-raw filtered_nanopore_reference_split.fastq \
--genome-size 2m \
--threads 32 \
--out-dir flye_output
# hybridSPAdes
spades.py \
-1 illumina_reads_qc_1.fastq \
-2 illumina_reads_qc_2.fastq \
--nanopore filtered_nanopore_reference_split.fastq \
-t 32 \
-m 750 \
-o spades_output/
# Unicycler
unicycler \
-1 illumina_reads_qc_1.fastq \
-2 illumina_reads_qc_2.fastq \
-l nanopore filtered_nanopore_reference_split.fastq \
--threads 32 \
-o unicycler_output
# Generating a consensus assembly using Trycycler
trycycler cluster \
--assemblies assemblies/*.fasta \
--reads nanopore_reads_raw.fastq \
--threads 32 \
--out_dir trycycler_cluster
trycycler reconcile \
--reads reads.fastq \
--cluster_dir trycycler_cluster/cluster_001 \
--threads 48 \
--max_add_seq 1100
trycycler msa \
--cluster_dir trycycler_cluster2/cluster_001/ \
--threads 48
trycycler partition \
--reads nanopore_reads_raw.fastq \
--cluster_dirs trycycler_cluster2/cluster_001/ \
--threads 48
trycycler consensus \
--cluster_dir trycycler/cluster_001 \
--threads 48
## Polishing the final consensus
# Polishing the final consensus with the long read library using medaka
medaka_consensus \
-i nanopore_reads_raw.fastq \
-d trycycler_cluster/cluster_001/7_final_consensus.fasta \
-o medaka \
-m r941_min_high_g360 \
-t 48
# Polishing the final consensus with the short read libraries using Pilon
#multiple rounds of pilon were performed until no further changes occurred
pilon \
--genome "$before".fasta \
--frags illumina_alignments.bam \
--unpaired illumina_alignments_u.bam \
--output "$after" \
--changes