Skip to content
Snippets Groups Projects
Commit aa8c35fb authored by Reto Tschannen's avatar Reto Tschannen
Browse files

chore:try5 fixing flake8 errors

parent 572d0491
No related branches found
No related tags found
1 merge request!13feat: add function to calculate mean and variance
Pipeline #13858 failed
......@@ -11,13 +11,14 @@ import matplotlib.pyplot as plt
def mean_variance(filepath: str, output_dir: str = os.getcwd()+'/') -> str:
"""For observed gene counts calcuclate mean and var.
! At the moment the function does not check the import files format,
At the moment the function does not check the import files format,
be careful, and only add text files in the format
geneid number_of_transcipts !
geneid number_of_transcipts.
Args:
directory with text files of gene expression
counts in individual cells.
Returns:
1. Path to Csv-formatted table with GeneID, Mean, Variance of the
count, and Scatterplot of mean vs variance for all genes.
......@@ -26,8 +27,8 @@ def mean_variance(filepath: str, output_dir: str = os.getcwd()+'/') -> str:
ValueError: If there are no files in directory
"""
files = [file for file in glob(filepath)]
# Open each file in the input directory, raises error if no file is found
files = [file for file in glob(filepath)]
if len(files) == 0:
raise ValueError('No files in directory:', filepath)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment