There are some issues when running ATACseqQC.
- In out-pdf functions such as fragSizeDist, PTscore, only when I exit R session can I get non-empty pdf document, and if I don't exit R, the out-pdf is always empty, so that run a function, I have to go into R, and then exit to get the target file. Is this the way it was done? Or there other way to get out files?
- When running splitGAlignmentsByCut function, I got an error.
library(ATACseqQC) library(GenomicRanges) bamfile <- '/simm/huangyulab/liufei/Owl/seq_data/ATACseq/GYP1.sort.clean.bam' tags <- c("AS", "XN", "XM", "XO", "XG", "NM", "MD", "YS", "YT") gal1 <- readBamFile(bamFile=bamfile, tag=tags,which=GRanges("chr1", IRanges(1, 1e6)),asMates=FALSE) This is a big BAM file. Do you want to set bigFile=TRUE to save memory? (Y/n)? y names(gal1) <- mcols(gal1)$qname library(BSgenome.Hsapiens.UCSC.hg19) library(TxDb.Hsapiens.UCSC.hg19.knownGene) txs <- transcripts(TxDb.Hsapiens.UCSC.hg19.knownGene) library(phastCons100way.UCSC.hg19) objs <- splitGAlignmentsByCut(gal1,txs=txs,genome=genome,outPath='/simm/huangyulab/liufei/Owl/seq_data/ATACseq/GYP1.splitbam/',conservation=phastCons100way.UCSC.hg19)
Error in splitGAlignmentsByCut(gal1, txs = txs, genome = genome, outPath = "/simm/huangyulab/liufei/Owl/seq_data/ATACseq/GYP1.splitbam/", :
length(names(obj)) == length(obj) is not TRUE
and then try splitBam
> objs <- splitBam(bamfile, tags=tags, outPath='/simm/huangyulab/liufei/Owl/seq_data/ATACseq/RESULT/GYP1.splitBam/',txs=txs,genome=genome,conservation=phastCons100way.UCSC.hg19)
Error in splitBam(bamfile, tags = tags, outPath = "/simm/huangyulab/liufei/Owl/seq_data/ATACseq/RESULT/GYP1.splitBam/", : is(genome, "BSgenome") is not TRUE
then I set :
genome <- BSgenome.Hsapiens.UCSC.hg19
try again :
> objs <- splitBam(bamfile, tags=tags, outPath='/simm/huangyulab/liufei/Owl/seq_data/ATACseq/RESULT/GYP1.splitBam/',txs=txs,genome=genome,conservation=phastCons100way.UCSC.hg19)
error :
[E::sam_parse1] unrecognized type N
[W::sam_read1] Parse error at line2780
[E::sam_parse1] unrecognized type N
[W::sam_read1] Parse error at line 2780
[E::sam_parse1] unrecognized type N
[W::sam_read1] Parse error at line 2780
[E::sam_parse1] unrecognized type N
[W::sam_read1] Parse error at line 2780
[E::sam_parse1] unrecognized type N
[W::sam_read1] Parse error at line 2780
[E::sam_parse1] unrecognized type N
[W::sam_read1] Parse error at line 2780
[E::sam_parse1] unrecognized type N
[W::sam_read1] Parse error at line 2780
[E::sam_parse1] unrecognized type N
[W::sam_read1] Parse error at line 2780
Error in shiftGAlignmentsList(chunk0, positive = positive,
negative = negative) : all(elementNROWS(gal) < 3) is not TRUE
What does that mean and how to deal with the error when running splitGAlignmentsByCut and splitBam?
Thanks for your reply.
The command pdf(file=xxx.pdf .....) not work, although that produce a new pdf, it can not open to watch.
I tried the example code successfully, and to I downloaded the SRR891280 https://trace.ncbi.nlm.nih.gov/Traces/sra/?run=SRR891280 and tried again, but also got the same error. My reference is hg38.
Here are my steps to deal with it