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

hello,I don't know how to deal with it,can you help me figure it out. thanks #34

Open
Rachel12138 opened this issue Sep 13, 2023 · 8 comments

Comments

@Rachel12138
Copy link

library(ChIPseeker)
library(ChIPpeakAnno)
setwd("F:/atac/narrowpeak")
list.files('F:/atac/narrowpeak',".narrowPeak")
tmp = lapply(list.files('F:/atac/narrowpeak',"
.narrowPeak"), function(x){
return(readPeakFile(file.path('F:/atac/narrowpeak', x)))
})
tmp
[[1]]
GRanges object with 139237 ranges and 7 metadata columns:
seqnames ranges strand | V4 V5 V6 V7 V8 V9 V10
|
[1] chr1 135821-136120 * | 1_peak_1 25 . 3.40463 4.85833 2.58011 84
[2] chr1 137973-139817 * | 1_peak_2a 157 . 7.94413 19.27968 15.71903 384
[3] chr1 137973-139817 * | 1_peak_2b 188 . 8.79529 22.50781 18.89067 1158
[4] chr1 140946-141278 * | 1_peak_3 42 . 4.25578 7.10628 4.23111 191
[5] chr1 143264-143660 * | 1_peak_4 42 . 4.25578 7.10628 4.23111 280
... ... ... ... . ... ... ... ... ... ... ...
[139233] chrX 138957140-138957339 * | 1_peak_127003 36 . 3.97207 6.32712 3.63172 98
[139234] chrX 138975416-138975873 * | 1_peak_127004 36 . 3.97207 6.32712 3.63172 130
[139235] chrX 138992372-138992803 * | 1_peak_127005 21 . 3.12091 4.17304 2.11568 273
[139236] chrX 138998481-138998715 * | 1_peak_127006 30 . 3.68835 5.57713 3.08387 125
[139237] chrX 139004630-139005065 * | 1_peak_127007 21 . 3.12091 4.17304 2.11568 154

seqinfo: 687 sequences from an unspecified genome; no seqlengths

[[2]]
GRanges object with 137755 ranges and 7 metadata columns:
seqnames ranges strand | V4 V5 V6 V7 V8 V9 V10
|
[1] chr1 138181-138448 * | 2_peak_1 33 . 4.19834 5.93764 3.37236 109
[2] chr1 139027-139671 * | 2_peak_2 71 . 6.10668 10.62839 7.16524 143
[3] chr1 142613-142812 * | 2_peak_3 22 . 3.43501 4.30215 2.20563 80
[4] chr1 143008-145741 * | 2_peak_4a 80 . 6.48835 11.65180 8.09798 219
[5] chr1 143008-145741 * | 2_peak_4b 144 . 8.77836 18.26648 14.46424 503
... ... ... ... . ... ... ... ... ... ... ...
[137751] chrX 138928118-138928380 * | 2_peak_124867 40 . 4.58001 6.81229 4.02146 149
[137752] chrX 138962022-138962357 * | 2_peak_124868 33 . 4.19834 5.93764 3.37236 103
[137753] chrX 138971639-138971838 * | 2_peak_124869 40 . 4.58001 6.81229 4.02146 86
[137754] chrX 138992405-138992997 * | 2_peak_124870 33 . 4.19834 5.93764 3.37236 192
[137755] chrX 139006685-139006884 * | 2_peak_124871 22 . 3.43501 4.30215 2.20563 122

seqinfo: 640 sequences from an unspecified genome; no seqlengths

[[3]]
GRanges object with 211102 ranges and 7 metadata columns:
seqnames ranges strand | V4 V5 V6 V7 V8 V9 V10
|
[1] chr1 136058-136257 * | 3_peak_1 48 . 4.76810 7.40445 4.83368 104
[2] chr1 137932-141148 * | 3_peak_2a 89 . 6.60198 12.24618 8.94679 370
[3] chr1 137932-141148 * | 3_peak_2b 141 . 8.43586 17.67540 14.10315 589
[4] chr1 137932-141148 * | 3_peak_2c 80 . 6.23520 11.22568 8.03155 1144
[5] chr1 137932-141148 * | 3_peak_2d 41 . 4.40132 6.52308 4.13515 2657
... ... ... ... . ... ... ... ... ... ... ...
[211098] chrX 138997833-138998134 * | 3_peak_174522 17 . 2.93421 3.36781 1.72653 152
[211099] chrX 138998257-138998780 * | 3_peak_174523 34 . 4.03454 5.67568 3.47359 187
[211100] chrX 139004391-139005190 * | 3_peak_174524 34 . 4.03454 5.67568 3.47359 121
[211101] chrX 139006713-139007225 * | 3_peak_174525a 41 . 4.40132 6.52308 4.13515 114
[211102] chrX 139006713-139007225 * | 3_peak_174525b 41 . 4.40132 6.52308 4.13515 410

seqinfo: 686 sequences from an unspecified genome; no seqlengths
ol <- findOverlapsOfPeaks(tmp[[1]],tmp[[2]],tmp[[3]])

Error in FUN(X[[i]], ...) : Inputs contains duplicated ranges.
please recheck your inputs.

@jianhong
Copy link
Owner

try to remove the duplicated ranges from your inputs. You may want to try

tmp_rd <- lapply(tmp, reduce)
ol <- findOverlapsOfPeaks(tmp_rd)

@Rachel12138
Copy link
Author

try to remove the duplicated ranges from your inputs. You may want to try

tmp_rd <- lapply(tmp, reduce)
ol <- findOverlapsOfPeaks(tmp_rd)

sorry,it has another error

tmp_rd <- lapply(tmp, reduce)
ol <- findOverlapsOfPeaks(tmp_rd)

Error in findOverlapsOfPeaks(tmp_rd) :
The length of input peaks list should no more than 5

@jianhong
Copy link
Owner

try

tmp_rd <- lapply(tmp, reduce)
ol <- do.call(findOverlapsOfPeaks, tmp_rd)

or

tmp_rd <- lapply(tmp, reduce)
ol <- findOverlapsOfPeaks(tmp_rd[[1]], tmp_rd[[2]], tmp_rd[[3]])

@Rachel12138
Copy link
Author

try

tmp_rd <- lapply(tmp, reduce)
ol <- do.call(findOverlapsOfPeaks, tmp_rd)

or

tmp_rd <- lapply(tmp, reduce)
ol <- findOverlapsOfPeaks(tmp_rd[[1]], tmp_rd[[2]], tmp_rd[[3]])

thanks,but sorry again ,it still has some error,i think that my data maybe have something wrong with it.

tmp_rd <- lapply(tmp, reduce)

ol <- do.call(findOverlapsOfPeaks, tmp_rd)
Error in names(PeaksList) <- names :
'names' attribute [242484] must be the same length as the vector [6]

tmp_rd <- lapply(tmp, reduce)
ol <- findOverlapsOfPeaks(tmp_rd[[1]], tmp_rd[[2]], tmp_rd[[3]])
duplicated or NA names found.
Rename all the names by numbers.
duplicated or NA names found.
Rename all the names by numbers.
duplicated or NA names found.
Rename all the names by numbers.
Warning messages:
1: In .merge_two_Seqinfo_objects(x, y) :
Each of the 2 combined objects has sequence levels not in the other:

  • in 'x': chrUn_NW_020190156v1, chrUn_NW_020190179v1, chrUn_NW_020190198v1, chrUn_NW_020190245v1, chrUn_NW_020190261v1, chrUn_NW_020190317v1, chrUn_NW_020190350v1, chrUn_NW_020190386v1, chrUn_NW_020190407v1, chrUn_NW_020190443v1, chrUn_NW_020190469v1, chrUn_NW_020190492v1, chrUn_NW_020190512v1, chrUn_NW_020190522v1, chrUn_NW_020190573v1, chrUn_NW_020190623v1, chrUn_NW_020190632v1, chrUn_NW_020190639v1, chrUn_NW_020190641v1, chrUn_NW_020190656v1, chrUn_NW_020190672v1, chrUn_NW_020190682v1, chrUn_NW_020190714v1, chrUn_NW_020190754v1, chrUn_NW_020190767v1, chrUn_NW_020190771v1, chrUn_NW_020190784v1, chrUn_NW_020190801v1, chrUn_NW_020190839v1, chrUn_NW_020190859v1, chrUn_NW_020190906v1, chrUn_NW_020190984v1, chrUn_NW_020190999v1, chrUn_NW_020191007v1, chrUn_NW_020191022v1, chrUn_NW_020191162v1, chrUn_NW_020191168v1, chrUn_NW_020191203v1, chrUn_NW_020191224v1, chrUn_NW_020191226v1, chrUn_NW_020191251v1, chrUn_NW_02019131 [... truncated]
    2: In .merge_two_Seqinfo_objects(x, y) :
    Each of the 2 combined objects has sequence levels not in the other:
  • in 'x': chrUn_NW_020190132v1, chrUn_NW_020190142v1, chrUn_NW_020190198v1, chrUn_NW_020190245v1, chrUn_NW_020190289v1, chrUn_NW_020190317v1, chrUn_NW_020190386v1, chrUn_NW_020190407v1, chrUn_NW_020190492v1, chrUn_NW_020190511v1, chrUn_NW_020190512v1, chrUn_NW_020190530v1, chrUn_NW_020190537v1, chrUn_NW_020190573v1, chrUn_NW_020190621v1, chrUn_NW_020190623v1, chrUn_NW_020190636v1, chrUn_NW_020190639v1, chrUn_NW_020190656v1, chrUn_NW_020190672v1, chrUn_NW_020190754v1, chrUn_NW_020190756v1, chrUn_NW_020190767v1, chrUn_NW_020190784v1, chrUn_NW_020190984v1, chrUn_NW_020190999v1, chrUn_NW_020191022v1, chrUn_NW_020191045v1, chrUn_NW_020191078v1, chrUn_NW_020191082v1, chrUn_NW_020191093v1, chrUn_NW_020191162v1, chrUn_NW_020191203v1, chrUn_NW_020191211v1, chrUn_NW_020191220v1, chrUn_NW_020191224v1, chrUn_NW_020191232v1, chrUn_NW_020191240v1, chrUn_NW_020191251v1, chrUn_NW_020191273v1, chrUn_NW_020191311v1, chrUn_NW_02019131 [... truncated]
    3: In .merge_two_Seqinfo_objects(x, y) :
    Each of the 2 combined objects has sequence levels not in the other:
  • in 'x': chrUn_NW_020190132v1, chrUn_NW_020190138v1, chrUn_NW_020190142v1, chrUn_NW_020190148v1, chrUn_NW_020190201v1, chrUn_NW_020190289v1, chrUn_NW_020190318v1, chrUn_NW_020190319v1, chrUn_NW_020190324v1, chrUn_NW_020190326v1, chrUn_NW_020190328v1, chrUn_NW_020190372v1, chrUn_NW_020190393v1, chrUn_NW_020190411v1, chrUn_NW_020190449v1, chrUn_NW_020190464v1, chrUn_NW_020190496v1, chrUn_NW_020190511v1, chrUn_NW_020190530v1, chrUn_NW_020190537v1, chrUn_NW_020190539v1, chrUn_NW_020190542v1, chrUn_NW_020190555v1, chrUn_NW_020190557v1, chrUn_NW_020190621v1, chrUn_NW_020190636v1, chrUn_NW_020190658v1, chrUn_NW_020190679v1, chrUn_NW_020190692v1, chrUn_NW_020190746v1, chrUn_NW_020190756v1, chrUn_NW_020190810v1, chrUn_NW_020190811v1, chrUn_NW_020190821v1, chrUn_NW_020190858v1, chrUn_NW_020190942v1, chrUn_NW_020190945v1, chrUn_NW_020190983v1, chrUn_NW_020191025v1, chrUn_NW_020191036v1, chrUn_NW_020191045v1, chrUn_NW_02019107 [... truncated]

@jianhong
Copy link
Owner

I think the second try works. Try to plot the data via

makeVennDiagram(ol)

@Rachel12138
Copy link
Author

thanks!!! it works!!!but there has some warning messages,i think it doesn't matter

Warning messages:
1: In phyper(a.and.b - 1, b, totalTest - b, a, lower.tail = FALSE, :
产生了NaNs
2: In phyper(a.and.b - 1, b, totalTest - b, a, lower.tail = FALSE, :
产生了NaNs

@jianhong
Copy link
Owner

The warning from findOverlapsOfPeaks indicates that the peaklist contain incompatible chromosome names. Please double check if it affect the results. You can trim those peaks with patched chromosome names.
The warning message from makeVennDiagram means it can not create p value for overlapping test via phyper.

@Rachel12138
Copy link
Author

Thank you, your help is much appreciated!!!

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