HISAT2 command help
1
4
Entering edit mode
8.8 years ago

Hey,

It's my first time to use HISAT2 for alignment and the manual is full of parameters that got me confused.

I need to write down a command that would include the following:

map against hg19, my samples are paired-end, I need to have xs attributes to the output, and I need the output to be compatible with Stringtie for downstream analysis.

Have anyone worked on this pipeline before and can help me?

Thank you!

RNA-Seq alignment • 20k views
ADD COMMENT
0
Entering edit mode

For the --known-splicesite-infile, it was stated in the manual:

You can create such a list using python extract_splice_sites.py genes.gtf > splicesites.txt, where extract_splice_sites.py is included in the HISAT2 package, genes.gtf is a gene annotation file, and splicesites.txt is a list of splice sites with which you provide HISAT2 in this mode. Note that it is better to use indexes built using annotated transcripts (such as genome_tran or genome_snp_tran), which works better than using this option.

Is using genome_tran index would substitute the genome+ the annotation gtf file parameters in Tophat?

ADD REPLY
0
Entering edit mode

Yeah, if you want to download the prebuilt indices then just get genome_tran and call it done.

ADD REPLY
0
Entering edit mode

Thank you!!!

ADD REPLY
0
Entering edit mode

One more question, for alignment, what would you generally recommend STAR or HISAT2?

ADD REPLY
0
Entering edit mode

I generally prefer STAR, though it requires significantly more RAM.

ADD REPLY
7
Entering edit mode
8.8 years ago
hisat2 -x /path/to/hg19/indices -1 sample_1.fq.gz -2 sample_2.fq.gz | samtools view -Sbo sample.bam -

The resulting BAM file should work with stringTie or cufflinks. You probably want the --known-splicesite-infile option though.

Edit: You probably need to sort and index the BAM file. At least cufflinks would require that.

ADD COMMENT
1
Entering edit mode

Why can't use samtools sort to generate sorted bam file

hisat2 -x /path/to/hg19/indices -1 sample_1.fq.gz -2 sample_2.fq.gz | samtools sort -o sample.bam
ADD REPLY
0
Entering edit mode

Hi Devon, I work with dog genome. If I don't have premade indexes such as genome_tran or genome_snp_tran, should I go ahead to put my gtf file in the --known-splicesite-infile option or should I no using any gtf at all?

Thanks!

ADD REPLY
0
Entering edit mode

I think the GTF needs to be preprocessed first (there's a script for that that comes with hisat2), but aside from that yes.

ADD REPLY
0
Entering edit mode

Thanks for your suggestion! I will process it first with extract_splice_sites.py.

ADD REPLY
0
Entering edit mode

Hi Devon, could you tell me what is the meaning of the '-' symbol at the end of your samtools view command above (after 'sample.bam')? I am running a similar code without the '-', and sometimes it works fine but other times the program ends with a parsing error.. thanks!

ADD REPLY
1
Entering edit mode

- means "read from the pipe (|)" in this case. This is particular to samtools. If you're running samtools on a file then you would never use -.

ADD REPLY
0
Entering edit mode

hi Devon, what's the benefit of including --known-splicesite-infile option in the command line? if i'm only doing differential gene expression analysis, would using or omitting --known-splicesite-infile option make much difference?

ADD REPLY
1
Entering edit mode

You'll likely get slightly better alignments by using that and therefore slightly higher counts for DE testing.

ADD REPLY
0
Entering edit mode

thanks for the info! could you also comment on -k option, would you recommend using the default (5)? If there is other options I should use, I'd love to hear your thoughts on them. Thanks.

ADD REPLY
0
Entering edit mode

The defaults should be fine. The only other thing to change is the number of threads used.

ADD REPLY
0
Entering edit mode

How do I align paired end files , would it be the same command "-1 sample_1.fq.gz -2 sample_2.fq.gz" I have to give -1 and -2 ?

ADD REPLY

Login before adding your answer.

Traffic: 1596 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