Skip to content

ATACSeqQC.r: fails for single end sequences #1

@PollyTikhonova

Description

@PollyTikhonova

I've got a error in shiftGAlignmentsList(gal) :
is(gal, "GAlignmentsList") is not TRUE

As far as I understand, that's because readBamFile has a parameter asMates=FALSE and, at this case, readBamFile generates A GAlignments object but not A GAlignmentsList object.

So, this part of the code is invalid

# works only when the input is single end
if (opt$PE == 0) {
	# shift the BAM file - forward strand by +4 bp
	possibleTag <- c("AS", "XN", "XM", "XO", "XG", "NM", "MD", "YS", "YT")
	gal <- readBamFile(bamfile, asMates=FALSE, bigFile=TRUE)
	shiftedBamfile <- paste0(outdir, '/shifted.bam')
	gal1 <- shiftReads(gal)
	export(gal1, shiftedBamfile)
	cat(sprintf("\n *** shifted bam file ****  \n"))
}```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions