Question: Is samtools' compression of bam to cram lossless?
1
gravatar for bjarki.sigurjons
3 days ago by
bjarki.sigurjons10 wrote:

One can use CRAMtools to convert(compress) bam into cram. CRAMtools has options to allow for lossy and non-lossy compression (--lossless-quality-score and --lossy-quality-score-spec).

Samtools is also capable of compressing bam into CRAM but with limited parameteres, one just specifies the output to be cram (using option -C). So my question is, do you know if the samtools' compression of bam into cram is lossy or lossless?

Thx

cram samtools • 101 views
ADD COMMENTlink modified 3 days ago by Devon Ryan64k • written 3 days ago by bjarki.sigurjons10
2

My guess is that it will be 'lossless'. If it were lossy, it must have been documented. You can easily check it by yourself. Get a sam -> convert to bam -> cram -> sam. Then compare this sam with original sam.

ADD REPLYlink written 3 days ago by Santosh Anand1.5k
1
gravatar for Devon Ryan
3 days ago by
Devon Ryan64k
Freiburg, Germany
Devon Ryan64k wrote:

To my knowledge (there's basically no documentation that I've seen), the only way to get a lossy behaviour is by specifying --output-fmt-option lossy_names. You can do something with the auxiliary tags too I think (the required_tags option), but I've never looked into how that actually works.

ADD COMMENTlink written 3 days ago by Devon Ryan64k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1457 users visited in the last hour