Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mce13 opened this issue Apr 2, 2023 · 0 comments

Comments

@mce13
Copy link

mce13 commented Apr 2, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant