This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Show alternative alignments in bam or sam files

Hi All,

I want to check if there are alternative alignments in my results via BWA alignment.

I have both bam and sam files, but I don't want to download the complete sam files to my computer.

I know there is a way to just view the results with alternative alignments.

Should I use samtools or should I create a vcd file to view the alternatives?

Can I just use

vcftools view -A input.file > output.file

Any ideas?

Thanks

alignment

You can extract alternative (non-primary) alignments from the bam file using: samtools view -f 100 input.bam

Thank you.

I did samtools view -f input.bam > output. It seems the output is a txt file. It provides information, but I'm confused with the format. So I'm wondering if I can get the output as a bam or sam file and then I can convert it to a readable txt file.

samtools view -f 100 -h > Output.sam

for the sam format with the header OR

samtools view -f 100 -bh -o Output.bam

for the bam file.

0 answers

No answers yet.

Log in to answer this question.