trying to read specific genomic regions from a bam file
0
0
Entering edit mode
4.4 years ago
alonziso ▴ 20

Hi, i am trying to get specific reads from my bam file using Rsamtool i've crated a specific param:

`geneslocation <- GRanges(seqnames = Totalgenes$Chrompos, ranges = IRanges(start = Totalgenes$Startpos, end = Totalgenes$Endpos))
paramstrail <- ScanBamParam(which = geneslocation, what = scanBamWhat())`

and while the 'geneslocation' is as i expected it to be

GRanges object with 1411 ranges and 0 metadata columns:
     seqnames              ranges strand
        <Rle>           <IRanges>  <Rle>
 [1]       5B   77385348-77559179      *
 [2]       7B 579177455-579197571      *
 [3]       5B 516627323-516631501      *
 [4]       5A     7227236-7233248      *
 [5]       5B   20721900-20730314      *

and so is the param data i created ('paramstrail') when i use the next line i get this error

Bamsequnces <- scanBam(bamtrail, param = paramstrail)
Error in value[[3L]](cond) : 'end' must be <= 536870912
file: E:/RNA Seq/IGV_files/sorted_Sample_F4_2.unique.bam
index: E:/RNA Seq/IGV_files/sorted_Sample_F4_2.unique.bam.ba

does anyone has any idea what am i doing wrong? thanks in advance, Alon

RNA-Seq rna-seq R software error • 800 views
ADD COMMENT
0
Entering edit mode

it sounds like you are trying to read coordinates past the chromosomal end (in paramstrail)

ADD REPLY

Login before adding your answer.

Traffic: 2048 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6