I am a bit doubtful about what you are doing or wanted to do is correct. Please refer to some good reference articles or ask someone in your group who could understand the actual problem.
Since you used HISAT2, I am assuming you are analyzing RNA-seq reads. If you are trying to assemble transcripts from your BAM file, you should use something like StringTie.
Alex Zaccaron Yes i am analyzing RNAseq reads. i don't want to assemble transcripts. I want to obtain contig sequence or consensus sequence form aligned BAM file sing a tool on galaxy server. can you recommend me ?