This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Gsnap Error Core Dumps Each Time Before Piping Sam Output To Samtools

Hi everyone (who has used the GSNAP tool for short read alignments),

This is my GSNAP command line:

gsnap -d <genome_file> --gunzip --batch=5 --nthreads=2 --distant-splice-penalty=10000 --clip-overlap -s <splice_file> -N 1 --npaths=100 -Q -v <snp_file> --read-group-id=sample1 --read-group-name=sample1 --read-group-library=sample1 --read-group-platform='Illumina' --format=sam sample1_R1.fastq.gz sample1_R2.fastq.gz  2> sample1.out | samtools view -bS - > sample1.bam

Each time I run this, I get the following errors:

Parse error at line 552039: invalid CIGAR character

sh: line 1: 40402 Broken pipe             gsnap -d hg19_gmap --gunzip --batch=5 --nthreads=2 --distant-splice-penalty=10000 --clip-overlap -s Homo_sapiens.GRCh37.72.splicesites.iit -N 1 --npaths=100 -Q -v snp137Common --read-group-id=sample1 --read-group-name=sample1 --read-group-library=sample1 --read-group-platform='Illumina' --format=sam sample1_R1.fastq.gz sample1_R2.fastq.gz 2> sample1.out

40403 Aborted                 (core dumped) | samtools view -bS - > C01418.bam

Can't figure out what the problem is, Any suggetions?

samtools

1 answer

Write the output to a SAM file first and then look at line 552039 to find out what's wrong with its CIGAR string.

Log in to answer this question.