racon
racon copied to clipboard
bam for consensus
Hi,
Does racon accepts bam files instead of sam files for the consensus calculation or do we need convert bam to sam in order to use it?
Cheers,
Hello, sorry for the late response! Unfortunately, Racon only accepts SAM as alignment input. We will add BAM support in the new release.
Best regards, Robert
Hi,
thank you for the nice software! I understand that one of the focal points currently appears to be in accelerating racon using the GPU 👍
Nevertheless, I was wondering whether there has been any progress made on the BAM support already? I could not find anything related in the Changelogs of the Releases, so I am keeping my hopes low ;)
Best,
Cedric
Hi Cedric, unfortunately no BAM support was added yet.
Best regards, Robert
I see and thanks for the quick reply!
Unfortunately, piping in the SAM file (as in https://github.com/isovic/racon/issues/9#issuecomment-275067339) appears to not be a solution either, as I get
[racon::createPolisher] error: file - has unsupported format extension (valid extensions: .mhap, .mhap.gz, .paf, .paf.gz, .sam, .sam.gz)!
I tried piping (samtools view -h alignment.bam draft.fna | racon reads.fastq - draft.fna
) as well as process substitution (racon reads.fastq <(samtools view -h alignment.bam) draft.fna
), both yielding the above error.
Piping was removed since version 1.0.0
.
That is good to know, albeit a bit sad :) I'll then just create a temporary SAM file from the BAM file. Should be fine too ;)
Thanks a lot!
Best,
Cedric
Either reading BAM or piping SAM from samtools view
is useful to me.
I'll try to add it in the next refactor.
I also use GZIP compressed SAM a fair bit, but BAM would be sufficient.
Gziped SAM files are supported, but without piping.
Accidentally pushed the wrong button :D
Gziped SAM files are supported, but without piping.
Good to know!
All formats that Racon accepts can be gziped.
Gzipped BAM file? 😈 (just kidding, please don't)
Actually a little-known fact that I've actually found really useful is that a BAM file is a gzip file. You can gunzip -c
a BAM file to get an uncompressed BAM file. gunzip -c alignments.bam | samtools view
works as expected.