Show alternative alignments in bam or sam files
0
0
Entering edit mode
9.6 years ago
Crystal ▴ 70

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 • 2.3k views
ADD COMMENT
2
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
1
Entering edit mode
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.

ADD REPLY

Login before adding your answer.

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