Download and install Mambaforge
On Linux:
wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
bash Mambaforge-Linux-x86_64.sh
library(missForest) | |
library(mice) | |
library(ggplot2) | |
library(ggmice) | |
input_df <- gdc_case_meta[ | |
c("project_id", "gender", "age_at_diagnosis", "tumor_stage") | |
] | |
input_df$project_id <- factor(input_df$project_id) |
Download and install Mambaforge
On Linux:
wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
bash Mambaforge-Linux-x86_64.sh
# if column selection on feature names X must be pandas df | |
# if used in Pipeline must be the first step or you have no | |
# feature selection step before it and you can then still | |
# use col indices | |
import warnings | |
import numpy as np | |
from sklearn.base import BaseEstimator | |
from sklearn.utils import check_X_y | |
from sklearn.feature_selection import SelectorMixin |
import atexit | |
import os | |
import re | |
import sys | |
from argparse import ArgumentParser | |
from decimal import Decimal | |
from glob import glob | |
from pprint import pprint | |
from shutil import rmtree | |
from tempfile import mkdtemp, gettempdir |
suppressPackageStartupMessages({ | |
library(Biobase) | |
library(data.table) | |
library(edgeR) | |
library(fgsea) | |
library(msigdbr) | |
library(ggplot2) | |
}) | |
set.seed(777) |
suppressPackageStartupMessages({ | |
library(Biobase) | |
library(DESeq2) | |
library(EDASeq) | |
library(edgeR) | |
library(limma) | |
library(RColorBrewer) | |
}) | |
fig_dim <- 5 |
suppressPackageStartupMessages({ | |
library(Biobase) | |
library(DESeq2) | |
library(edgeR) | |
library(EnhancedVolcano) | |
library(limma) | |
}) | |
fc <- 1.0 | |
lfc <- log2(fc) |
I hereby claim:
To claim this, I am signing this object:
def transform_feature_meta(pipe, feature_meta): | |
transformed_feature_meta = None | |
for estimator in pipe: | |
if isinstance(estimator, ColumnTransformer): | |
for _, trf_pipe, trf_columns in estimator.transformers_: | |
if isinstance(trf_pipe, str) and trf_pipe == 'drop': | |
trf_feature_meta = feature_meta.iloc[ | |
~feature_meta.index.isin(trf_columns)] | |
elif ((isinstance(trf_columns, slice) | |
and (isinstance(trf_columns.start, str) |