@@ -70,7 +70,6 @@ while getopts 'i:t:p:m:M:w:c:x:r:s:q:f:g:k:d' opt; do
70
70
c)
71
71
coverage=$OPTARG
72
72
;;
73
- ;;
74
73
x)
75
74
min_num_clusters=$OPTARG
76
75
;;
@@ -149,20 +148,10 @@ subsample(){
149
148
echo $timestamp ' : Step 1: Sampling with seqtk'
150
149
echo " "
151
150
seqkit seq -g --threads $threads --min-len $min_len --max-len $max_len $input_file | \
152
- seqtk sample $input_file $proportion > $wd$prefix " _sample.sorted.fastq"
151
+ seqtk sample - $proportion > $wd$prefix " _sample.sorted.fastq"
153
152
echo $timestamp " : $( samtools view -c $wd$prefix " _sample.sorted.fastq" ) reads outputted"
154
153
}
155
154
156
- trim_adapters (){
157
- # # $1 input
158
- # # $2 output
159
- # # TRIM ADAPTERS
160
- echo " "
161
- echo $timestamp ' : Trimming adapters with porechop'
162
- echo " "
163
- porechop --verbosity 0 -t $threads -i $1 -o $2
164
- }
165
-
166
155
sort_file (){
167
156
# # SORT FILE
168
157
echo " "
@@ -178,7 +167,7 @@ reads_overlap(){
178
167
echo " "
179
168
echo $timestamp ' : Looking for overlaps with minimap2'
180
169
echo " "
181
- minimap2 -x ava-ont -t $threads --dual=yes \
170
+ minimap2 -x ava-ont -t $threads --dual=yes --split-prefix $prefix \
182
171
$wd$prefix " _sample.sorted.fastq" $wd$prefix " _sample.sorted.fastq" | \
183
172
fpa drop --internalmatch --length-lower $min_len > $wd$prefix " .paf"
184
173
}
@@ -294,21 +283,14 @@ start=$SECONDS
294
283
295
284
# ### PIPELINE ####
296
285
297
- # ## Trimming adapter with porechop. There in the order of how they were extracted.
298
- # ## It's slow, so I will comfort the dorado feature to remove adapters
299
-
300
- # #&& trim_adapters $wd$prefix"_sample.sorted.fastq" $wd$prefix"_sample.sorted.fastq" \
301
- # #&& trim_adapters $wd$prefix"_collected_reads.fastq" $wd$prefix"_collected_reads.fastq" \
302
- # #&& trim_adapters $wd$prefix"_collected_reads.fastq" $wd$prefix"_collected_reads.fastq" \
303
-
304
286
create_wd && subsample \
305
- && sort_file && reads_overlap && mt_reads_filt && first_assembly && gfa2fasta \
287
+ && sort_file && reads_overlap && mt_reads_filt \
288
+ && first_assembly && gfa2fasta \
306
289
&& collecting_mt_reads $wd$prefix " _first_draft_asm.fasta" $input_file $wd$prefix " _align.bam" $wd$prefix " _collected_reads.fastq" \
307
290
&& quality_control && second_assembly && select_contig \
308
291
&& collecting_mt_reads $wd$prefix " _second_draft_asm.fasta" $input_file $wd$prefix " _align.bam" $wd$prefix " _collected_reads.fastq" \
309
- && quality_control && correct_reads # && polish_asm
310
-
311
- # correct_reads
292
+ && quality_control
293
+ # && correct_reads #&& polish_asm
312
294
313
295
echo " "
314
296
echo " ### MITNANEX finished ###"
0 commit comments