diff --git a/src/meanvariancefunction.py b/src/meanvariancefunction.py index c6f31d59251cc24de09f7deabcd8add857e6267a..ff7bd96724dbbb34433fda135cfe67cf4a501609 100644 --- a/src/meanvariancefunction.py +++ b/src/meanvariancefunction.py @@ -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)