Bash script for batch work

#!/bin/bash
#PBS -l walltime=96:00:00,nodes=8:ppn=10
#PBS -N kofamscan

source activate hybrid_assembly
#SC9523_extract_paired_1.fasta.fastq_matchedmeghitresult
#metawrap binning -o /home/mhyleung/workspace/loreal_shotgun2/NovaSeq_new/metawrap_assembly_R2/LOR303C -t 16 -a /home/mhyleung/workspace/loreal_shotgun2/NovaSeq_new/metawrap_assembly_R2/LOR303C_S134_R1_00
#1_kneaddata_paired/LOR303C_final_assembly.fasta –maxbin2 –metabat2 –concoct /disk/rdisk08/mhyleung/loreal_shotgun2/NovaSeq_new/decontam_output_genome/paired_completed/szy_test/LOR303C_S134_R1_001_knead data_paired_*.fastq
cd /disk/rdisk08/mhyleung/aerosphere/kneaddata_fungal_genome_removal/fastq/matched/done/megahit_R1/test
#SC9523_extract_paired_1.fasta.fastq_matched_kneaddata_paired_1.fastq.gz
#Use bracken to normalize kraken2 output to relative abundance
#for f in  /home/zhiyshen/zhiyshen/tools/kofamscan/proteins/*.fasta

#kraken2 –paired –gzip-compressed $R0/${R0%}_1.fq.gz  $R0/${R0%}_2.fq.gz –output ${R0%}_kraken2taxid  –report ${R0%}_kraken2report –threads 30 –db /home/zyshen/database/kraken2

for R1 in  /disk/rdisk08/mhyleung/aerosphere/kneaddata_fungal_genome_removal/fastq/matched/done/megahit_R1/test/*1.fastq.gz

do
R2=${R1//_1.fastq.gz/_2.fastq.gz}
R3=${R1//extract_paired_1.fasta.fastq_matched_kneaddata_paired_1.fastq.gz/meghitresult}
#megahit -1 $R1 -2 $R2 -o $output –k-min 37 –k-max 67 –k-step 10 -m 0.99 –kmin-1pass –continue –min-contig-len 1000 &

megahit -1 $R1 -2 $R2 -o $R3 –presets meta-sensitive –min-contig-len 1000

done

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Protected by WP Anti Spam