Skip to content

unexpected cigar string error #298

@Overcraft90

Description

@Overcraft90

Hi there, I'm working with three human genomes which I'm aligning to the CHM13 reference for then plotting the results with SyRi (v.1.6.3). For some reason, I'm persistently getting the following for both hap1 and hap2 of those three samples

Reading BAM/SAM file - ERROR - Incorrect CIGAR string found. CIGAR string can only have I/D/H/S/X/=. CIGAR STRING: 244022067S76871671N
Reading BAM/SAM file - ERROR - Incorrect CIGAR string found. CIGAR string can only have I/D/H/S/X/=. CIGAR STRING: 245130294S49682284N
Reading BAM/SAM file - ERROR - Incorrect CIGAR string found. CIGAR string can only have I/D/H/S/X/=. CIGAR STRING: 250382078S60062191N

This appears to be related to #180; however, as opposed to all issues concerning the use of --eqx when working with minimap2 I'm already doing so. Hence, I cannot pinpoint the cause of this issue... any help is greatly appreciated, thanks in advance!

for h in "${HAP[@]}"; do
	minimap2 -ax asm20 -t 192 --eqx path/to/CHM13_no-Y.fna.gz path/to/HG002v1.1.${h}.fasta.gz \
 	| samtools sort -@ 192 -O BAM - > path/to/${h}/CHM13_HG002-${h}.bam
	samtools index -@ 192 path/to/${h}/CHM13_HG002-${h}.bam
	minimap2 -ax asm20 -t 192 --eqx path/to/HG002v1.1.${h}.fasta.gz path/to/H9v0.1.${h}.fasta.gz \
 	| samtools sort -@ 192 -O BAM - > path/to/${h}/HG002_H9-${h}.bam
	samtools index -@ 192 path/to/${h}/HG002_H9-${h}.bam	
	minimap2 -ax asm20 -t 192 --eqx path/to/H9v0.1.${h}.fasta.gz path/to/RPE1v1.1.${h}.fasta.gz \
 	| samtools sort -@ 192 -O BAM - > path/to/${h}/H9_RPE1-${h}.bam
	samtools index -@ 192 path/to/${h}/H9_RPE1-${h}.bam
	
	source /hpc/apps/miniconda3/24.4.0/bin/activate syri_env
		syri -c path/to/${h}/CHM13_HG002-${h}.bam -r path/to/CHM13_no-Y.fna.gz -q path/to/HG002v1.1.${h}.fasta.gz -F B --dir path/to/${h} --prefix CHM13_HG002-${h}_ --nc 192  &
		syri -c path/to/${h}/HG002_H9-${h}.bam -r path/to/HG002v1.1.${h}.fasta.gz -q path/to/H9v0.1.${h}.fasta.gz -F B --dir path/to/${h} --prefix HG002_H9-${h}_ --nc 192  &
		syri -c path/to/${h}/H9_RPE1-${h}.bam -r path/to/H9v0.1.${h}.fasta.gz -q path/to/RPE1v1.1.${h}.fasta.gz -F B --dir path/to/${h} --prefix H9_RPE1-${h}_ --nc 192

		plotsr \
			--sr path/to/${h}/CHM13_HG002-${h}_syri.out \
			--sr path/to/${h}/HG002_H9-${h}_syri.out \
			--sr path/to/${h}/H9_RPE1-${h}_syri.out \
    			--genomes path/to/genomes_${h}.txt \
    			-S 0.75 \
    			-d 600 \
    			-o path/to/${h}/output_plot-v2.pdf
	conda deactivate
done

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions