[mira_talk] Re: Parse error at line 84: unmatched CIGAR operation

  • From: Peter Cock <p.j.a.cock@xxxxxxxxxxxxxx>
  • To: mira_talk@xxxxxxxxxxxxx
  • Date: Wed, 27 Mar 2013 19:31:08 +0000

On Wed, Mar 27, 2013 at 7:18 PM, John Nash <john.he.nash@xxxxxxxxx> wrote:
> Good afternoon,
>
> I need to do some samtools mpileups and I have been trying to generate BAM
> files from mira's output without success.
>
> The data are from mapping assemblies using various versions of the 3.9.x
> series of mira.
>
> A.  If I use convert_project to generate a sam file from a maf file, all
> goes well, and I can view the assembly in Tablet. However, either doing:
>
> $ samtools view -bS STRAIN.sam > STRAIN.bam
>
> or, after generating an index from the STRAIN_unpadded.fasta file using
> samtools faidx:
>
> $ samtools view -bt STRAIN_unpadded.fasta.fai STRAIN.sam > STRAIN.bam
>
> generates a Parse error at line 84: unmatched CIGAR operation

What is line 84 of the file?

Are you (accidentally) using a padded SAM with an unpadded FASTA?
If so, first you need to run 'samtools depad' to get a more traditional
SAM file using an unpadded reference. This should be in the latest
samtools 0.1.19 release (and can do SAM to BAM at the same time).

> B.  Peter Cock's maf2sam.py (version 2.0) hangs when I try to convert the
> maf file to a sam file.

I never updated it to cope with the MAF from MIRA v3.9.x, but
if you fancy sharing the data I can have a look at make it at least
give a clear error. There seemed little point as MIRA v3.9.x has
native SAM output.

> C.  Before I had heard of maf2sam.py or before convert_project's ability to
> generate sam files, I used to make sam files by filtering caf files through
> gap5, i.e.
>
> $ tg_index-o STRAIN_gap5db STRAIN.caf
> $ gap5_export -format sam -out STRAIN.sam STRAIN_gap5db.g5
> $ samtools view -bS STRAIN.sam STRAIN.bam
>
> With these recent assemblies, I get the same error.

Again, what is the problem SAM line itself.

> D.  picard-tools SamFormatConverter crashes.
>
> I have tried it with at least 3 different reference assemblies.
>
> Could somebody please advise me?
>
> Thanks
> John

Did that help?

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: