Entering edit mode
4.1 years ago
bioinforesearchquestions
▴
370
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.
A few points:
code
option) to present your post better. You can use backticks for inline code (`text` becomestext
), 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.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
CRAM file format is different than BAM so if the tool is not designed to take CRAM then the answer would be no.
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.
Indeed. I was specifically addressing this part of the original question
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.