isovic / racon

Ultrafast consensus module for raw de novo genome assembly of long uncorrected reads. http://genome.cshlp.org/content/early/2017/01/18/gr.214270.116 Note: This was the original repository which will no longer be officially maintained. Please use the new official repository here:
https://github.com/lbcb-sci/racon
MIT License
271 stars 49 forks source link

bam for consensus #46

Open jdmontenegro opened 6 years ago

jdmontenegro commented 6 years ago

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,

rvaser commented 6 years ago

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

claczny commented 5 years ago

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

rvaser commented 5 years ago

Hi Cedric, unfortunately no BAM support was added yet.

Best regards, Robert

claczny commented 5 years ago

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.

rvaser commented 5 years ago

Piping was removed since version 1.0.0.

claczny commented 5 years ago

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

sjackman commented 4 years ago

Either reading BAM or piping SAM from samtools view is useful to me.

rvaser commented 4 years ago

I'll try to add it in the next refactor.

sjackman commented 4 years ago

I also use GZIP compressed SAM a fair bit, but BAM would be sufficient.

rvaser commented 4 years ago

Gziped SAM files are supported, but without piping.

rvaser commented 4 years ago

Accidentally pushed the wrong button :D

sjackman commented 4 years ago

Gziped SAM files are supported, but without piping.

Good to know!

rvaser commented 4 years ago

All formats that Racon accepts can be gziped.

sjackman commented 4 years ago

Gzipped BAM file? 😈 (just kidding, please don't)

sjackman commented 4 years ago

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.