I'm using GViz to visualize RNASeq data using AlignmentsTrack. I have lots of reads that are spliced across two or more exons (this is long read RNASeq data). However, I am getting an error when providing a character vector of CIGAR values associated with the alignment.
"Error in .fillWithDefaults(DataFrame(chromosome = as.character(seqnames(range)), :
Number of elements in argument 'cigar' is invalid"
my BAM file contains the same number of lines as the cigar character vector so I am not sure what the issue is?
If i generate an AlignmentsTrack without the cigar character vector then I get a plot but it is not dealing with the spliced reads correctly. If i give a single CIGAR value as a character vector (e.g. "29=1X42=1X13=1X13=1X50=") then it functions better (some reads are correctly spliced in the plot) but some of the reads are still misplaced. Moreover, if the single CIGAR value contains a "D" then it does not splice any reads at all.
I am working with BAM files encoded in 1.4 but I have also tried legacy 1.3 without any success.
Any help would be hugely appreciated!