hisat2 and htseq-count
1
0
Entering edit mode
7.5 years ago
miravet65 • 0

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

RNA-Seq next-gen • 3.0k views
ADD COMMENT
0
Entering edit mode

Have you considered reading the manual?

ADD REPLY
2
Entering edit mode
7.5 years ago

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!

ADD COMMENT

Login before adding your answer.

Traffic: 1988 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6