it's my first time to use HISAT2 for alignment and htseq count for counting i know commands for hisat is hisat2 [options]* -x <hisat2-idx> {-1 <m1> -2 <m2> | -U <r> | --sra-acc <sra accession="" number="">} [-S <hit>] but i dont know relapse my data in commands and i dont know commands for htseq-count I need to write down a command that would include the followin for one and total samples command for one sample : map against hg38, srr5168817_1.fq ,srr5168817_2.fq are pair end read for one sample hg38.gtf for gene-name
command for total sample(7 samples):
Have anyone worked on this pipeline before and can help me ?
Thank you
1 answer
A simple solution would be using a for loop. This will run for multiple R1-R2 pairs present in the current working directory
# Creating an array of fastq gunzipped files
total_files=`find -name '*.gz' | wc -l`
arr=( $(ls *.gz) )
# Alignment
for ((i=0; i<$total_files; i+=2))
{
sample_name=`echo ${arr[$i]} | awk -F "_R1" '{print $1}'`
echo "[Hisat mapping running for sample] $sample_name"
date && time hisat2 -p 60 -x genome_index -1 ${arr[$i]} -2 ${arr[$i+1]} -S $sample_name.sam --dta
printf "\n\n"
}
NOTE: Please read the documentation carefully before you proceed as the commands/parameters vary accordingly!
Log in to answer this question.
Have you considered reading the manual?