python/pymethylprocess/utils.py
def print_number_sex_cpgs(input_pkl,array_type):
    """Print number of non-autosomal CpGs."""
    import numpy as np
    #from rpy2.robjects import pandas2ri
    from pymethylprocess.meffil_functions import r_autosomal_cpgs
    #pandas2ri.activate()
    autosomal_cpgs = r_autosomal_cpgs(array_type)#pandas2ri.ri2py()
    methyl_array=MethylationArray.from_pickle(input_pkl)
    n_autosomal = len(np.intersect1d(list(methyl_array.beta),autosomal_cpgs))
    n_cpgs = len(list(methyl_array.beta))
    n_sex = n_cpgs - n_autosomal
    percent_sex = round(float(n_sex)/n_cpgs,2)
    print("There are {} autosomal cpgs in your methyl array and {} sex cpgs. Sex CpGs make up {}\% of {} total cpgs.".format(n_autosomal,n_sex,percent_sex,n_cpgs))
Print number of non-autosomal CpGs.
Print number of non-autosomal CpGs.
Print number of non - autosomal CpGs .
def print_number_sex_cpgs(input_pkl,array_type):
    import numpy as np
    from pymethylprocess.meffil_functions import r_autosomal_cpgs
    autosomal_cpgs = r_autosomal_cpgs(array_type)
    methyl_array=MethylationArray.from_pickle(input_pkl)
    n_autosomal = len(np.intersect1d(list(methyl_array.beta),autosomal_cpgs))
    n_cpgs = len(list(methyl_array.beta))
    n_sex = n_cpgs - n_autosomal
    percent_sex = round(float(n_sex)/n_cpgs,2)
    print("There are {} autosomal cpgs in your methyl array and {} sex cpgs. Sex CpGs make up {}\% of {} total cpgs.".format(n_autosomal,n_sex,percent_sex,n_cpgs))
def print_number_sex_cpgs ( input_pkl , array_type ) : import numpy as np from pymethylprocess . meffil_functions import r_autosomal_cpgs autosomal_cpgs = r_autosomal_cpgs ( array_type ) methyl_array = MethylationArray . from_pickle ( input_pkl ) n_autosomal = len ( np . intersect1d ( list ( methyl_array . beta ) , autosomal_cpgs ) ) n_cpgs = len ( list ( methyl_array . beta ) ) n_sex = n_cpgs - n_autosomal percent_sex = round ( float ( n_sex ) / n_cpgs , 2 ) print ( "There are {} autosomal cpgs in your methyl array and {} sex cpgs. Sex CpGs make up {}\% of {} total cpgs." . format ( n_autosomal , n_sex , percent_sex , n_cpgs ) )
Print number of non-autosomal CpGs.
Print number of non - autosomal CpGs .
"""Print number of non-autosomal CpGs.""" #from rpy2.robjects import pandas2ri #pandas2ri.activate() #pandas2ri.ri2py()
input_pkl
array_type