This is a test version of Biostars. For the public version, visit https://www.biostars.org.
trying to read specific genomic regions from a bam file

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

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

0 answers

No answers yet.

Log in to answer this question.