failed to convert from cram to bam
1
0
Entering edit mode
7.4 years ago
kygppyou • 0

I got a cram file, and want to convert it to bam file. Here's the command I use and error I got

samtools view -b -T human_g1k_v37.fasta lucky.cram > lucky.bam
[sam_header_read2] 84 sequences loaded.
[sam_read1] reference 'Wm�;�����e��i���f�[�=���~��Ç߼���U��/���>���Q���O����n����O��' is recognized as '*'.
Parse error at line 1: invalid CIGAR character

I don't know what to do with this. Please help~

cram bam • 4.9k views
ADD COMMENT
0
Entering edit mode
ADD REPLY
0
Entering edit mode

Is cram-tools even still supported?

ADD REPLY
0
Entering edit mode

This suggests that there's a mismatch between the fasta file and what the CRAM file was created with. I'd double check that before proceeding.

ADD REPLY
2
Entering edit mode
7.4 years ago

You are using a prehistoric version of samtools, one that predates the CRAM format by several years, so of course it has no support for CRAM files. (The error messages shown indicate that it is attempting to parse the input as a SAM file, and failing miserably.)

You need at least samtools 1.0 to read CRAM files, and many CRAM-related improvements were made in 1.2. Of course, what you really want to install is the most up-to-date version of samtools, which is 1.3.1 at the time of writing.

ADD COMMENT

Login before adding your answer.

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