Hello,
I'm following the RNA-seq workflow for differential gene expression white paper by Michael Love, Simon Anders, and Wolfgang Huber (https://www.bioconductor.org/help/course-materials/2014/BioC2014/RNA-Seq-Analysis-Lab.pdf)
This is what I'm doing:
## Use the function summarizeOverlaps to count reads in the gene
library("GenomicAlignments")
se <- summarizeOverlaps(exonsByGene, BamFileList(bamFiles), mode="Union", singleEnd=TRUE, ignore.strand=FALSE, fragments=FALSE);
However I got this error and I have not idea how to fix it:
Error in .summarizeOverlaps_BamFileList(features, reads, mode, ignore.strand = ignore.strand, :
duplicate 'names(reads)' not allowed
Can someone help please!!
Here are all the previous step before trying to create the object se
### read the table: sampleTable.csv
sampleTable <- read.csv("sampleTable.csv", header=TRUE);
### build the full path to the tophat produced bam files
bamFiles <- file.path(".", sampleTable$dirName, sampleTable$fileName);
### see the created vector with paths
bamFiles
##### Use the BamFile function from the RsamTools to se if these paths are functional
library ("Rsamtools");
seqinfo(BamFile(bamFiles[1]));
#Counting reads in genes
library("GenomicFeatures");
hse <-makeTranscriptDbFromGFF("/proj/seq/data/TAIR10_Ensembl/Annotation/Genes/genes.gtf", format="gtf")
exonsByGene <- exonsBy(hse, by="gene");
## Use the function summarizeOverlaps to count reads in the gene
library("GenomicAlignments")
se <- summarizeOverlaps(exonsByGene, BamFileList(bamFiles), mode="Union", singleEnd=TRUE, ignore.strand=FALSE, fragments=FALSE);
It would seem that your BAM files have overlaps in the reads that they contain.
Also, your link is broken - you might wanna update your question with the corrected link.
it's discouraged to cross post on mulitple forum sites (Bioc support site, seqanswers, biostars), as it makes multiple people answer your question, and also makes it difficult to track down an answer which might have been given on another site.
One of the GenomicAlignments maintainers answered here: https://support.bioconductor.org/p/62966/