
R1file=$1
R2file=$2
outdir=$3
sample=$4

total_num=1000000

seqtk sample -s 10 ${R1file} ${total_num} > ${outdir}/${sample}_${total_num}_R1.fastq

seqtk sample -s 10 ${R2file} ${total_num} > ${outdir}/${sample}_${total_num}_R2.fastq;

cd ${outdir};

gzip ${outdir}/${sample}_${total_num}_R1.fastq;

gzip ${outdir}/${sample}_${total_num}_R2.fastq
