[mira_talk] Re: MAF to SAM

  • From: "Peter Cock" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "p.j.a.cock" for DMARC)
  • To: "mira_talk@xxxxxxxxxxxxx" <mira_talk@xxxxxxxxxxxxx>
  • Date: Tue, 12 Apr 2016 14:14:31 +0100

On Tue, Apr 12, 2016 at 1:37 PM, - - <directioninformatique@xxxxxxxx> wrote:

Hi everybody

I tried to convert a MAF file to the SAM format with convert_project
command. (i join the MAF file)

What exactly did you do to the MAF file? How did you "join" it?

I got this error:

samtools view -Sb 15-0003-01_HLAGdest.sam
[samopen] SAM header is present: 1 sequences.
Line 10, sequence length 135 vs 136 from CIGAR
Parse error at line 10: CIGAR and sequence length are inconsistent

It might be useful to view that bit of the SAM file - the good news is
it it near the start, so you could use the "head" command line tool.

As some of you suggested last year (i had a similar problem), i tried the
maf2sam.py script, but i get another error:

python maf2sam.py ind4_HLAG.fasta ind4_HLAG_out.maf
@HD VN:1.4 SO:unsorted
@CO Converted from a MIRA Alignment Format (MAF) file
[maf2sam] NOTE: Producing SAM using a gapped reference sequence.
@SQ SN:HLAG_bb LN:11199 M5:215fcababd32fc2972e2146715b339ab
[maf2sam] Identified as MIRA v3.9 or later (MAF v2)
[maf2sam] WARNING - Support for this is *still* EXPERIMENTAL!
@RG ID:1 PL:ILLUMINA LB:ind4_HLAG SM:StrainX
@RG ID:2 PL:SYNTHETIC LB:ind4_HLAGref SM:ReferenceStrain
@RG ID:3 PL:SYNTHETIC SM:ReferenceStrain
[maf2sam] Identified 3 read groups
[maf2sam] Starting main pass though the MAF file
Traceback (most recent call last):
File "maf2sam.py", line 622, in <module>
"Gapped reference checksum mismatch for %s" % contig_name
AssertionError: Gapped reference checksum mismatch for HLAG_bb

RE: https://github.com/peterjc/maf2sam/blob/master/maf2sam.py

The error says the MD5 checksum of the sequence for HLAG_bb
in your FASTA file (ind4_HLAG.fasta) does not match the
sequence for this in the MAF file.

This suggests you are not using the correct FASTA file?

Can you try running my maf2fasta.py script to make a FASTA file
from the MAF (assuming I updated this for the MAF v2 format),
and then use that with maf2sam.py instead of ind4_HLAG.fasta?

Do you know what is the problem with this MAF file, do you have a solution
(my problem is not really this special case, but i need a reliable converter
because it is integrated in a pipeline which sometimes works on several
thousand of cases) ?

Thanks by advance

Philippe Gouret

Regards,

Peter

-- 
You have received this mail because you are subscribed to the mira_talk mailing 
list. For information on how to subscribe or unsubscribe, please visit 
http://www.chevreux.org/mira_mailinglists.html

Other related posts: