aet21 / EpiSCORE

Epigenetic cell-type deconvolution from Single-Cell Omic Reference profiles
27 stars 9 forks source link

WGBS support? #2

Closed schmattes42 closed 3 years ago

schmattes42 commented 3 years ago

Dear EpiScore developers,

is there support to perform cell type deconvolution using WGBS data?

If not, is there a functionality to break down WGBS to 450K-, or EPIC-array CG positions?

Thank's in advance!

aet21 commented 3 years ago

Unfortunately not. The current version of EpiSCORE generates a DNAm reference matrix defined over genes and cell-types, where the DNAm value per gene represents the estimated value for CpGs within 200bp upstream of the TSS. So, anyone with WGBS data would need to summarize their WGBS data for these regions and respective marker genes in the EpiSCORE DNAm reference. In next EpiSCORE version we will aim to provide a function to do this.

schmattes42 commented 3 years ago

Alright!

I saw in your example Methylation data file betaRMAPint.m, that the rownames are some integer values. I suspect that these are the cg identifiers from either EPIC arrays, or 450k array, without preceding cg[0]*. Is that right?

schmattes42 commented 3 years ago

Or maybe i ask this way:

What should the rownames of beta.m (second argument of constAvBetaTSS) be?

aet21 commented 3 years ago

rownames(beta.m) where beta.m is the 1st argument of constAvBetaTSS should be the CpG identifiers (as used e.g. in the 450k/850 annotation). the other rownames of betaRMAPint.m would be gene identifiers (Entrez gene IDs)

schmattes42 commented 3 years ago

Great! Thanks a lot!

schmattes42 commented 3 years ago

Sorry to ask again: Is there an example matrix (beta.m) that goes into constAvBetaTSS . Or could you provide an example here.

schmattes42 commented 3 years ago

here an example of what i put into constAvBetaTSS

  S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 ... S13 S14 S15 S16 S17 S18 S19 S20 S21 S22
cg11073926 0.0000000 0.00000000 0.0000000 0.0000000 0.02173913 0.0200000 0.0000000 0.03921569 0.00000000 0.0000000 ... 0.0000000 0.04166667 0.0000000 0.00000000 0.0000000 0.00000000 0.00000000 0.000 0.0000000 0.0000000
cg24040570 0.0000000 0.00000000 0.0000000 0.0000000 0.03448276 0.0000000 0.0000000 0.00000000 0.00000000 0.0000000 ... 0.0000000 0.02857143 0.0000000 0.00000000 0.0000000 0.00000000 0.00000000 0.000 0.0000000 0.0000000
cg01675618 0.0000000 0.00000000 0.0000000 0.0000000 0.00000000 0.0000000 0.0000000 0.00000000 0.01428571 0.0000000 ... 0.0000000 0.00000000 0.0000000 0.00000000 0.0000000 0.00000000 0.00000000 0.000 0.0000000 0.0000000
cg11947782 0.9545455 0.94285714 0.9117647 0.9444444 0.87878788 0.9782609 1.0000000 0.96551724 0.92045455 0.9583333 ... 1.0000000 1.00000000 0.9629630 1.00000000 0.9736842 0.97826087 0.97058824 1.000 0.9714286 0.9428571
cg25261995 0.0000000 0.00000000 0.0000000 0.0000000 0.00000000 0.0000000 0.0000000 0.01428571 0.01190476 0.0000000 ... 0.0000000 0.00000000 0.0000000 0.00000000 0.0000000 0.00000000 0.00000000 0.000 0.0000000 0.0000000
cg25593794 0.2258065 0.04651163 0.1730769 0.1111111 0.35897436 0.5714286 0.6666667 0.06976744 0.64601770 0.4482759 ... 0.2333333 0.16949153 0.3529412 0.05714286 0.2857143 0.04761905 0.05084746 0.125 0.1538462 0.1627907

I get the following errors

Warning message:
"non-unique values when setting 'row.names': '10', '100', '1000', '10000', '100009613', '10001', '10002', '10003', '100033413', '100033414', '100033416', '100033420', '100033423', '100033424', '100033427', '100033430', '100033432', '100033433', '100033434', '100033435', '100033436', '100033437', '100033438', '100033440', '100033441', '100033443', '100033444', '100033445', '100033447', '100033450', '100033451', '100033454', '100033809', '100033811', '100033812', '100033813', '100033814', '100033815', '100033818', '100033820', '100033821', '100036566', '10004', '100049587', '10006', '10007', '10008', '10009', '1001', '10010', '100101267', '100113407', '100124700', '100125288', '100126304', '100126306', '100126328', '100126335', '100126341', '100126346', '100126348', '100126355', '100126693', '100126781', '100127206', '100127889', '100127983', '100128124', '100128126', '100128233', '100128239', '100128288', '100128496', '100128554', '100128682', '100128714', '100128822', '100128890', '100128927', '100129027', '100129094', '100129128', '100129138', '100129269', '100129271', '100129385', '100129405', '100129464', '100129480', '100129543', '100129550', '100129583', '100129669', '100129792', '100129842', '100129924', '10013', '100130155', '100130301', '100130302', '100130331', '100130348', '100130357', '100130370', '100130480', '100130519', '100130539', '100130742', '100130771', '100130827', '100130872', '100130889', '100130890', '100130954', '100130987', '100131017', '100131137', '100131211', '100131303', '100131378', '100131390', '100131551', '100131755', '100131827', '100131902', '100131980', '100132078', '100132116', '100132146', '100132159', '100132215', '100132386', '100132403', '100132463', '100132476', '100132594', '100132831', '100132916', '100133050', '100133123', '100133985', '100134015', '100134317', '100134391', '100134868', '10014', '100141515', '100144595', '10015', '100151643', '100151684', '10016', '100169851', '10017', '100170222', '100170226', '100170765', '100170841', '10018', '10019', '100190940', '100190949', '100192420', '1002', '10020', '10021', '10022', '10023', '10024', '10025', '10026', '100271702', '100271715', '100271846', '100287102', '100287226', '100287362', '100287482', '100287592', '100287639', '100287898', '100287932', '100288077', '100288079', '100288323', '100288413', '100288485', '100288527', '100288801', '100288814', '100289019', '100289211', '100289473', '100289635', '100289650', '100289678', '100293516', '100294720', '1003', '100302114', '100302115', '100302116', '100302117', '100302123', '100302126', '100302130', '100302142', '100302157', '100302164', '100302168', '100302169', '100302177', '100302187', '100302192', '100302205', '100302208', '100302212', '100302227', '100302235', '100302255', '100302259', '100302265', '100302267', '100302270', '100302277', '100302281', '100302287', '100302290', '100302691', '100303755', '100313777', '100313778', '100313779', '100313839', '100313896', '100316904', '100337616', '10036', '10038', '1004', '10040', '100419006', '100419583', '10042', '100421746', '100422737', '100422847', '100423035', '100423062', '10043', '100431172', '10044', '10045', '100462977', '100463285', '100463289', '100463482', '100463488', '10048', '10049', '100499405', '100499467', '1005', '10050', '100500876', '100500878', '100500938', '100505477', '100505478', '100505530', '100505547', '100505549', '100505566', '100505583', '100505591', '100505625', '100505633', '100505663', '100505683', '100505696', '100505724', '100505739', '100505753', '100505768', '100505776', '100505835', '100505841', '100505876', '100505878', '100505887', '100505912', '100505918', '100505929', '100505964', '100505989', '100505993', '100505994', '100506013', '100506035', '100506046', '100506049', '100506070', '100506082', '100506115', '100506126', '100506159', '100506172', '100506229', '100506241', '100506272', '100506385', '100506412', '100506422', '100506428', '100506444', '100506462', '100506526', '100506527', '100506540', '100506564', '100506650', '100506658', '100506679', '100506682', '100506688', '100506697', '100506700', '100506724', '100506725', '100506736', '100506737', '100506742', '100506759', '100506775', '100506783', '100506790', '100506835', '100506840', '100506930', '100507003', '100507006', '100507008', '100507043', '100507050', '100507055', '100507058', '100507059', '100507065', '100507096', '100507175', '100507194', '100507195', '100507257', '100507261', '100507267', '100507290', '100507297', '100507300', '100507321', '100507377', '100507406', '100507420', '100507431', '100507436', '100507487', '100507489', '100507527', '100507528', '100507537', '100507540', '100507588', '100507608', '100507629', '100507642', '100507650', '100507661', '100507679', '10052', '100527964', '100528032', '100529141', '10053', '100533177', '10054', '10055', '10056', '10057', '10058', '10059', '1006', '10060', '10061', '100616150', '100616181', '100616307', '100616330', '100616413', '100616448', '100616477', '10063', '100631378', '100652740', '100652759', '100652824', '100652853', '10066', '10068', '10069', '1007', '10071', '10072', '10073', '10075', '100750225', '10076', '10078', '10079', '1008', '10081', '10082', '100820709', '10083', '100847029', '100847032', '100847071', '10085', '100859921', '10086', '100861468', '100861518', '100861523', '100861544', '100861546', '100861547', '100861549', '100861552', '100873165', '100873856', '100873857', '100873954', '100873989', '100874042', '100874043', '100874047', '100874048', '100874051', '100874053', '100874079', '100874089', '100874120', '100874127', '100874136', '100874143', '100874145', '100874151', '100874155', '100874158', '100874168', '100874173', '100874187', '100874188', '100874197', '100874219', '100874253', '100874275', '100874282', '100874322', '100874325', '100874343', '100874369', '100885778', '100885779', '100885789', '100885798', '10089', '1009', '10090', '10094', '10095', '10096', '10097', '10098', '10099', '100996255', '100996259', '100996266', '100996279', '100996280', '100996291', '100996425', '100996455', '100996570', '100996590', '100996597', '100996634', '100996669', '100996671', '100996693', '100996694', '100996702', '101', '1010', '10100', '10103', '10105', '10106', '101060019', '101060385', '101060544', '10109', '10110', '101101772', '10111', '10113', '10114', '101154644', '10116', '10117', '101180976', '1012', '10120', '10123', '10124', '10125', '10126', '10127', '10128', '10129', '1013', '10130', '10131', '10133', '10135', '10136', '10138', '1014', '10140', '101409253', '10142', '10143', '10144', '10146', '10148', '10149', '1015', '10150', '10151', '10152', '10154', '10155', '10157', '10158', '10159', '1016', '10160', '10162', '10163', '10164', '10165', '10166', '10169', '10170', '10171', '10172', '10174', '10175', '10178', '10180', '101805491', '10181', '10184', '10186', '10188', '1019', '101926892', '101926896', '101926924', '101926925', '101926926', '101926928', '101926942', '101926944', '101926955', '101926971', '101926975', '101927007', '101927015', '101927043', '101927056', '101927058', '101927070', '101927087', '101927112', '101927115', '101927129', '101927131', '101927153', '101927171', '101927189', '101927195', '101927207', '101927229', '101927230', '101927237', '101927242', '101927244', '101927258', '101927269', '101927273', '101927280', '101927282', '101927289', '101927310', '101927332', '101927334', '101927342', '101927354', '101927364', '101927379', '101927394', '101927406', '101927410', '101927421', '101927431', '101927433', '101927434', '101927438', '101927449', '101927460', '101927464', '101927476', '101927487', '101927492', '101927498', '101927523', '101927526', '101927541', '101927574', '101927577', '101927580', '101927581', '101927586', '101927588', '101927604', '101927606', '101927616', '101927619', '101927630', '101927637', '101927641', '101927650', '101927657', '101927667', '101927686', '101927700', '101927701', '101927766', '101927769', '101927774', '101927787', '101927796', '101927829', '101927844', '101927845', '101927851', '101927876', '101927900', '101927901', '101927922', '101927924', '101927934', '101927957', '101927964', '1019"

Error in `.rowNamesDF<-`(x, value = value): duplicate 'row.names' are not allowed
Traceback:

1. constAvBetaTSS(meth_matrix, type = "850k")
2. `rownames<-`(`*tmp*`, value = probeInfo.lv$EID[group.idx])
3. `row.names<-`(`*tmp*`, value = value)
4. `row.names<-.data.frame`(`*tmp*`, value = value)
5. `.rowNamesDF<-`(x, value = value)
6. stop("duplicate 'row.names' are not allowed")
aet21 commented 3 years ago

is your input a data-matrix or data-frame? the function has not been tested on data-frames. so beta.m should be a matrix object with rownames(beta.m) being unique identifiers cg....

schmattes42 commented 3 years ago

Alright. My methylation data was indeed a data.frame. Converting it to a matrix solved it!

aet21 commented 3 years ago

That is fine, but any other queries please send from your own email address and cc in your supervisor, as otherwise I will not respond. kr A