@@ -70,7 +70,6 @@ while getopts 'i:t:p:m:M:w:c:x:r:s:q:f:g:k:d' opt; do
7070 c)
7171 coverage=$OPTARG
7272 ;;
73- ;;
7473 x)
7574 min_num_clusters=$OPTARG
7675 ;;
@@ -149,20 +148,10 @@ subsample(){
149148 echo $timestamp ' : Step 1: Sampling with seqtk'
150149 echo " "
151150 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"
153152 echo $timestamp " : $( samtools view -c $wd$prefix " _sample.sorted.fastq" ) reads outputted"
154153}
155154
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-
166155sort_file (){
167156# # SORT FILE
168157 echo " "
@@ -178,7 +167,7 @@ reads_overlap(){
178167 echo " "
179168 echo $timestamp ' : Looking for overlaps with minimap2'
180169 echo " "
181- minimap2 -x ava-ont -t $threads --dual=yes \
170+ minimap2 -x ava-ont -t $threads --dual=yes --split-prefix $prefix \
182171 $wd$prefix " _sample.sorted.fastq" $wd$prefix " _sample.sorted.fastq" | \
183172 fpa drop --internalmatch --length-lower $min_len > $wd$prefix " .paf"
184173}
@@ -294,21 +283,14 @@ start=$SECONDS
294283
295284# ### PIPELINE ####
296285
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-
304286create_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 \
306289&& collecting_mt_reads $wd$prefix " _first_draft_asm.fasta" $input_file $wd$prefix " _align.bam" $wd$prefix " _collected_reads.fastq" \
307290&& quality_control && second_assembly && select_contig \
308291&& 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
312294
313295echo " "
314296echo " ### MITNANEX finished ###"
0 commit comments