-
Notifications
You must be signed in to change notification settings - Fork 0
/
Scope_and_smudges.sh
46 lines (35 loc) · 1.23 KB
/
Scope_and_smudges.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
#!/bin/bash
#SBATCH --job-name=Scope_and_smudges_excelsa_trimmed.sh
#SBATCH --partition=mmemq
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=40
#SBATCH --mem=400g
#SBATCH --time=12:00:00
#SBATCH --output=%x.out
#SBATCH --error=%x.err
source $HOME/.bash_profile
cd /gpfs01/home/mbxtm2/Danica_raw_revio
mkdir tmp
conda activate /gpfs01/home/mbxtm2/miniconda3/envs/kmc_genomescope
ls /gpfs01/home/mbxtm2/Danica_raw_revio/out.fastq.gz > FILES
# Runs kmc to count k-mers
echo now for kmc
kmc -k21 -t40 -m400 -ci1 -cs10000 @FILES reads tmp/
kmc_tools transform reads histogram reads.histo -cx10000
# Runs GenomeScope2
echo now for Genomescope
# -p used to select ploidy
genomescope2 -i reads.histo -o . -k 21 -p 6
conda deactivate
conda activate /gpfs01/home/mbxtm2/miniconda3/envs/kmc_smudgeplot
# Runs Smudgeplot
echo now for smudgeplot
kmc -k21 -t40 -m400 -ci1 -cs10000 @FILES kmcdb tmp
kmc_tools transform kmcdb histogram kmcdb_k21.hist -cx10000
L=$(smudgeplot.py cutoff kmcdb_k21.hist L)
U=$(smudgeplot.py cutoff kmcdb_k21.hist U)
echo $L $U
kmc_tools transform kmcdb -ci"$L" -cx"$U" dump -s kmcdb_L"$L"_U"$U".dump
smudgeplot.py hetkmers -o kmcdb_L"$L"_U"$U" < kmcdb_L"$L"_U"$U".dump
smudgeplot.py plot kmcdb_L"$L"_U"$U"_coverages.tsv
conda deactivate