-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_raven.sh
executable file
·27 lines (25 loc) · 1.25 KB
/
run_raven.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
#!/bin/bash
# Run Raven assembler for long-read assemblies
# run_raven.sh [input read file] [Filename extension of the input read file (fastq/fastq.gz/etc)] [k-mer size] [window size] [number of polishing rounds] [number of threads]
# Change the number of threads for your computer.
# Copyright (C) 2022-2023 Yu Wan <wanyuac@126.com>
# Licensed under the GNU General Public Licence version 3 (GPLv3) <https://www.gnu.org/licenses/>.
# First version: 18 Dec 2022; latest update: 16 Aug 2023
# Read parameters ###############
r="$1" # Input read file
e="$2" # Filename extension of the input read file, without the leading '.' sign (namely, fastq/fastq.gz/etc)
k="$3" # K-mer size
w="$4" # Window length
p="$5" # Polish rounds
t="$6" # Number of threads
# Run Raven assembler ###############
f=$(basename "$r" ".$e")
pre="${f}_raven_k${k}w${w}p${p}"
v=`raven --version`
if [ -z "$t" ]; then
echo 'Set the number of threads to 1'
t=1
fi
echo "[$(date)] Assembling long reads from $r using Raven $v (k=${k}, w=${w}; polish=${p}; threads=${t})"
raven --threads $t --polishing-rounds $p --kmer-len $k --window-len $w --disable-checkpoints --graphical-fragment-assembly ${pre}.gfa $r > ${pre}.fasta
echo -e "[$(date)] Raven assembly of FASTQ file $r is completed.\n"