Weeks-UNC / shapemapper2

Public repository for ShapeMapper 2 releases
Other
29 stars 16 forks source link

Mutation_parser #23

Closed yx04 closed 3 years ago

yx04 commented 3 years ago

Hello,

I am manually running shapemapper2 modules for a genome-wide study. I first ran STAR by myself using the following command: STAR --readFilesIn $in_R1 $in_R2 --readFilesCommand zcat --genomeDir $index --outFileNamePrefix $out_prefix --runThreadN $SLURM_NTASKS --outSAMtype SAM --outSAMattributes MD --outBAMsortingThreadN $SLURM_NTASKS --outSAMunmapped Within --quantMode TranscriptomeSAM GeneCounts --alignEndsType Local --outFilterMismatchNmax 999 --outFilterMismatchNoverLmax 999 --outFilterMultimapNmax 10 --scoreGap -1000000 --scoreDelBase -1 --scoreInsBase -1 --outMultimapperOrder Random --outSAMmultNmax 1

Then I used the output SAM file as an input for shapemapper-2.1.5/internals/bin/shapemapper_mutation_parser, and ran into this error: Error: CIGAR string incorrectly formatted

I suspect the SAM file is somewhat not matching the correct input format. Here is an example of my SAM file (I am pasting one line here): A00201R:425:HFMMJDRXY:1:2101:1316:1016 99 3 14200840 3 151M = 14201323 633 <a read in 151 nt length> FFFFFFFFFFFFFFFFFFFFFFFFFFFF::,FFFFFFFF:FFFFF:F:FFFFFFF,FFFFFFFFF:FFFFFFFFFFFFFFFFFFFFFFF:FFFFFF::FFFF,FFFFFFF,FFFF:,FFFFF:F,FFFFFF,F,FFFFFFFFFFFF:,FF: MD:Z:55T95

I wonder what could be the problem?

Thanks very much in advance!

ktong25 commented 3 years ago

Dear authors of shapemapper2,

I am also encountering a similar error the other day and was not able to resolve it. Any suggestions would be much appreciated! Also, thanks for offering this great package!

shapemapper commented 3 years ago

I believe this error is a result of using the --outSAMunmapped option. This results in unmapped reads in the SAM file with a single asterisk character * in the CIGAR string field. Shapemapper's mutation parser is not set up to filter/skip unmapped reads.

yx04 commented 3 years ago

That solved my question. Thank you very much, Steven!