YuLab-SMU / clusterProfiler

:bar_chart: A universal enrichment tool for interpreting omics data
https://yulab-smu.top/biomedical-knowledge-mining-book/
1k stars 253 forks source link

关于dotplot展示compareCluster结果的疑惑 #111

Closed ShixiangWang closed 6 years ago

ShixiangWang commented 6 years ago

Y叔你好,

在使用compareCluster函数对多个数据集做比较分析后,使用dotplot绘制结果,发现排序让我挺困惑的,所以想请教一下。我查看函数说明默认是以geneRatio排序的,但看着结果图又感觉不是哎。

(分析的时候是照着您Bioconductor的包主页做的,我也记不清具体您有没有在文档中说明了,最近网络很不好,一直进不去,所以只好在这里留言请教你了。)

GuangchuangYu commented 6 years ago

按照向导https://github.com/GuangchuangYu/clusterProfiler/issues/new, 给个example再说。

ShixiangWang commented 6 years ago

不好意思,用电脑试了很多次传图都没成功…今天用电脑登github一直转圈圈,现在用邮件发下试试。

我想问compare图中展示多个数据集的富集时,纵轴的排序依据是什么? [cid:f9ff739f-d9fa-4b2d-82b0-f2c74342dd58]

来自 魅族 PRO 6s

-------- 原始邮件 -------- 发件人:Guangchuang Yu notifications@github.com 时间:周三 10月25日 11:26 收件人:GuangchuangYu/clusterProfiler clusterProfiler@noreply.github.com 抄送:王诗翔 wangshx@shanghaitech.edu.cn,Author author@noreply.github.com 主题:Re: [GuangchuangYu/clusterProfiler] 关于dotplot展示compareCluster结果的疑惑 (#111)

按照向导https://github.com/GuangchuangYu/clusterProfiler/issues/new, 给个example再说。

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/GuangchuangYu/clusterProfiler/issues/111#issuecomment-339202863, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AX5Y5IiosVMBhxOWw3CyWUWC9BM08N2bks5svqpTgaJpZM4QFWZc.

ShixiangWang commented 6 years ago

能看到图吗?不行的话,我过段时间再仔细描述好问题。不好意思

GuangchuangYu commented 6 years ago

没图,那过阵子吧。而且要有代码,可以重复出你的图。

ShixiangWang commented 6 years ago

@GuangchuangYu 国内网终于正常了~ 创建样例代码:

> dput(set)
structure(list(set1 = c("6696", "1301", "4312", "6690", "26585", 
"1300", "7153", "27324", "4321", "23213", "1277", "1048", "1356", 
"3149", "6286", "100133941", "7058", "10563", "7262", "1281", 
"1365", "1382", "6273", "8612", "653220///653067", "1001", "51280", 
"4192", "3866", "1278", "10606", "4830", "5352", "10643", "6241", 
"9768", "991", "3486", "1894", "9518", "1832", "26872", "51203", 
"11130", "2023", "3514", "3507", "50802///3514", "1728", "1462", 
"1290", "55165", "6715", "28442///28396///3507///3500///3493", 
"4751", "348249///6358", "33", "56967", "10516", "2171", "8404", 
"55022", "100526664///9936///4065", "407004///84981", "1808", 
"6578", "79625", "26577", "125", "4005", "6926", "58494", "154", 
"4973", "79652", "4360", "6532", "56920", "9314", "11326", "54922", 
"64499", "23767", "55679", "10186", "722", "590", "2920", "51673", 
"8630", "760", "90865", "2791", "445815///11217", "10266", "730", 
"8991", "216", "51705", "7102", "6590", "729238///653509", "2627", 
"9732", "8406", "8639", "57608", "9510", "7122", "2273", "100653057///1066", 
"11170", "10268", "474344", "2719", "23266", "10365", "7433", 
"7075", "9353", "57188", "91851", "5319", "762", "2013", "9022", 
"3777", "3730", "9254", "21", "2878", "4239", "51208", "1361", 
"1675", "9079", "27074", "1910", "2294", "28984", "2354", "7450", 
"7704", "8436", "23037", "5225", "25928", "2823", "8685", "4023", 
"857", "7049", "2327", "6943", "4499", "100532742///2277", "3043", 
"1003", "3040///3039", "10974", "80761", "6441", "7356", "7134", 
"10351", "6440", "177", "23016///7123", "8547", "55273", "11197", 
"1580", "2167"), set2 = c("1301", "4321", "7153", "6696", "26585", 
"3853", "54443", "10563", "115908", "4312", "57016", "9787", 
"2877", "10643", "7272", "6241", "991", "22974", "29968", "2706", 
"259266", "256764", "503639", "9837", "55872", "891", "5268", 
"332", "4751", "11065", "83540", "9133", "9768", "1063", "54978///1058", 
"1033", "29089", "9833", "1300", "24137", "4085", "6513", "83879", 
"701", "55165", "1277", "3854", "29128", "1832", "3872///3728", 
"9055", "7345", "4105///4102", "667", "51203", "10403", "11004", 
"6447", "699", "6273", "2305", "4105", "3149", "27299", "90161", 
"983", "55635", "7020", "9928", "3161", "6657", "23213", "6790", 
"51659", "5744", "9319", "83461", "56649", "10804", "10874", 
"890", "100507855///205", "4288", "100499467///400619", "3852", 
"7298", "10112", "55355", "1894", "11130", "286887///3854///3853", 
"1690", "55771", "3832", "54659///54658///54657///54600///54579///54578///54577///54576///54575", 
"64151", "53836", "6535", "4922", "729533///728833///653820///554282", 
"8038", "8091", "55215", "51514", "2146", "8970///8339", "4173", 
"112399", "6715", "347733", "81610", "79682", "9493", "51512", 
"55612", "1111", "10635", "5317", "6699", "7368", "29028", "10631", 
"116028", "100133941", "5984", "56992", "91057", "114907", "4171", 
"6495", "55083", "1830", "113130", "204962", "3866", "3861", 
"84624", "990", "3223", "10615", "27338", "548596///1159", "56938", 
"30001", "5121", "9232", "11339", "10606", "146909", "57082", 
"84634", "10962", "222584", "3486", "7058", "1281", "55388", 
"6491", "8318", "1062", "128872", "4192", "7291", "1029", "55839", 
"9134", "9212", "157313", "83990", "1645", "23532", "53335", 
"54658///54657///54600///54578///54576///54575", "5471", "653562///386757///6535", 
"56521", "6707", "4318", "1382", "6698", "151246", "1829", "3507", 
"810", "898", "57405", "1278", "5050", "2729", "84706", "55143", 
"7083", "3070", "8836", "9156", "85465", "1728", "116832", "79733", 
"28442///28396///3507///3500///3493", "5217", "29127", "144455", 
"79623", "10721", "100500832///7371", "23397", "23657", "79703", 
"286827///57560", "55366", "2017", "5352", "4320", "64065", "28442///28396///3507///3503///3502///3500///3495///3494///3493///3492", 
"6690", "1163", "8612", "101340250///100124541///728239///81557", 
"4830", "642477///503639", "344887", "115749", "1290", "54742", 
"143686", "8626", "92196", "84985", "64105", "3017", "4747", 
"387103", "9635", "10535", "1825", "5522", "58516", "51053", 
"4111", "8840", "84733", "3485", "3842", "26256", "286827", "1469", 
"51280", "429", "6857", "3868", "2597", "8914", "1303", "26047", 
"55789", "105379499///645566", "3495", "9735", "28396///3507///3503///3502///3500///3495///3494///3493", 
"9547", "1734", "57110", "29923", "54892", "150468", "3664", 
"1164", "81620", "54478", "2191", "5427", "81611", "57586", "5803", 
"131578", "79075", "2244", "57549", "1001", "9582", "8140", "5888", 
"2237", "5163", "83416", "6659", "28831", "127602", "4605", "55971", 
"79801", "1356", "50802///3514", "3838", "51155", "2161", "6652", 
"6518", "51050", "3159", "55055", "84057", "1978", "4176", "3860", 
"166824", "4319", "55732", "4282", "6676", "56061", "10024", 
"102725526///28396///3507///3502///3501///3500///3494///3493///3492", 
"9447", "1515", "1510", "53346", "102725051///102723891///728747///441430///441425///440482///391267///284232///84210", 
"91663", "3575", "152831", "401548", "217", "728358///1668///1667", 
"6376", "105379426", "2681", "84106", "10810", "8809", "8676", 
"79589", "9034", "3108", "1193", "4582", "845", "7305", "23645", 
"9429", "11343", "54103", "8741", "5743", "54210", "375033", 
"6769", "140828", "7025", "1440", "11000", "26112", "23336", 
"6563", "83872", "23171", "192668", "22915", "84976", "10232", 
"54", "23414", "9023", "116159", "389136", "728441///92086///91227///2678", 
"6038", "9510", "5730", "101927345///101060632///101059949///100874392", 
"84688", "4118", "10231", "102724197///100132705///728441///92086///91227///2679///2678", 
"51348", "387758", "166336", "26628", "5627", "57088", "83888", 
"3202", "79633", "161176///79686", "22918", "152007", "115572", 
"130733", "140597", "1346", "7122", "7056", "84969", "445347///6983///6967", 
"81493", "101060604///387254///81893", "146722", "80760", "27289", 
"641700", "83657", "283298", "8404", "1808", "2157", "101928429", 
"56729", "1396", "51285", "3791", "10266", "126014", "3131", 
"760", "3579", "445815///11217", "161198", "1512", "4680", "79083", 
"91624", "9365", "283897", "6403", "51316", "4688", "9308", "2791", 
"168537", "101928635///8854", "6445", "7102", "5806", "64321", 
"120425", "969", "58475", "100526772///389125///375346", "79689", 
"3386", "51365", "64399", "976", "56241", "7538", "284340", "55332", 
"115330", "728", "64651", "128602", "2615", "58494", "9934", 
"7306", "6275", "4900", "2690", "100653057///1066", "5348", "1043", 
"51751", "407026///407025", "407004///84981", "10203", "80323", 
"195814", "5468", "64174", "7704", "474344", "400120", "348249///6358", 
"8406", "80761", "256949", "1901", "9314", "79413", "10742", 
"64499", "81035", "648740///280///279///278///277///276", "2353", 
"6283", "241", "3248", "51090", "128346", "221303", "9353", "285736", 
"286189", "4332", "2268", "132203", "8839", "92086", "128218", 
"344148", "90865", "90952", "105375172", "100505495", "11326", 
"4306", "590", "100526664///9936///4065", "6347", "55282", "6330", 
"1117", "115019", "54674", "10516", "27306", "358", "51554", 
"6590", "650", "1556", "26577", "361", "11254", "6943", "10894", 
"3373", "58189", "5225", "101927279", "83595", "94274", "762", 
"25928", "4360", "1755", "10268", "2532", "6578", "51673", "338328", 
"101929198", "23767", "1359", "100507632", "2266", "9022", "285313", 
"56920", "10568", "7049", "2273", "306", "57864", "6401", "221395", 
"1675", "4969", "2294", "59277", "21", "2878", "2203", "101926959", 
"51705", "2921", "3569", "147463", "1003", "100820829", "857", 
"8639", "7433", "6532", "4023", "9413", "283383", "2662", "154", 
"8991", "92304", "4239", "33", "285016", "8436", "84417", "6439", 
"27074", "207107", "51208", "8685", "3040///3039", "1910", "115677", 
"4499", "11170", "146556", "9254", "4973", "79625", "151126", 
"2327", "10974", "1556///1555", "5319", "5473", "2354", "155465", 
"11185", "177", "9476", "91851", "389376", "8630", "253970", 
"722", "729238///653509", "1580", "157310", "117156", "23016///7123", 
"120892", "7134", "1361", "6440", "7356", "199675", "11197", 
"100532742///2277", "6441", "8547", "256691", "200504", "55273"
), set3 = c("84740", "1301", "56649", "1300", "9245", "84978", 
"4322", "6696", "3110", "80078", "10563", "6690", "4321", "90161", 
"23120", "2706", "112937", "7498", "84985", "145741", "266977", 
"10804", "1356", "3174", "27324", "4320", "1048", "57167", "5121", 
"1591", "2118", "26585", "7104", "1469", "4312", "1311", "116372", 
"24", "100133941", "3381", "202915", "83851", "57549", "653220///653067", 
"1382", "8714", "2571", "101669762", "79054", "256714", "55040", 
"26575", "6495", "11075", "147920", "3026", "7020", "3866", "79783", 
"7153", "89944", "3853", "260436", "388228", "83879", "130367", 
"100499467///400619", "1001", "374393", "2810", "23321", "55143", 
"2861", "1380", "4314", "150696", "80343///2861", "55635", "29089", 
"140686", "94025", "118932", "89766", "10331", "728192", "440335", 
"27299", "1741", "9156", "727897", "55083", "3171", "25803", 
"196410", "3161", "4318", "54443", "84824", "8318", "9547", "55220", 
"79733", "100505989", "6698", "115908", "3012", "8438", "222643", 
"57016", "51804", "3081", "1087", "51557", "27293", "1950", "84634", 
"440590", "638", "2304", "148808", "284656", "9620", "51280", 
"26154", "56938", "8612", "80117", "50512", "10874", "26", "6947", 
"10643", "1308", "222663", "3149", "1277", "64078", "440603", 
"202374", "28983", "100874194", "2048", "890", "347735", "9768", 
"930", "6241", "995", "100132169", "27178", "56934", "57628", 
"9787", "131578", "132299", "4151", "8437", "23081", "144501", 
"4316", "50489", "5794", "53836", "55612", "55789", "2676", "11015", 
"7546", "909", "10406", "79962", "3706", "259266", "4862", "116028", 
"570", "58499", "9076", "54821", "200958", "1470", "9133", "204962", 
"9833", "4605", "83416", "55897", "2524", "6664", "3783", "7366", 
"340547", "23213", "153218", "5031", "55808", "1472", "634", 
"84518", "1728", "93273", "79782", "5099", "8821", "415", "157570", 
"55765", "131034", "201299", "79838", "84102", "7058", "10736", 
"402415", "4647", "332", "6819", "8336", "27197", "81832", "81796", 
"388564", "100126791", "6286", "8908", "8038", "4288", "131368", 
"23624", "26470", "85285", "1803", "29968", "3934", "6299", "286887///3854///3853", 
"6715", "10690", "55359", "9518", "22974", "6447", "79679", "8645", 
"101929272", "84419", "7477", "6367", "124540", "7368", "6768", 
"701", "10761", "149473", "6518", "100505938", "8857", "80178", 
"8581", "114904", "3938", "54978///1058", "644186", "5268", "6273", 
"102725426///102466889///102465871///3507///3500", "101928269///100506403///861", 
"11004", "3017", "222", "3786", "79019", "128239", "55165", "401474", 
"65263", "55103", "2898", "79852", "4998", "9075", "105376379", 
"64151", "51231", "5454", "1063", "2687", "7253", "7262", "24137", 
"1364", "259307", "101929777///7473", "2792", "9928", "25791", 
"3053", "55247", "25769", "92312", "120224", "26027", "51297", 
"1365", "84057", "25837", "1261", "5307", "4745", "83540", "55971", 
"1943", "973", "84679", "3537", "3507///3500", "221833", "5624", 
"84847", "4071", "64788", "6007///6006", "51512", "100505920", 
"7083", "9401", "389023", "1833", "4166", "145837", "162387", 
"100862671///10847", "23594", "57156", "127602", "79983", "101927722", 
"253982", "55061", "56159", "124220", "2305", "6699", "116238", 
"991", "3872///3728", "406991///81671", "9837", "10551", "6659", 
"8573", "699", "84296", "3120", "23397", "81671", "112399", "10293", 
"388722", "9480", "6491", "1592", "3868", "860", "79644", "55195", 
"5002", "196051", "1749", "84900", "4751", "23333", "1594", "80201", 
"115701", "3833", "7272", "10509", "80164", "3898", "55355", 
"990", "283177", "8091", "891", "54933", "9143", "57535", "6790", 
"54102", "80028", "10863", "4192", "4810", "6285", "79814", "203111", 
"22801", "3177", "79092", "11130", "100507616///574028", "1111", 
"503639", "388743", "51809", "3713", "8879", "100506013", "10112", 
"5570", "100506696", "5450", "147841", "26298", "727957", "2877", 
"6512", "563", "100302185///5820", "84072", "28396///3493", "56521", 
"169044", "27035", "3861", "4085", "51203", "64798", "2525", 
"51659", "10537///2550", "116379", "22885", "10655", "10763", 
"84688", "1960", "4051", "65055", "64518", "388121", "101060391", 
"10203", "9353", "79825", "101060604///387254///81893", "200132", 
"1464", "101927249", "127795", "93649", "147372", "2878", "158376", 
"6441", "222256", "7075", "348093", "23328", "6578", "257019", 
"101928370", "3316", "255743", "1580", "474344", "101927345///101060632///101059949///100874392", 
"728577///643827///79937", "80014", "51348", "761", "2357", "3563", 
"6332", "728577///79937", "3045", "54873", "283726", "10718", 
"283383", "10218", "885", "100506289", "80343", "6345", "100507311", 
"5225", "5332", "375033", "5319", "344018", "283392", "3202", 
"54810", "2354", "256435", "102724611", "101929398", "820", "54959", 
"5243", "163782", "114898", "101927416", "90952", "2824", "221662", 
"1128", "7481", "8972", "51267", "21", "285043", "4929", "57576", 
"101928635///8854", "3777", "56967", "100861540", "100652988", 
"11211", "29931", "120892", "7432", "285812", "27255", "55800", 
"83894", "161176///79686", "6368", "116159", "9314", "343450", 
"55578///1674", "5630", "9254", "8406", "9457", "58189", "100505495", 
"27074", "94274", "338557", "154661", "101928307", "100506699", 
"3579", "129881", "660", "85358", "130733", "79940", "6283", 
"13", "1178", "361", "4653", "859", "348249///6358", "9499", 
"10216", "1012", "2015", "51299", "102725051///102723891///728747///441430///441425///440482///391267///284232///84210", 
"6442", "80760", "64321", "5649", "9496", "83595", "65009", "123624", 
"100820829", "5348", "10391", "101927123", "115330", "219348", 
"140597", "5028", "2791", "51705", "2823", "8843", "4023", "4886", 
"58494", "641700", "92162", "6279", "374864", "27063", "2327", 
"91851", "1602", "644242", "2690", "5468", "51673", "2215", "5787", 
"11069", "90865", "922", "10974", "8839", "100885775", "80761", 
"59350", "55859", "51554", "149047", "7056", "8909", "6323", 
"23336", "6440", "7049", "387758", "100302650", "123264", "100653057///1066", 
"345557", "147463", "79933", "3048///3047", "115677", "9413", 
"100874392///729171///728747///441430///441425///440482///84210", 
"157310", "105379426", "185", "7051", "6274", "8676", "845", 
"6401", "732", "51751", "80704", "114", "221303", "7102", "93556", 
"79413", "56920", "55282", "7433", "100506795", "9510", "8988", 
"57864", "131873", "23284", "161198", "1675", "1003", "22915", 
"256949", "28965", "1901", "9729", "2532", "1440", "83888", "221687", 
"4969", "54674", "627", "8436", "4239", "93035", "11185", "7363", 
"81575", "6863", "3040///3039", "29953", "5199", "80059", "256691", 
"285736", "84417", "443", "33", "5166", "3373", "9365", "387755", 
"6943", "1910", "101926959", "2294", "400568", "79785", "60675", 
"405754", "10223", "590", "7704", "7122", "64399", "2662", "8639", 
"8685", "219790", "10268", "728113///653145", "1071", "11170", 
"4311", "23237", "342527", "100532742///2277", "7356", "5473", 
"9068", "284654", "64168", "100507632", "102723737///102723680///102723631///101060211///728911///541466///541465///441521///441519", 
"3569", "6456", "168667", "23359", "26577", "6330", "199675", 
"100996760", "101927069", "8547", "166752", "200504", "2167", 
"3036", "338328", "285016", "23016///7123", "92293", "4499", 
"285313", "83878", "10894", "286191", "344148", "11197", "1361", 
"203190", "55273", "51208", "150378///80274", "6532", "285759", 
"6445", "7134", "762", "400120", "177", "25928"), set4 = c("6696", 
"9245", "6690", "4320", "1917", "1382", "1277", "1048", "11065", 
"7153", "1469", "1311", "10381", "4192", "6513", "150696", "3706", 
"347735", "4318", "5307", "5831", "991", "2810", "3149", "84985", 
"55765", "3159", "1001", "2118", "50512", "26470", "3898", "84706", 
"3856", "25803", "130367", "8555", "7516", "55033", "200810", 
"7083", "1301", "9723", "10509", "634", "7020", "200958", "388228", 
"51280", "1138", "115908", "3934", "55876", "51361", "56203", 
"57477", "222962", "6286", "285605", "54799", "120224", "132299", 
"9213", "79586", "113130", "7058", "126205", "84061", "394263", 
"84334", "128866", "55775", "1728", "2877", "3192", "154791", 
"8562", "55971", "100874302", "1832", "158399", "1365", "84419", 
"25862", "54756", "7620", "27242", "8548", "196410", "29128", 
"375790", "51478", "25764", "2525", "9123", "6447", "64789", 
"7076", "8857", "200728", "7561", "3691", "91120", "84124", "6768", 
"5050", "144406", "9289", "30001", "9547", "1951", "2825", "83879", 
"65108", "250", "80727", "151194", "2582", "26472", "9071", "1281", 
"6752", "8612", "5214", "54940", "55728", "11144", "5121", "84984", 
"54997", "26279", "146722", "2206", "256949", "11095", "151126", 
"2014", "51716", "440585", "25959", "9450", "687", "79652", "4692", 
"55679", "8835", "2328", "5797", "23328", "64115", "22998", "3512", 
"283298", "306", "115677", "9912", "2662", "57165", "10516", 
"51267", "9459", "1593", "140597", "5919", "57088", "5168", "222223", 
"2294", "4242", "29995", "155038", "80144", "51316", "130497", 
"128602", "83604", "3489", "2353", "5734", "6237", "5997", "713", 
"79887", "1959", "284119", "131873", "10186", "8322", "64651", 
"120425", "6366", "4005", "84969", "9535", "4069", "53826", "10365", 
"58475", "64174", "51705", "55022", "23645", "1901", "23584", 
"94", "80704", "79974", "55321", "5787", "57493", "4256", "6867", 
"722", "92304", "9353", "9022", "2615", "342035", "55214", "1843", 
"4056", "10894", "8839", "3398", "760", "21", "51285", "116835", 
"152273", "26353", "1318", "55340", "7832", "286133", "366", 
"255189", "285016", "90952", "6347", "9413", "84952", "55303", 
"79901", "56729", "6274", "58494", "712", "2207", "2352", "10268", 
"94274", "820", "54922", "140706", "1805", "1511", "72", "358", 
"177", "10203", "2205", "7538", "249", "89780", "7433", "154", 
"56241", "116159", "7177", "7305", "6275", "9510", "3202", "81035", 
"1839", "2878", "25928", "152007", "3399", "2034", "4023", "22915", 
"7102", "221476", "5552", "57556", "8547", "5166", "7049", "128346", 
"117156", "4091", "1346", "1410", "25890", "84417", "2357", "7450", 
"2202", "5175", "11197", "54345", "8406", "22918", "2719", "241", 
"2920", "2219", "161198", "6590", "27074", "7078", "1776", "53405", 
"11326", "4973", "3730", "6441", "1003", "26577", "8630", "79987", 
"5730", "10216", "2273", "730", "51751", "8404", "7122", "5319", 
"7010", "7134", "1580", "2791", "3569", "125", "1043", "9079", 
"8436", "256691", "2532", "1359", "28984", "55600", "157310", 
"6279", "4499", "9806", "55118", "1675", "6358", "10974", "8685", 
"55273", "219348", "2327", "2354", "4239", "11185", "200504", 
"857", "5225", "7123", "6440", "2167", "124", "7356", "3039", 
"11170", "142683", "3040", "762", "3043", "199675", "401286"), 
    set5 = c("653220///653067", "1301", "4312", "7153", "4751", 
    "6696", "51659", "1001", "332", "1917", "1300", "6690", "991", 
    "56649", "10112", "6241", "8714", "259266", "50512", "9833", 
    "55215", "8208", "5050", "3161", "10874", "3110", "1382", 
    "64151", "1311", "4173", "55355", "27324", "1062", "79733", 
    "55165", "51280", "4322", "1063", "554313///121504///8370///8368///8367///8366///8365///8364///8363///8362///8361///8360///8359///8294", 
    "1803", "6715", "4521", "4605", "2305", "10403", "4320", 
    "55839", "83461", "1944", "22974", "1728", "7272", "51203", 
    "51557", "1469", "80343///2861", "9212", "100507855///205", 
    "891", "128872", "6273", "266740///4101", "4321", "5831", 
    "4288", "9245", "3866", "9787", "26585", "10609", "9143", 
    "1048", "4085", "9768", "898", "25803", "8970///8339", "55143", 
    "55872", "101340250///100124541///728239///81557", "9244", 
    "1277", "10643", "9837", "24137", "26255", "5047", "4885", 
    "124801", "10963", "2118", "8878", "9133", "7468", "8612", 
    "2810", "10615", "6790", "10563", "23475", "85235///8969///8336///8332///8330///8329", 
    "5255", "2146", "81620", "5099", "55040", "116832", "8943", 
    "11004", "11065", "3832", "1356", "638", "983", "3149", "100133941", 
    "3537", "10606", "79623", "995", "10322", "2023", "1033", 
    "54978///1058", "7298", "30001", "8318", "701", "8038", "3706", 
    "81611", "4105", "3364", "79703", "653562///386757///6535", 
    "7020", "4192", "26499", "65263", "79019", "7262", "3206", 
    "54908", "27344", "220134", "347733", "7083", "51155", "9055", 
    "10635", "56992", "146909", "4830", "23464", "5190", "10331", 
    "23397", "990", "5366", "27293", "116372", "5121", "699", 
    "100132399///100008586///729447///729442///729431///729428///729422///645073///26748///2579///2578///2577///2576///2574", 
    "55359", "1945", "8573", "51678", "890", "55055", "7980", 
    "51016", "727897", "24", "79007", "3868", "6676", "55732", 
    "5578", "11130", "55744", "2444", "80305", "6513", "11014", 
    "84296", "2491", "3507", "79682", "1111", "3775", "2017", 
    "677795///9238", "2861", "3159", "94081", "4100", "993", 
    "26059", "8091", "4319", "1719", "8228", "11169", "79783", 
    "5347", "56938", "79017", "51512", "3783", "55612", "28823", 
    "728269///4108", "8140", "23197", "2304", "55568", "6472", 
    "64798", "1365", "2898", "55388", "8363", "80008", "26472", 
    "2575", "400506", "1308", "4931", "1362", "100532732///401251///4439", 
    "27299", "80164", "53836", "26575", "5307", "4171", "28442///28396///3507///3503///3502///3500///3495///3494///3493///3492", 
    "3070", "10733", "10926", "2048", "9232", "2571", "9140", 
    "25830", "79801", "28969", "23065", "78990", "28831///26586", 
    "11015", "9928", "7138", "9401", "79644", "6518", "6947", 
    "8601", "54892", "5756", "27338", "6535", "54830", "8347///8346///8344///8343///8339", 
    "8345", "29901", "100528017///6289///6288", "3017", "51816", 
    "10610", "1959", "2824", "27063", "23237", "22885", "3055", 
    "728", "1036", "100861540", "4688", "79683", "683", "23345", 
    "976", "161176///79686", "29108", "23336", "27147", "6236", 
    "72", "57493", "3158", "6003", "55790", "5739", "969", "1794", 
    "3045", "6362", "64123", "9674", "313", "5797", "55857", 
    "101930578///100887750///55901", "3397", "6332", "1776", 
    "6376", "101929500///51232", "467", "84525", "718", "11069", 
    "5997", "653361", "3122", "5743", "55711", "64499///7177", 
    "55022", "10763", "56729", "53405", "5244///5243", "285203", 
    "358", "5468", "1326", "10391", "55766", "64759", "4117", 
    "5627", "23460", "13", "3575", "51285", "57211", "7538", 
    "4060", "51338", "56155", "3202", "10319", "6237", "1490", 
    "6846///6375", "1843", "1396", "53829", "26084", "79740", 
    "23492", "4056", "9496", "90627", "3579", "2921", "1359", 
    "81698", "3820", "51294", "26577", "8406", "8991", "283298", 
    "9839", "820", "51296", "54", "2203", "79870", "4638", "9353", 
    "5166", "4973", "83716", "150094", "9172", "4815", "8787", 
    "2701", "3250///3240", "4118", "3399", "81575", "26628", 
    "9732", "9413", "445815///11217", "6274", "154", "79625", 
    "6446", "140597", "26051", "8741", "51090", "81606", "712", 
    "4929", "5376", "3048///3047", "6876", "1602", "713", "7305", 
    "79839", "79812", "8835", "366", "2328", "6578", "64236", 
    "65009", "407977///8742", "2995", "10742", "1012", "8809", 
    "6590", "10203", "241", "80323", "58494", "1634", "722", 
    "2627", "407004///84981", "79148", "56967", "54674", "4008", 
    "64499", "361", "55303", "79652", "5551", "57608", "8630", 
    "1808", "11346", "79026", "57088", "6401", "1593", "9457", 
    "79762", "8436", "7363", "5730", "1805", "10186", "4332", 
    "53826", "100526664///9936///4065", "443", "10891", "2202", 
    "1906", "7049", "55679", "9723", "5199", "389136", "3569", 
    "51348", "4069", "23024", "2268", "55450", "10365", "3563", 
    "56920", "6414", "3384", "23266", "6275", "9052", "6347", 
    "760", "2273", "5787", "4005", "1408", "1346", "2719", "8843", 
    "6439", "80760", "1410", "54873", "710", "4881", "27123", 
    "5319", "2294", "54922", "9535", "23554", "196740", "348249///6358", 
    "21", "2353", "2662", "7102", "7056", "2791", "55214", "8676", 
    "9365", "9934", "11326", "10398", "216", "102465526///7869", 
    "2327", "2920", "5919", "51365", "9254", "306", "28513", 
    "33", "9452", "8404", "3909", "51411", "4360", "2013", "2999", 
    "1264", "9022", "8796", "10578", "81563", "57188", "26353", 
    "5225", "4969", "10516", "10894", "4311", "7704", "2264", 
    "3316", "1901", "9314", "5175", "1440", "6926", "29953", 
    "2", "79413", "1521", "10268", "4023", "23037", "4256", "2878", 
    "51208", "7122", "1524", "55282", "590", "2615", "51554", 
    "1361", "1043", "9510", "654817///654816///653361", "1910", 
    "55578///1674", "7450", "7433", "8839", "27074", "8875", 
    "1675", "56000", "125", "474344", "3777", "3373", "91851", 
    "100653057///1066", "80761", "857", "11170", "90865", "8639", 
    "58189", "10232", "7075", "51673", "5348", "5473", "6532", 
    "730", "256949", "3101", "3730", "51705", "28984", "4818", 
    "1003", "6440", "2532", "64174", "729238///653509", "6445", 
    "4129", "2823", "3040///3039", "762", "3043", "100532742///2277", 
    "10351", "9079", "8685", "79825", "51751", "6441", "7356", 
    "4239", "6943", "10266", "1580", "4499", "10974", "55273", 
    "2167", "2354", "8547", "25928", "23016///7123", "11197", 
    "177", "7134")), .Names = c("set1", "set2", "set3", "set4", 
"set5"))
> ck_enrichKEGG <- compareCluster(geneCluster = set, fun = "enrichKEGG")
> ck_enrichDO <- compareCluster(geneCluster = set, fun = "enrichDO")
> dotplot(ck_enrichKEGG)
> dotplot(ck_enrichDO)

下面是两幅大致的结果截图。 compare

compare2

我想问的问题是当有几个不同的数据集比较时,纵坐标从上到下排序的依据是什么?像第一幅图纵轴排的第二个都很小而且有的就没有dot,怎么会排到第二个的?

另外一个我想请教的问题是,如果我想对这几个数据集的差异基因交集做GSEA,怎么实现呢?因为同一个基因在原本的数据集中的Rank不一样,怎么综合它们的rank,我们怎么尽量体现基因在不同数据集的rank,又能够综合起一个量化的值作为排序依据然后做GSEA分析?这是我在思考和想要处理的一个问题,您如果有兴趣可以回答一下。

GuangchuangYu commented 6 years ago

第一个问题按照geneCluster的顺序,比如geneCluster[[1]]的富集结果会排在最上面,而这个富集结果,自身的排序按照p值来。

第二个问题等于说你要综合不同数据源的数据来做GSEA?整合应该是比如说表达水平这个层面上来,而不是到了排序的层面才整合的。

GuangchuangYu commented 6 years ago

BTW,dput的输出请写文件,github支持你上传文本。

ShixiangWang commented 6 years ago

@GuangchuangYu 谢谢解惑和提醒啊,之前没注意到上传文件这个问题。谢谢您的意见,我自己觉得自己这样做整合分析很有问题,但因为是不同的数据集,所以在得到差异基因列表之前我也不知道怎么去做,所以自然地想到了都做完差异分析然后取交集基因做GSEA。再次谢谢Y叔耐心解答~

GuangchuangYu commented 6 years ago

GSEA用的是全部数据,不是差异基因,你理解有问题,赶紧去看文献。

ShixiangWang commented 6 years ago

@GuangchuangYu 还好我多问了一句大佬,当头棒喝:smile:。之前一直把它们看成一类差异富集的方法了,看了别人的博文也没理解透,就照着你的包一路差异基因,GO,通路做下去了...万分感谢。

lulumagic7 commented 1 year ago

第一个问题按照geneCluster的顺序,比如geneCluster[[1]]的富集结果会排在最上面,而这个富集结果,自身的排序按照p值来。

第二个问题等于说你要综合不同数据源的数据来做GSEA?整合应该是比如说表达水平这个层面上来,而不是到了排序的层面才整合的。

@GuangchuangYu 于老师,怎么才能用qvalue来排序呢

huerqiang commented 1 year ago

@lulumagic7 对于每个cluster,本来就是按照qvalue来排序的,不知道你的疑惑点在哪里?

lulumagic7 commented 1 year ago

@GuangchuangYu 上面不是说的按照p value?而且我实际的数据跑出来也是按照p value来的,我想按着q value来。

lulumagic7 commented 1 year ago

@huerqiang

huerqiang commented 1 year ago

有没有这样一种可能:qvalue是用pvalue算出来的,它们的排序是一致的,,,,,

lulumagic7 commented 1 year ago

额 不是的哦 不一致哦

huerqiang commented 1 year ago

请给出不一致的例子,我们可不接这个锅

lulumagic7 commented 1 year ago

dotplottop30compare1 不是,我没有说你们有错,我这不是在问你嘛。这个图,我的代码: _#load packages

library(dplyr)
library(tidyr)
library(clusterProfiler)
library(enrichplot)
library(ggplot2)
library(org.Hs.eg.db)

input significant peak gene list

setwd("D:/experiment/data analysis/fxs project/FXS btach2 glu 13 samples 202206/new/downstream/updown")
data <- read.csv("fxs to control.select p.csv", stringsAsFactors= F,header = T)
data$ENSEMBL <- gsub("\\.\\d*","",data$X)
genesdata <- bitr(data$ENSEMBL,fromType = "ENSEMBL", toType = c("GENENAME", "SYMBOL","ENTREZID"),  OrgDb = "org.Hs.eg.db")
all <- merge(data,genesdata)
up <- subset(all, sig == 'up')
down <- subset(all, sig == 'down')
cp <- list(Downregulated = down$ENTREZID, Upregulated = up$ENTREZID) 

enrich go all

yy <- compareCluster(cp, fun="enrichGO", OrgDb = "org.Hs.eg.db", ont = "ALL", pvalueCutoff = 1, pAdjustMethod = "BH", qvalueCutoff = 1)
write.csv(yy, "compareGO.csv")

p <- ggplot(yy, aes(x=Cluster, y=Description),showCategory=15) +
    geom_point(aes(color=-1*log(qvalue), size=GeneRatio, shape = ONTOLOGY,))+
    scale_color_gradient(low = "blue", high = "red")+
    labs(color=expression(-log[10](qvalue)),
                    size="GeneRatio",
                    x="",
                    y="Description")
p <- p + theme(panel.grid.major = element_line(color = "white",size = 0.4),
               panel.grid.minor = element_line(color = "white",size = 0.4),
               panel.border = element_blank(),
               legend.background = element_blank(),
               axis.line.x=element_line(size=0.4,colour = "black",linetype = "solid"),
               axis.line.y=element_line(size=0.4,colour = "black",linetype = "solid"),
               axis.ticks=element_line(size=0.4))
ggsave("dotplottop30compare1.png",p,width = 6,height = 7,dpi=300)
ggsave(p,filename = 'dotplottop30compare1.pdf',width = 6,height = 7,dpi=300)
```_

你空了帮我看看?
huerqiang commented 1 year ago

我们提供了dotplot函数来作图。

lulumagic7 commented 1 year ago

Rplotdotplotupdown @GuangchuangYu 余老师,我用dotplot画了一下,依然是这样的。我是想左边所有红色大点点在上面,但现在也不是这样;我是看了compareCluster的数据,是按照p value排的。是否有方法改一下弄成q value呢?另外,dotplot是可以画,我写成ggplot2也都一样呀,这样出的图就和我文章其他图的格式都一致了。数据都是在那里,我只是用不同方法拿出来做图,本质是一样的。我也看过您其他帖子,用ggplot2将clusterprofiler的数据拿来作图是完全可以的,它们是无缝对接的,这也是clusterprofiler的一大优势。不知道余老师是否有时间帮我看看我的问题,不甚感激!

huerqiang commented 1 year ago

(1)你怀疑pvalue和qvalue的排序方法不一致,请给出数据来指示一下,这样我们才能帮到你 (2)dotplot图的原理是对每个cluster进行排列,然后它支持填补功能,将此cluster中排序靠后但其他cluster排序在前的点给填补上,因此造成了看上去排列并非完全有序的现象。

lulumagic7 commented 1 year ago

我不是怀疑,我怀疑也没意义对吧。我现在的数据就是我上面给你的图展示的呀,dotplot直接出来的数据。我的疑问在于如何将我想要的左边的Downregulated的cluster的所有红色点排在上面。咱解决问题不就行了嘛?不管我用dotplot或者是ggplot2。

huerqiang commented 1 year ago

(1)你要实现这个功能非常简单,只需对数据sort一下即可,这项操作你很容易在百度上搜到,请搜“ggplot2作图如何对纵坐标排序”。 (2)我在回复了你qvalue原理之后,你仍旧反复艾特我们说“我是看了compareCluster的数据,是按照p value排的。是否有方法改一下弄成q value呢?”,这让我很困惑。

huerqiang commented 1 year ago

你向我们提问,我们做到了认真回答,但你是否也应当先把我的回答看一下,理清思路,再继续艾特呢?

lulumagic7 commented 1 year ago

我也不知道你哪里来的火气,咱有问题就好好说呗,大家是共同讨论问题解决问题。我们重新来理一下思路。 在余老师给上面的人的回答的是:“第一个问题按照geneCluster的顺序,比如geneCluster[[1]]的富集结果会排在最上面,而这个富集结果,自身的排序按照p值来”。然后你给我说“对于每个cluster,本来就是按照qvalue来排序的”,然后又说“有没有这样一种可能:qvalue是用pvalue算出来的,它们的排序是一致的”。当然你后面给我解释了dotplot的原理是“对每个cluster进行排列,然后它支持填补功能,将此cluster中排序靠后但其他cluster排序在前的点给填补上,因此造成了看上去排列并非完全有序的现象。”那再看一下我这个图,我的理解是:左边第三第四个低q值的排在第五到第九的前面,是因为右边组第三第四的比较靠前给填补上去了,但右边组排在靠前的不应该是第七和第九嘛? image

huerqiang commented 1 year ago

我没有火气,只是我们的关注点不一样。你在意的是解决你所遇到的问题,而我在意的是保证回复每个问题的准确性。现在整理你的每个提问: 提问1:结果是按照pvalue排序的,怎么才能用qvalue来排序呢 我的回答:pvalue和qvalue排序是一致的。 提问2:额 不是的哦 不一致哦 我的回答:请给出pvalue和qvalue不一致的例子 然后你下面的提问就坚持认为pvalue和qvalue排序不一致,并且没有给出数据来证实你的观点。 提问3:左边第三第四个低q值的排在第五到第九的前面,是因为右边组第三第四的比较靠前给填补上去了,但右边组排在靠前的不应该是第七和第九嘛? 我的回答:要理解这个,你首先应该知道dotplot的作图顺序:首先第一个cluster按照pvalue排好序,然后第二个cluster按照pvalue排序,接下来第三个,第四个,,,需要注意的是,前面cluster已经有的term的顺序不会因为后面cluster而改变,也就是说除了第一个cluster,其他的都不能保证严格按照pvalue排序。 最后进行填补,这一步同样不会改变排序。

huerqiang commented 1 year ago

关于qvalue和pvalue排序的问题,这是最基本的统计学知识。任何pvalue校正方法都不会改变原有排序,而qvalue只是其中的一种校正方法。

lulumagic7 commented 1 year ago

compareGO.csv 你自己那我从我上面code保存的compareCluster的结果看看呢。你用p value和q value去排一下看一样不? 然后关于上面你总结的我的提问三你的回答,你就针对我这个图给我解释,不用广义来说。我现在第一个cluster是按照p value从低到高排序了嘛?没有把,因为第第二行、第三行和第四行的p值是小于第五行到第九行吧?能说明这个问题嘛?

huerqiang commented 1 year ago

(1)请恕鄙人智商实在太低,无法理解您是怎么从这个文件中发现用pvalue排序和qvalue排序不一致的。 (2)请作出两张图,第一张不填补,第二张填补,两张放一起比较,重点看下未填补时各个cluster的排序。如果您不清楚如何画出未填补的图,请查看我们的文档:

(3)issue是我们修改bug的地方,这些基础性的问题建议放在bioconductor support或者Biostas上进行提问:

Ask in the right place

peiyu1223 commented 1 year ago

您好,clusterProfiler中的compareCluster,能否可以不默认按照p值排序,而是仅展示共有通路? 谢谢

huerqiang commented 1 year ago

目前没有这个功能

peiyu1223 commented 1 year ago

功能

好的,谢谢