Help with summarizeOverlaps function in RNASeq analysis using R
1
0
Entering edit mode
8 months ago
FJCF • 0

Hi,

I am a new bioinformatics MSc student and I need help with the summarizeOverlaps function from the GenomicAlignments R package in order to perform a RNASeq analysis. I keep getting this error:

Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x),  : 
  'data' must be of a vector type, was 'NULL'*.

Could someone help me to find where the problem is and how to fix it?

pacman::p_load(Rsamtools, GenomicFeatures, GenomicAlignments, org.Mm.eg.db)

gtfFile <- "genes.gtf"
txdb <- makeTxDbFromGFF(gtfFile, format = "gtf", organism = "Mus musculus")
genes <- exonsBy(txdb, by = "gene")
files <- list.files("/BAM", pattern = ".bam")
bamLst <- BamFileList(files, index=character(), obeyQname = TRUE)

PRJNA838600 <- summarizeOverlaps(features = genes,
                                 read = bamLst,
                                 mode = "Union",
                                 singleEnd = FALSE,
                                 ignore.strand = TRUE,
                                 fragments = FALSE)

save(PRJNA838600, file = "PRJNA838600.rda")
R RNA-Seq summarizeOverlaps GenomicAlignments • 984 views
ADD COMMENT
0
Entering edit mode

1) Which line of code produces the error?

2) Can you check the contents of your objects and post the results here?

head(c(txdb, genes, files, bamLst))
ADD REPLY
0
Entering edit mode

Why did you delete the post?

ADD REPLY
0
Entering edit mode

me? what post?

ADD REPLY
0
Entering edit mode

That comment from @Ram was directed at original poster. They probably had deleted this post after having received comment/answer.

ADD REPLY
0
Entering edit mode

"Thumbs up"

ADD REPLY
0
Entering edit mode
8 months ago
Soheil ▴ 110

I'm guessing you are trying to get the gene expression counts from your BAM files. In this case, I suggest using featureCounts from the subread toolkit to quantify gene expression from BAM files generated with STAR (ideally the reads should be QC'ed/Trimmed). This is pretty much the community standard to process raw RNAseq fastq files.

ADD COMMENT
0
Entering edit mode

The summarizeOverlaps count modes are fashioned after the "Union", "IntersectionStrict", and "IntersectionNotEmpty" methods found in HTSeq

ADD REPLY

Login before adding your answer.

Traffic: 2572 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