Hi I have a GAlignments Object from scanning 1000-1100 of chromosome x of a bam file
GAlignments object with 46 alignments and 5 metadata columns:
seqnames strand cigar qwidth start end width njunc | rname
<Rle> <Rle> <character> <integer> <integer> <integer> <integer> <integer> | <factor>
[1] seq1 + 35M 35 970 1004 35 0 | seq1
[2] seq1 + 35M 35 971 1005 35 0 | seq1
Running coverage() on the object I get an RleList that looks something like this
RleList of length 2
$seq1
integer-Rle of length 1575 with 52 runs
Lengths: 969 1 1 1 1 1 1 5 1 1 1 ... 1 1 1 1 2 1 1 3 1 531
Values : 0 1 2 3 4 5 6 7 10 12 14 ... 15 12 11 10 8 7 5 4 2 0
$seq2
integer-Rle of length 1584 with 1 run
Lengths: 1584
Values : 0
I want to graph the coverage data (of the chunk I scanned) with ggbio or ggplot2 but I'm not sure exactly what the coverage result represents. Is there a way to get a graph with chromosome location I've scanned on the x axis and read coverage on the y with this? Or are the results usually graphed a different way?
Thanks
Hi,
It looks like the coercion methods (to GRanges or GRangeList) choke on some of the metadata columns of your GAlignments object. Try to remove them first with:
or coerce to GRanges or GRangesList with:
Hope this will help,
H.