###拿到cleandata之后 先trimmomatic 此列选用特异的adapter序列##
for i in *1.clean.fq.gz ; do i=${i%1.clean.fq.gz*}; trimmomatic PE -threads 30 ${i}1.clean.fq.gz ${i}2.clean.fq.gz ${i}1.paired.fastq ${i}1.unpaired.fastq ${i}2.paired.fastq ${i}2.unpaired.fastq ILLUMINACLIP:/media/shen/disk3/jjc/2018965/190310_A00403_0141_BHGT3KDSXX/trim_results/primer.fa:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36; done
### hisat2 比对###
for i in *1.paired.fastq ; do i=${i%1.paired.fastq*}; hisat2 --dta -p 40 -x '/media/shen/disk1/jjc/reference/GRCm38/hisat2/grcm38_snp_tran/genome_snp_tran' -1 ${i}1.paired.fastq -2 ${i}2.paired.fastq -S ${i}.sam ; done
###samtools ##
for i in *.sam; do i=${i%.sam*}; samtools sort -@ 40 -o ${i}.bam ${i}.sam ; done
###featurecounts定量##
for i in *.bam; do i=${i%.bam*}; featureCounts -T 40 -p -t exon -g gene_name -a '/media/shen/disk1/jjc/reference/GRCm38/Mus_musculus.GRCm38.84.gtf' -o ${i}.fea.txt ${i}.bam ; done
for i in *.fea.txt; do i=${i%.fea.txt*}; cut -f 1,7 ${i}.fea.txt|grep -v '^#' > ${i}.rawcounts.txt ; done
for i in *.rawcounts.txt; do i=${i%.rawcounts.txt*}; sed -i '1d' ${i}.rawcounts.txt ; done