cat >hisat2.sh
index=/home/zhangyihui/my_data/ref_data/hg38/hisat2_index/grch38/genome
ls ../fq/*.fastq.gz | while read id;
do
file=$(basename $id)
sample=${file%_*}
hisat2 -p 32 -x $index --no-mixed --no-discordant -1 ../fq/${sample}_1.fastq.gz -2 ../fq/${sample}_2.fastq.gz -S ${sample}.sam >${sample}.log 2>&1
samtools view -bS ${sample}.sam -o ${sample}.bam
samtools sort ${sample}.bam -@ 10 -o ${sample}.sorted.bam
rm -rf ${sample}.bam
samtools index -@ 10 ${sample}.sorted.bam
rm -rf *.sam
multiqc *.log
done
nohup sh hisat2.sh > hisat2.log 2>&1 &
image.png
image.png
image.png
网友评论