-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathr11_flye.sh
52 lines (45 loc) · 1.94 KB
/
r11_flye.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
#!/bin/bash
#SBATCH --job-name="Flye"
#SBATCH -A jje_lab
#SBATCH -p highmem
#SBATCH --array=100
#SBATCH --cpus-per-task=32
#SBATCH --mem-per-cpu=10G
raw="/dfs7/jje/jenyuw/Eval-sv-temp/raw"
ref="/dfs7/jje/jenyuw/Eval-sv-temp/reference"
qc_report="/dfs7/jje/jenyuw/Eval-sv-temp/results/qc_report"
trimmed="/dfs7/jje/jenyuw/Eval-sv-temp/results/trimmed"
assemble="/dfs7/jje/jenyuw/Eval-sv-temp/results/assemble"
source ~/.bashrc
nT=$SLURM_CPUS_PER_TASK
if [[ $SLURM_ARRAY_TASK_ID == 1 ]]
then
ls ${raw}/iso1_{R1041,R941,hifi}.fastq.gz ${raw}/SRR228229{29,30}_R1041.fastq.gz >${raw}/namelist.txt
ls ${raw}/SRR11906525_Sequel.fastq.gz ${raw}/SRR11906526_RSII.fastq.gz >>${raw}/namelist.txt
fi
if [[ $SLURM_ARRAY_TASK_ID -le 7 ]]
then
file=`head -n $SLURM_ARRAY_TASK_ID ${raw}/namelist.txt |tail -n 1`
strain=`echo ${file} | cut -d '/' -f 7 | cut -d '_' -f 1`
read_type=`echo ${file} | cut -d '/' -f 7 | cut -d '_' -f 2|cut -d '.' -f 1`
echo -e ${file} "\n" ${strain} "\n" ${read_type}
module load python/3.10.2
declare -A preset_option=(['RSII']='--pacbio-raw' ['Sequel']='--pacbio-raw' ['hifi']='--pacbio-hifi' ['R1041']='--nano-hq' ['R941']='--nano-raw')
echo ${preset_option[$read_type]}
#--pacbio-raw --pacbio-corr --pacbio-hifi --nano-raw --nano-corr --nano-hq --subassemblies is require
flye --threads ${nT} --genome-size 135m ${preset_option[$read_type]} ${file} --out-dir ${assemble}/${strain}_${read_type}_flye
fi
#porechop_abi is not required because the adapters seem to be already removed.
##Chopper is works on fastQ but not fastA
#module load anaconda/2022.05
#conda activate qc
#zcat ${file} |chopper -l 560 --headcrop 30 --tailcrop 30 |\
#bgzip -@ ${nT} -c > ${trimmed}/${strain}_${read_type}.trimmed.fastq.gz
#rm ${trimmed}/${strain}_${read_type}.abi.fastq.gz
if [[ $SLURM_ARRAY_TASK_ID == 100 ]]
then
flye --threads ${nT} --genome-size 135m --asm-coverage 60 \
--nano-hq ${raw}/*_R1041.fastq.gz \
--out-dir ${assemble}/iso1_R1041_flye-many
fi
module unload python/3.10.2