Skip to content

NSBS object error when trying to filter by overlap GRanges object from read_bam() #102

Open
@mce13

Description

@mce13

Hi there,

I seem to be unable to perform filtering by overlap on a GRanges object that has been imported from a bam-file via read_bam().

I can run the example code here with no problems.

With my own bam-file, however, and also a miniature version thereof, I get the following error:

roi <- 	data.frame(seqnames = "chrI", start = 4200, end = 4800) %>%
		as_granges()

rng <- 	read_bam(file = "test.bam",
		index =	"test.bam.bai",
		paired  =	TRUE) %>%
	select(mapq) %>%
	filter_by_overlaps(roi)
		
print(rng)

Error: subscript is a NSBS object that is incompatible with the current
  subsetting operation
Execution halted

The join_overlap functions give me the same error.

The bam-file is paired end. It has been generated by mapping public data (SRX372005) against SacCer3 using bowtie2 with the default settings. test.bam was generated using samools view and indexed using samtools index. I'm happy to upload/email these files but it seems that bam-files are not supported.

Any idea what the problem could be here?

Many thanks in advance,

mce13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions