Can we use CRAM files for Telomerecat?
0
0
Entering edit mode
4.1 years ago

Hi friends,

I am trying to use a tool called Telomerecat for estimating telomere length.

The tool takes BAM file as input.

I would like to use CRAM file as input instead of BAM files.

Anyone has tried it in the past using CRAM files? Because the bam files are ~ 100gb each. If I process 100-1000 storage is the issue.

I tried this command,

samtools view -T reference.fasta sample.cram -b -h | Telomerecat bam2length - —output telomere_length.csv

This give me error.

whole genome sequence • 1.1k views
ADD COMMENT
1
Entering edit mode

A few points:

  1. Are you passing the BAM file as input to the samtools command? If so, your command above does not reflect that. Please give us the exact command you're running.
  2. Please avoid using SMS/IM jargon like "bcos" - that takes away from the professional nature of the discussion. I've edited it to the proper form of the word.
  3. Please use the formatting bar (especially the code option) to present your post better. You can use backticks for inline code (`text` becomes text), or select a chunk of text and use the highlighted button to format it as a code block. I've done it for you this time.
    code_formatting
ADD REPLY
0
Entering edit mode

Sorry for the mistake. I have updated the command with sample.cram. I am using CRAM file as input instead of BAM. While converting CRAM2BAM, each BAM file is -100gb. That’s why I am not saving the intermediate BAM files. But the tool mainly uses BAM as input.

https://github.com/cancerit/telomerecat

ADD REPLY
0
Entering edit mode

CRAM file format is different than BAM so if the tool is not designed to take CRAM then the answer would be no.

BAM (for Binary Alignment Map) is a lossless compression while CRAM can range from lossless to lossy depending on how much compression you want to achieve (up to very much indeed). BAMs and CRAMs hold the same information as their SAM equivalent, structured in the same way; what is different between them is how the files themselves are encoded.

ADD REPLY
0
Entering edit mode

OP is converting CRAM to BAM and piping it to the tool, so the tool's file type limitations should not be a problem as long as the tool can work with streaming input. And any command line tool that needs a BAM file should ideally work on streaming input.

ADD REPLY
0
Entering edit mode

Indeed. I was specifically addressing this part of the original question

The tool takes BAM file as input.

I would like to use CRAM file as input instead of BAM files.

ADD REPLY
0
Entering edit mode

I see. OP should have clarified that they only have CRAM files and are trying to convert them to BAM on the fly. bioinforesearchquestions - please take note. You mention in your comment that you're converting CRAM to BAM on the fly ("without saving the intermediate file"), but this should have been made clear in the original post.

ADD REPLY

Login before adding your answer.

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