... |
... |
@@ -3105,7 +3105,12 @@ filterGRNAndConnectGenes <- function(GRN,
|
3105 |
3105 |
if (filterLoops) {
|
3106 |
3106 |
futile.logger::flog.info(paste0(" Filter TF-TF self-loops"))
|
3107 |
3107 |
futile.logger::flog.info(paste0(" Number of rows before filtering genes: ", nrow(grn.filt)))
|
3108 |
|
- grn.filt = dplyr::filter(grn.filt, as.character(.data$gene.ENSEMBL) != as.character(.data$TF.ENSEMBL))
|
|
3108 |
+
|
|
3109 |
+ # Be aware of NA values here in the selection, depending on allowMissingTFs
|
|
3110 |
+ grn.filt = dplyr::filter(grn.filt,
|
|
3111 |
+ is.na(.data$TF.ENSEMBL) |
|
|
3112 |
+ (!is.na(.data$TF.ENSEMBL) & (as.character(.data$gene.ENSEMBL) != as.character(.data$TF.ENSEMBL))))
|
|
3113 |
+
|
3109 |
3114 |
futile.logger::flog.info(paste0(" Number of rows after filtering genes: ", nrow(grn.filt)))
|
3110 |
3115 |
}
|
3111 |
3116 |
|