Question: hisat2 and htseq-count
0
gravatar for miravet65
3.6 years ago by
miravet650
miravet650 wrote:

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 • 2.0k views
ADD COMMENTlink modified 3.6 years ago by lakhujanivijay5.3k • written 3.6 years ago by miravet650

Have you considered reading the manual?

ADD REPLYlink written 3.6 years ago by WouterDeCoster44k
2
gravatar for lakhujanivijay
3.6 years ago by
lakhujanivijay5.3k
India/Ahmedabad
lakhujanivijay5.3k wrote:

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 COMMENTlink written 3.6 years ago by lakhujanivijay5.3k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2091 users visited in the last hour