-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGapfill.sh
56 lines (48 loc) · 1.53 KB
/
Gapfill.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
# needs tools
# TGS-GapCloser
# needs scripts
# gapfill.py
####### For samples for GJ
#######
# Corrected reads
#######
corr_reads=${sample}.corr_reads.fa
th=1
~/tool/TGS-GapCloser_v1.0.1/TGS-GapCloser.sh \
--scaff ref/msu7/chrs.fa \
--reads ${corr_reads} \
--output msu7_${sample}_corr_reads_gapfill \
--tgstype ont \
--min_idy 0.9 \
--min_match 300 \
--ne \
--thread ${th} >pipe.log 2>pipe.err
######
# Assembled contigs
######
ass_contigs=${sample}.contigs.fa
th=1
~/tool/TGS-GapCloser_v1.0.1/TGS-GapCloser.sh \
--scaff ref/msu7/chrs.fa \
--reads ${ass_contigs} \
--output msu7_${sample}_ass_contigs_gapfill \
--tgstype ont \
--min_idy 0.9 \
--min_match 1000 \
--ne \
--thread ${th} >pipe.log 2>pipe.err
######
# Merge
######
# chrs.contigs.fa: break all N of chr and to every contig,
# exist in output of TGS-GapCloser, named msu7_${sample}_ass_contigs_gapfill.contig
mv msu7_${sample}_ass_contigs_gapfill.contig ref/msu7/chrs.contigs.fa
# corrected reads
cat *_corr_reads_gapfill/*updated_scaff_infos > merged_corr_reads.updated_scaff_infos
python gapfill.py merged_corr_reads.updated_scaff_infos ref/msu7/chrs.contigs.fa min > msu7.chrs.corr_reads_min.fa
# assembled contigs
cat *_ass_contigs_gapfill/*updated_scaff_infos > merged_ass_contigs.updated_scaff_infos
python gapfill.py merged_ass_contigs.updated_scaff_infos ref/msu7/chrs.contigs.fa min > msu7.chrs.ass_contigs_min.fa
# total
cat */*updated_scaff_infos > merged.updated_scaff_infos
python gapfill.py merged.updated_scaff_infos ref/msu7/chrs.contigs.fa min > msu7.chrs.min.fa