i have strand-specific(dUTP) RNAseq reads, and i count it use GenomicAlignments::summarizeOverlaps() with the paramters below:
flag <- scanBamFlag(isSecondaryAlignment = FALSE, isNotPassingQualityControls = FALSE, isUnmappedQuery = FALSE) sbp <- ScanBamParam(flag=flag, mapqFilter = 255)
geneCnt <- summarizeOverlaps(features = ebg, mode = "Union", reads = SE1bamlist, ignore.strand = FALSE, inter.feature = FALSE, singleEnd = TRUE, strandMode = 2, param = sbp, preprocess.reads = NULL)
but i got an error: Error in FUN(bf, param = param, ...) : unused argument (strandMode = 2) Calls: summarizeOverlaps ... tryCatch -> tryCatchList -> tryCatchOne -> <anonymous>
so, can someone tell me how to set strand-specific parameters?
thank you!
To add to Robert's answer, the
strandMode
argument isn't actually an argument tosummarizeOverlaps
, but instead is an argument forreadGAlignmentPairs
, which is the underlying function that reads in the data, and is passed in via the ellipsis...
argument.There isn't a
strandMode
argument forreadAlignments
, which is the function that is called when you specifysingleEnd = TRUE
, because it doesn't make sense in that context. From ?strandMode:If you have single-end data, there is no need to infer the strand, because the strand is obvious, given the strand that the read aligns to.
Thanks for your reply, but I still confused that whether strand-specific SINGLE-END reads can be counted like PAIRED reads by GenomicAlignments? There is no limitation of library layout(SINGLE/PAIRED) in Rsubread.
in ?strandMode: These modes are equivalent to strandSpecific equal 0, 1, and 2, respectively, for the featureCounts function defined in the Rsubread package.
in ?Rsubread: Indicate if strand-specific read counting should be performed. A single integer value (applied to all input files) or a string of comma-separated values (applied to each corresponding input file) should be provided. Possible values include: 0 (unstranded), 1 (stranded) and 2 (reversely stranded). Default value is 0 (ie. unstranded read counting carried out for all input files). For paired-end reads, strand of the first read is taken as the strand of the whole fragment. FLAG field is used to tell if a read is first or second read in a pair. Value of isStrandSpecific parameter in Rsubread featureCounts is a vector which has a length of either 1, or the same with the total number of input files provided.
PS: my BiocManager version "1.30.10"
Thank you!