Closed linwang6 closed 4 years ago
Hi,
Calling peak is independent from removing the unwanted chromosomes. Removing the unwanted chromosome filters bins from unwanted chromosome in the 5kb cell-by-bin matrix which is only used for clustering analysis. runMACS however calls peak from each cluster by creating aggregate signal from all reads belonging to the barcodes in that cluster. So, this two steps are independent.
-- Rongxin Fang Ph.D. Student, Ren Lab Ludwig Institute for Cancer Research University of California, San Diego
On Oct 2, 2019, at 12:35 PM, linwang6 notifications@github.com wrote:
I run the remove unwanted chromosomes step to remove the unwanted chromosomes, chr.exclude = seqlevels(x.sp@feature)[grep("random|chrM|chrUn", seqlevels(x.sp@feature))]; idy2 = grep(paste(chr.exclude, collapse="|"), x.sp@feature); if(length(idy2) > 0){x.sp = x.sp[,-idy2, mat="bmat"]}; x.sp
But when i run this step after runMACS step for all clusters, it gives the Warning messages, there is 'chr*_random' or 'chrUn' chromosomes, it's weird. How to remove all the unwanted chromosomes? Thanks so much.
I peak.gr = reduce(Reduce(c, peak.gr.ls));
Warning messages: 1: In .Seqinfo.mergexy(x, y) : Each of the 2 combined objects has sequence levels not in the other:
- in 'x': chr14_KI270723v1_random, chr15_KI270727v1_random, chr22_KI270735v1_random, chr22_KI270736v1_random, chr9_KI270718v1_random, chrUn_GL000218v1
- in 'y': chr14_KI270724v1_random, chr17_KI270729v1_random, chr9_KI270719v1_random, chrUn_GL000214v1, chrUn_GL000216v2, chrUn_KI270744v1 Make sure to always combine/compare objects based on the same reference genome (use suppressWarnings() to suppress this warning). 2: In .Seqinfo.mergexy(x, y) : Each of the 2 combined objects has sequence levels not in the other:
- in 'x': chr14_GL000194v1_random, chr15_KI270727v1_random, chr17_GL000205v2_random, chr22_KI270735v1_random, chr9_KI270718v1_random, chrUn_GL000218v1, chrUn_GL000220v1, chr14_KI270724v1_random, chr9_KI270719v1_random, chrUn_GL000216v2
- in 'y': chrUn_KI270589v1, chrUn_KI270757v1 Make sure to always combine/compare objects based on the same reference genome (use suppressWarnings() to suppress this warning). And I checked the x.sp@feature after perform the 'remove unwanted chromosomes step' step, all the 'chr*_random' or 'chrUn' chromosomes are still there.
seqlevels(x.sp@feature) [1] "chr1" "chr2" "chr3"
[4] "chr4" "chr5" "chr6"
[7] "chr7" "chrX" "chr8"
[10] "chr9" "chr11" "chr10"
[13] "chr12" "chr13" "chr14"
[16] "chr15" "chr16" "chr17"
[19] "chr18" "chr20" "chr19"
[22] "chrY" "chr22" "chr21"
[25] "chr15_KI270905v1_alt" "chr6_GL000256v2_alt" "chr6_GL000254v2_alt"
[28] "chr6_GL000251v2_alt" "chr6_GL000253v2_alt" "chr6_GL000250v2_alt"
[31] "chr6_GL000255v2_alt" "chr6_GL000252v2_alt" "chr17_KI270857v1_alt"
[34] "chr16_KI270853v1_alt" "chr16_KI270728v1_random" "chr17_GL000258v2_alt"
[37] "chr5_GL339449v2_alt" "chr14_KI270847v1_alt" "chr17_KI270908v1_alt"
[40] "chr14_KI270846v1_alt" "chr5_KI270897v1_alt" "chr7_KI270803v1_alt"
[43] "chr19_GL949749v2_alt" "chr19_KI270938v1_alt" "chr19_GL949750v2_alt"
[46] "chr19_GL949748v2_alt" "chr19_GL949751v2_alt" "chr19_GL949746v1_alt"
[49] "chr19_GL949752v1_alt" "chr8_KI270821v1_alt" "chr1_KI270763v1_alt"
[52] "chr6_KI270801v1_alt" "chr19_GL949753v2_alt" "chr19_GL949747v2_alt"
[55] "chr8_KI270822v1_alt" "chr4_GL000257v2_alt" "chr12_KI270904v1_alt"
[58] "chr4_KI270925v1_alt" "chr15_KI270852v1_alt" "chr15_KI270727v1_random" [61] "chr9_KI270823v1_alt" "chr15_KI270850v1_alt" "chr1_KI270759v1_alt"
[64] "chr12_GL877876v1_alt" "chrUn_KI270442v1" "chr17_KI270862v1_alt"
[67] "chr15_GL383555v2_alt" "chr19_GL383573v1_alt" "chr4_KI270896v1_alt"
[70] "chr4_GL383528v1_alt" "chr17_GL383563v3_alt" "chr8_KI270810v1_alt"
[73] "chr1_GL383520v2_alt" "chr1_KI270762v1_alt" "chr15_KI270848v1_alt"
[76] "chr17_KI270909v1_alt" "chr14_KI270844v1_alt" "chr8_KI270900v1_alt"
[79] "chr10_GL383546v1_alt" "chr13_KI270838v1_alt" "chr8_KI270816v1_alt"
[82] "chr22_KI270879v1_alt" "chr8_KI270813v1_alt" "chr11_KI270831v1_alt"
[85] "chr15_GL383554v1_alt" "chr8_KI270811v1_alt" "chr18_GL383567v1_alt"
[88] "chrX_KI270880v1_alt" "chr8_KI270812v1_alt" "chr19_KI270921v1_alt"
[91] "chr17_KI270729v1_random" "chr17_JH159146v1_alt" "chrX_KI270913v1_alt"
[94] "chr6_KI270798v1_alt" "chr7_KI270808v1_alt" "chr22_KI270876v1_alt"
[97] "chr15_KI270851v1_alt" "chr22_KI270875v1_alt" "chr1_KI270766v1_alt"
[100] "chr19_KI270882v1_alt" "chr3_KI270778v1_alt" "chr15_KI270849v1_alt"
[103] "chr4_KI270786v1_alt" "chr12_KI270835v1_alt" "chr17_KI270858v1_alt"
[106] "chr19_KI270867v1_alt" "chr16_KI270855v1_alt" "chr8_KI270926v1_alt"
[109] "chr5_GL949742v1_alt" "chr3_KI270780v1_alt" "chr17_GL383565v1_alt"
[112] "chr2_KI270774v1_alt" "chr4_KI270790v1_alt" "chr11_KI270927v1_alt"
[115] "chr19_KI270932v1_alt" "chr11_KI270903v1_alt" "chr2_KI270894v1_alt"
[118] "chr14_GL000225v1_random" "chrUn_KI270743v1" "chr11_KI270832v1_alt"
[121] "chr7_KI270805v1_alt" "chr4_GL000008v2_random" "chr7_KI270809v1_alt"
[124] "chr19_KI270887v1_alt" "chr4_KI270789v1_alt" "chr3_KI270779v1_alt"
[127] "chr19_KI270914v1_alt" "chr19_KI270886v1_alt" "chr11_KI270829v1_alt"
[130] "chr14_GL000009v2_random" "chr21_GL383579v2_alt" "chr11_JH159136v1_alt"
[133] "chr19_KI270930v1_alt" "chrUn_KI270747v1" "chr18_GL383571v1_alt"
[136] "chr19_KI270920v1_alt" "chr6_KI270797v1_alt" "chr3_KI270935v1_alt"
[139] "chr17_KI270861v1_alt" "chr15_KI270906v1_alt" "chr5_KI270791v1_alt"
[142] "chr14_KI270722v1_random" "chr16_GL383556v1_alt" "chr13_KI270840v1_alt"
[145] "chr14_GL000194v1_random" "chr11_JH159137v1_alt" "chr19_KI270917v1_alt"
[148] "chr7_KI270899v1_alt" "chr19_KI270923v1_alt" "chr10_KI270825v1_alt"
[151] "chr19_GL383576v1_alt" "chr19_KI270922v1_alt" "chrUn_KI270742v1"
[154] "chr22_KI270878v1_alt" "chr19_KI270929v1_alt" "chr11_KI270826v1_alt"
[157] "chr6_KB021644v2_alt" "chr17_GL000205v2_random" "chr1_KI270765v1_alt"
[160] "chr19_KI270916v1_alt" "chr19_KI270890v1_alt" "chr3_KI270784v1_alt"
[163] "chr12_GL383551v1_alt" "chr20_KI270870v1_alt" "chrUn_GL000195v1"
[166] "chr1_GL383518v1_alt" "chr22_KI270736v1_random" "chr10_KI270824v1_alt"
[169] "chr14_KI270845v1_alt" "chr3_GL383526v1_alt" "chr13_KI270839v1_alt"
[172] "chr22_KI270733v1_random" "chrUn_GL000224v1" "chr10_GL383545v1_alt"
[175] "chrUn_GL000219v1" "chr5_KI270792v1_alt" "chr17_KI270860v1_alt"
[178] "chr19_GL000209v2_alt" "chr11_KI270830v1_alt" "chr9_KI270719v1_random" [181] "chrUn_GL000216v2" "chr22_KI270928v1_alt" "chr1_KI270712v1_random" [184] "chr6_KI270800v1_alt" "chr1_KI270706v1_random" "chr2_KI270776v1_alt"
[187] "chr18_KI270912v1_alt" "chr3_KI270777v1_alt" "chr5_GL383531v1_alt"
[190] "chr3_JH636055v2_alt" "chr14_KI270725v1_random" "chr5_KI270796v1_alt"
[193] "chr9_GL383541v1_alt" "chr19_KI270885v1_alt" "chr19_KI270919v1_alt"
[196] "chr19_KI270889v1_alt" "chr19_KI270891v1_alt" "chr19_KI270915v1_alt"
[199] "chr19_KI270933v1_alt" "chr19_KI270883v1_alt" "chr19_GL383575v2_alt"
[202] "chr19_KI270931v1_alt" "chr12_GL383550v2_alt" "chr13_KI270841v1_alt"
[205] "chrUn_KI270744v1" "chr18_KI270863v1_alt" "chr18_GL383569v1_alt"
[208] "chr12_GL877875v1_alt" "chr21_KI270874v1_alt" "chr3_KI270924v1_alt"
[211] "chr1_KI270761v1_alt" "chr3_KI270937v1_alt" "chr22_KI270734v1_random" [214] "chr18_GL383570v1_alt" "chr5_KI270794v1_alt" "chr4_GL383527v1_alt"
[217] "chrUn_GL000213v1" "chr3_KI270936v1_alt" "chr3_KI270934v1_alt"
[220] "chr9_GL383539v1_alt" "chr3_KI270895v1_alt" "chr22_GL383582v2_alt"
[223] "chr3_KI270782v1_alt" "chr1_KI270892v1_alt" "chrUn_GL000220v1"
[226] "chr2_KI270767v1_alt" "chr2_KI270715v1_random" "chr2_KI270893v1_alt"
[229] "chrUn_GL000218v1" "chr18_GL383572v1_alt" "chr8_KI270817v1_alt"
[232] "chr4_KI270788v1_alt" "chrUn_KI270749v1" "chr7_KI270806v1_alt"
[235] "chr7_KI270804v1_alt" "chr18_KI270911v1_alt" "chrUn_KI270741v1"
[238] "chr17_KI270910v1_alt" "chr19_KI270884v1_alt" "chr19_GL383574v1_alt"
[241] "chr19_KI270888v1_alt" "chr3_GL000221v1_random" "chr11_GL383547v1_alt"
[244] "chr2_KI270716v1_random" "chr12_GL383553v2_alt" "chr6_KI270799v1_alt"
[247] "chr22_KI270731v1_random" "chrUn_KI270751v1" "chrUn_KI270750v1"
[250] "chr8_KI270818v1_alt" "chrX_KI270881v1_alt" "chr21_KI270873v1_alt"
[253] "chr2_GL383521v1_alt" "chr8_KI270814v1_alt" "chr12_GL383552v1_alt"
[256] "chrUn_KI270519v1" "chr2_KI270775v1_alt" "chr17_KI270907v1_alt"
[259] "chrUn_GL000214v1" "chr8_KI270901v1_alt" "chr2_KI270770v1_alt"
[262] "chr16_KI270854v1_alt" "chr8_KI270819v1_alt" "chr17_GL383564v2_alt"
[265] "chr2_KI270772v1_alt" "chr8_KI270815v1_alt" "chr5_KI270795v1_alt"
[268] "chr5_KI270898v1_alt" "chr20_GL383577v2_alt" "chr1_KI270708v1_random" [271] "chr7_KI270807v1_alt" "chr5_KI270793v1_alt" "chr6_GL383533v1_alt"
[274] "chr2_GL383522v1_alt" "chr19_KI270918v1_alt" "chr12_GL383549v1_alt"
[277] "chr2_KI270769v1_alt" "chr4_KI270785v1_alt" "chr12_KI270834v1_alt"
[280] "chr7_GL383534v2_alt" "chr20_KI270869v1_alt" "chr21_GL383581v2_alt"
[283] "chr3_KI270781v1_alt" "chr17_KI270730v1_random" "chrUn_KI270438v1"
[286] "chr4_KI270787v1_alt" "chr18_KI270864v1_alt" "chr2_KI270771v1_alt"
[289] "chr1_GL383519v1_alt" "chr2_KI270768v1_alt" "chr1_KI270760v1_alt"
[292] "chr3_KI270783v1_alt" "chr17_KI270859v1_alt" "chr11_KI270902v1_alt"
[295] "chr18_GL383568v1_alt" "chr22_KI270737v1_random" "chr13_KI270843v1_alt"
[298] "chr22_KI270877v1_alt" "chr5_GL383530v1_alt" "chr11_KI270721v1_random" [301] "chr22_KI270738v1_random" "chr22_GL383583v2_alt" "chr2_GL582966v2_alt"
[304] "chrUn_KI270748v1" "chrUn_KI270435v1" "chr5_GL000208v1_random" [307] "chrUn_KI270538v1" "chr17_GL383566v1_alt" "chr16_GL383557v1_alt"
[310] "chr17_JH159148v1_alt" "chr5_GL383532v1_alt" "chr21_KI270872v1_alt"
[313] "chrUn_KI270756v1" "chr6_KI270758v1_alt" "chr12_KI270833v1_alt"
[316] "chr6_KI270802v1_alt" "chr21_GL383580v2_alt" "chr22_KB663609v1_alt"
[319] "chr22_KI270739v1_random" "chr9_GL383540v1_alt" "chrUn_KI270757v1"
[322] "chr2_KI270773v1_alt" "chr17_JH159147v1_alt" "chr11_KI270827v1_alt"
[325] "chr1_KI270709v1_random" "chrUn_KI270746v1" "chr16_KI270856v1_alt"
[328] "chr21_GL383578v2_alt" "chrUn_KI270753v1" "chr19_KI270868v1_alt"
[331] "chr9_GL383542v1_alt" "chr20_KI270871v1_alt" "chr12_KI270836v1_alt"
[334] "chr19_KI270865v1_alt" "chr1_KI270764v1_alt" "chrUn_KI270589v1"
[337] "chr14_KI270726v1_random" "chr19_KI270866v1_alt" "chr22_KI270735v1_random" [340] "chr1_KI270711v1_random" "chrUn_KI270745v1" "chr1_KI270714v1_random" [343] "chr22_KI270732v1_random" "chr1_KI270713v1_random" "chrUn_KI270754v1"
[346] "chr1_KI270710v1_random" "chr12_KI270837v1_alt" "chr9_KI270717v1_random" [349] "chr14_KI270724v1_random" "chr9_KI270720v1_random" "chr14_KI270723v1_random" [352] "chr9_KI270718v1_random" "chrUn_KI270317v1" "chr13_KI270842v1_alt"
[355] "chrY_KI270740v1_random" "chrUn_KI270755v1" "chr8_KI270820v1_alt"
[358] "chr1_KI270707v1_random" "chrUn_KI270579v1" "chrUn_KI270752v1"
[361] "chrUn_KI270512v1" "chrUn_KI270322v1" "chrM"
[364] "chrUn_GL000226v1" "chrUn_KI270311v1" "chrUn_KI270366v1"
[367] "chrUn_KI270511v1" "chrUn_KI270448v1" "chrUn_KI270521v1"
[370] "chrUn_KI270581v1" "chrUn_KI270582v1" "chrUn_KI270515v1"
[373] "chrUn_KI270588v1" "chrUn_KI270591v1" "chrUn_KI270522v1"
[376] "chrUn_KI270507v1" "chrUn_KI270590v1" "chrUn_KI270584v1"
[379] "chrUn_KI270320v1" "chrUn_KI270382v1" "chrUn_KI270468v1"
[382] "chrUn_KI270467v1" "chrUn_KI270362v1" "chrUn_KI270517v1"
[385] "chrUn_KI270593v1" "chrUn_KI270528v1" "chrUn_KI270587v1"
[388] "chrUn_KI270364v1" "chrUn_KI270371v1" "chrUn_KI270333v1"
[391] "chrUn_KI270374v1" "chrUn_KI270411v1" "chrUn_KI270414v1"
[394] "chrUn_KI270510v1" "chrUn_KI270390v1" "chrUn_KI270375v1"
[397] "chrUn_KI270420v1" "chrUn_KI270509v1" "chrUn_KI270315v1"
[400] "chrUn_KI270302v1" "chrUn_KI270518v1" "chrUn_KI270530v1"
[403] "chrUn_KI270304v1" "chrUn_KI270418v1" "chrUn_KI270424v1"
[406] "chrUn_KI270417v1" "chrUn_KI270508v1" "chrUn_KI270303v1"
[409] "chrUn_KI270381v1" "chrUn_KI270529v1" "chrUn_KI270425v1"
[412] "chrUn_KI270396v1" "chrUn_KI270363v1" "chrUn_KI270386v1"
[415] "chrUn_KI270465v1" "chrUn_KI270383v1" "chrUn_KI270384v1"
[418] "chrUn_KI270330v1" "chrUn_KI270372v1" "chrUn_KI270548v1"
[421] "chrUn_KI270580v1" "chrUn_KI270387v1" "chrUn_KI270391v1"
[424] "chrUn_KI270305v1" "chrUn_KI270373v1" "chrUn_KI270422v1"
[427] "chrUn_KI270316v1" "chrUn_KI270338v1" "chrUn_KI270340v1"
[430] "chrUn_KI270583v1" "chrUn_KI270334v1" "chrUn_KI270429v1"
[433] "chrUn_KI270393v1" "chrUn_KI270516v1" "chrUn_KI270389v1"
[436] "chrUn_KI270466v1" "chrUn_KI270388v1" "chrUn_KI270544v1"
[439] "chrUn_KI270310v1" "chrUn_KI270412v1" "chrUn_KI270395v1"
[442] "chrUn_KI270376v1" "chrUn_KI270337v1" "chrUn_KI270335v1"
[445] "chrUn_KI270378v1" "chrUn_KI270379v1" "chrUn_KI270329v1"
[448] "chrUn_KI270419v1" "chrUn_KI270336v1" "chrUn_KI270312v1"
[451] "chrUn_KI270539v1" "chrUn_KI270385v1" "chrUn_KI270423v1"
[454] "chrUn_KI270392v1" "chrUn_KI270394v1"
Thanks!— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/r3fang/SnapATAC/issues/111?email_source=notifications&email_token=ABT6GG6AHGVTWCA3UPZ4BGLQMTEUTA5CNFSM4I4YWKBKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HPFZ4CA, or mute the thread https://github.com/notifications/unsubscribe-auth/ABT6GG2U4M6NPHMT7XMLM7LQMTEUTANCNFSM4I4YWKBA.
Hi, Got it. Thanks so much for your prompt response. Really appreciate it!
I run the remove unwanted chromosomes step to remove the unwanted chromosomes, chr.exclude = seqlevels(x.sp@feature)[grep("random|chrM|chrUn", seqlevels(x.sp@feature))]; idy2 = grep(paste(chr.exclude, collapse="|"), x.sp@feature); if(length(idy2) > 0){x.sp = x.sp[,-idy2, mat="bmat"]}; x.sp
But when i run this step after runMACS step for all clusters, it gives the Warning messages, there is 'chr*_random' or 'chrUn' chromosomes, it's weird. How to remove all the unwanted chromosomes? Thanks so much.
And I checked the x.sp@feature after perform the 'remove unwanted chromosomes step' step, all the 'chr*_random' or 'chrUn' chromosomes are still there.
Could you give some advices? Thanks so much!