标签:nbsp 保存 set tools 质量 wget thread size 基因组
cd ~/reference mkdir -p index/hisat && cd index/hisat wget -c ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/data/hg19.tar.gz wget -c ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/data/mm10.tar.gz tar zxvf hg19.tar.gz tar xvzf mm10.tar.gz
#! usr/bin/bash set -u set -e set -o pipefail hg19_ref=/mnt/hgfs/2017/reference/index/hisat/hg19/genome mm10_ref=/mnt/hgfs/2017/reference/index/hisat/mm10/genome data_path=/mnt/hgfs/2017/rna_seq/data NUM_THREADS=25 ls --color=never Homo*1.fastq.gz | while read id;do(~/biosoft/hisat2-2.1.0/hisat2 -t -p $NUM_THREADS -x $hg19_ref -1 $data_path/${id%_*}_1.fastq.gz -2 $data_path/${id%_*}_2.fastq.gz 2 > ${id%_*}_map.log | samtools view -Sb - > ${id%_*}.bam);done ls --color=never Mus*1.fastq.gz | while read id;do(~/biosoft/hisat2-2.1.0/hisat2 -t -p $NUM_THREADS -x $mm10_ref -1 $data_path/${id%_*}_1.fastq.gz -2 $data_path/${id%_*}_2.fastq.gz 2 > ${id%_*}_map.log | samtools view -Sb - > ${id%_*}.bam);done ls --color=never *.bam | while read id;do(samtools sort --threads $NUM_THREADS $id -o ${id%.*}_sorted.bam);done ls --color=never *_sorted.bam | while read id;do(samtools index $id);done
bash map.sh
标签:nbsp 保存 set tools 质量 wget thread size 基因组
原文地址:http://www.cnblogs.com/freescience/p/7342895.html