0
|
1 #! /bin/bash
|
|
2 ## This code is invented to test NanoporeSanger pipeline, in which we use barrnap to extract 16S ribosomal of bacteria, and use it for taxonomy
|
|
3 set -ux
|
|
4 export THREADS=20
|
|
5 export nextflow='/media/kt/data/0.Tools/nextflow/nextflow'
|
|
6 export nanoclust_main='/media/kt/data/TRUNG/2.Tool/NanoCLUST/main.nf'
|
|
7 export seqtk='/media/kt/data/anaconda3/envs/kt/bin/seqtk'
|
|
8 export outdir='/media/kt/data/TRUNG/0.Projects/13.NANOPORE-SANGER/3.Output/NanoClust/16SNCBI_REFFSEQ'
|
|
9 export db16Sncbi='/media/kt/data/TRUNG/2.Tool/NanoCLUST/db/16S_ribosomal_RNA'
|
|
10 export db16Ssilva_nr_ref='/media/kt/data/TRUNG/3.Database/database_sliva/Nonredundant_Ref/SILVA_138-1_nr_ref'
|
|
11 export taxdbncbi="/media/kt/data/TRUNG/2.Tool/NanoCLUST/db/taxdb/"
|
|
12
|
|
13
|
|
14 longread='/media/kt/data/TRUNG/0.Projects/13.NANOPORE-SANGER/3.Output/Nanopore_reads_of_GCF_000196035.1_ASM19603v1_genomic.trimmed.fastq.gz'
|
|
15 allreads=''
|
|
16 for nread in {100,500,1000,1500,2000}; do
|
|
17 prefix=$(basename -s .fastq.gz $longread)
|
|
18 #capacity=$(awk "BEGIN {print int($nread*1500/10**6+0.5)}")
|
|
19 mkdir -p $outdir/${prefix}
|
|
20 outread=$outdir/${prefix}/${prefix}_${nread}_reads.fastq.gz
|
|
21 $seqtk sample -s50 $longread $nread | gzip > $outread
|
|
22 $nextflow $nanoclust_main -profile docker --reads $outread --outdir $outdir/$prefix/${prefix}_${nread}_reads \
|
|
23 --db $db16Sncbi --tax $taxdbncbi
|
|
24 done |