ccagc / QDNAseq

QDNAseq package for Bioconductor
47 stars 27 forks source link

BAM of single chromosome but plot() plots all chromosomes #54

Closed bibbers93 closed 6 years ago

bibbers93 commented 6 years ago

Hi, I have a bam file aligned and indexed just for chr17 (human hg38). I have RDS files for hg38 bins, and i'm just trying to plot the data but the function plot(readCounts, logTransform=FALSE, ylim=c(-2000, 10000)) includes chr1:22 in the output.

The introduction to QDNAseq manual uses LGG150 chr7-10, and only plots those chromosomes on the outputs. Can you advise on what I need to change/ turn off :)

thanks!

Ll.

daoud-sie commented 6 years ago

Hi Loyd,

The test data LGG150 also contains modified bin annotations, only including chr7 and chr10. The bin annotations in your data still contains all the chromosomes.

If you only want to plot chromosome 17, you can work with selections:

c17 <- chromosomes(readCounts) == 17
plot(readCounts[c17,])

I'm assuming this solves your problem, so closing the issue. Let me know otherwise.

Grtz,

Daoud

liuyang2006 commented 6 months ago

Follow up to above questions, if I want to zoom in to a gene region, is it possible to show a specific region? such as, chr11:8K - chr11:20k?