Mercurial > repos > trungnguyencoffee97ktest > nanopore_sanger
diff nanoclust.sh @ 0:cc560d7f391a draft default tip
Uploaded a bash file to test
author | trungnguyencoffee97ktest |
---|---|
date | Wed, 01 Jun 2022 07:02:10 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nanoclust.sh Wed Jun 01 07:02:10 2022 +0000 @@ -0,0 +1,24 @@ +#! /bin/bash +## This code is invented to test NanoporeSanger pipeline, in which we use barrnap to extract 16S ribosomal of bacteria, and use it for taxonomy +set -ux +export THREADS=20 +export nextflow='/media/kt/data/0.Tools/nextflow/nextflow' +export nanoclust_main='/media/kt/data/TRUNG/2.Tool/NanoCLUST/main.nf' +export seqtk='/media/kt/data/anaconda3/envs/kt/bin/seqtk' +export outdir='/media/kt/data/TRUNG/0.Projects/13.NANOPORE-SANGER/3.Output/NanoClust/16SNCBI_REFFSEQ' +export db16Sncbi='/media/kt/data/TRUNG/2.Tool/NanoCLUST/db/16S_ribosomal_RNA' +export db16Ssilva_nr_ref='/media/kt/data/TRUNG/3.Database/database_sliva/Nonredundant_Ref/SILVA_138-1_nr_ref' +export taxdbncbi="/media/kt/data/TRUNG/2.Tool/NanoCLUST/db/taxdb/" + + +longread='/media/kt/data/TRUNG/0.Projects/13.NANOPORE-SANGER/3.Output/Nanopore_reads_of_GCF_000196035.1_ASM19603v1_genomic.trimmed.fastq.gz' +allreads='' +for nread in {100,500,1000,1500,2000}; do + prefix=$(basename -s .fastq.gz $longread) + #capacity=$(awk "BEGIN {print int($nread*1500/10**6+0.5)}") + mkdir -p $outdir/${prefix} + outread=$outdir/${prefix}/${prefix}_${nread}_reads.fastq.gz + $seqtk sample -s50 $longread $nread | gzip > $outread + $nextflow $nanoclust_main -profile docker --reads $outread --outdir $outdir/$prefix/${prefix}_${nread}_reads \ + --db $db16Sncbi --tax $taxdbncbi +done \ No newline at end of file