# Author: Rehannah Borup Helweg-Larsen # script for sc-RNA seq mapping and FPKM estimation based on hisat2 mapping script published in: # Pertea, M., Kim, D., Pertea, G.M., Leek, J.T. & Salzberg, S.L. # Transcript-level expression analysis of RNA-seq experiments with HISAT, StringTie and Ballgown. # Nat Protoc 11, 1650-67 (2016). # running AfterQC python script for trimming of fastq files using defalut settings cd WORKDIR python after.py # Generate Index for hisat2 based on gencode v27 (GRCh38) hisat2-build -p 22 GRCh38.primary_assembly.genome.fa.gz gencode.v27 # ### Run Hisat and Stringtie script (Pertea et al. 2016): nohup ./rnaseq_pipeline.sh & # calls rnaseq_pipeline_config.sh # remove/filter Mitochondrial reads from aligned bam files samtools view -h $bam | awk '{if($3 != "chrM" && $3 != "chrUn"){print $0}}' | samtools view -Sb > $bamfile # output MT filtered bamfile # run stringtie on bam files to get abundance output (FPKM) #!/bin/bash while read bamfile do base=`echo $bamfile | cut -d "." -f1 |cat` echo $base GTFFILE="gencode.v27.annotation.gtf" stringtie -p 20 -G $GTFFILE -e -A $tsv $bamfile done < bam.files