Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In valid.GenomicRanges.seqinfo #11

Open
minn333 opened this issue Oct 15, 2022 · 2 comments
Open

In valid.GenomicRanges.seqinfo #11

minn333 opened this issue Oct 15, 2022 · 2 comments

Comments

@minn333
Copy link

minn333 commented Oct 15, 2022

Dear:
Could you tell me how I correct the errors?

library(cn.mops)

BAMFiles <- list.files(pattern=".bam$")
bamDataRanges <- getReadCountsFromBAM(BAMFiles)

res <- cn.mops(bamDataRanges)

Warning message:
In valid.GenomicRanges.seqinfo(x, suggest.trim = TRUE) :
GRanges object contains 4 out-of-bound ranges located on sequences
chrM, chr18_gl000207_random, chrUn_gl000226, and chrUn_gl000229. Note
that ranges located on a sequence whose length is unknown (NA) or on a
circular sequence are not considered out-of-bound (use seqlengths() and
isCircular() to get the lengths and circularity flags of the underlying
sequences). You can use trim() to trim these ranges. See
?trim,GenomicRanges-method for more information.

Starting segmentation algorithm...
Using "fastseg" for segmentation.
Error in if (all(segMedianT == 0)) { :
missing value where TRUE/FALSE needed
Calls: cn.mops -> apply -> FUN
In addition: Warning messages:
1: In valid.GenomicRanges.seqinfo(x, suggest.trim = TRUE) :
GRanges object contains 4 out-of-bound ranges located on sequences
chrM, chr18_gl000207_random, chrUn_gl000226, and chrUn_gl000229. Note
that ranges located on a sequence whose length is unknown (NA) or on a
circular sequence are not considered out-of-bound (use seqlengths() and
isCircular() to get the lengths and circularity flags of the underlying
sequences). You can use trim() to trim these ranges. See
?trim,GenomicRanges-method for more information.
2: In normalizeChromosomes(X, chr = chr, normType = normType, qu = normQu, :
Normalization for reference sequence chrM not applicable, because of low number of segments
3: In normalizeChromosomes(X, chr = chr, normType = normType, qu = normQu, :
Normalization for reference sequence chr9_gl000200_random not applicable, because of low number of segments
4: In normalizeChromosomes(X, chr = chr, normType = normType, qu = normQu, :
Normalization for reference sequence chr18_gl000207_random not applicable, because of low number of segments
5: In normalizeChromosomes(X, chr = chr, normType = normType, qu = normQu, :
Normalization for reference sequence chrUn_gl000226 not applicable, because of low number of segments
6: In normalizeChromosomes(X, chr = chr, normType = normType, qu = normQu, :
Normalization for reference sequence chrUn_gl000229 not applicable, because of low number of segments
Execution halted

@vjcitn
Copy link

vjcitn commented Oct 15, 2022

Thanks for your note. Without access to your bam files it is not really possible to give detailed help. However, I did note that the proposed code fails when applied to the example data noted on the README of this repo. I did get success when I added segAlgorithm='DNAcopy' to the cn.mops call.

@minn333
Copy link
Author

minn333 commented Oct 15, 2022

Hello, I had set refSeqNames to omit the 4 out-of-bound ranges located on sequences
chrM, chr18_gl000207_random, chrUn_gl000226, and chrUn_gl000229. Maybe make sense!

Thanks for your reply!

bamDataRanges <- getReadCountsFromBAM(BAMFiles, refSeqNames=c("chr1","chr2","chr3","chr4","chr5","chr6","chr7","chr8","chr9","chr10","chr11","chr12","chr13","chr14","chr15","chr16","chr17","chr18","chr19","chr20","chr21","chr22","chrX","chrY"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants