<commit_before>import os
from igf_data.utils.fileutils import get_datestamp_label
from igf_data.utils.fileutils import preprocess_path_name
from igf_data.utils.fileutils import get_file_extension
from igf_data.utils.fileutils import move_file
from igf_data.igfdb.baseadaptor import BaseAdaptor
from igf_data.igfdb.collectionadaptor import CollectionAdaptor
from igf_data.igfdb.fileadaptor import FileAdaptor

class Analysis_collection_utils:
  def __init__(self,project_igf_id,dbsession_class,base_path=None,sample_igf_id=None,experiment_igf_id=None,
               run_igf_id=None,collection_name=None,collection_type=None,collection_table=None,
               rename_file=True,add_datestamp=True,tag_name=None,
               analysis_name=None, allowed_collection=('sample','experiment','run','project')):
    '''
    A class for dealing with analysis file collection. It has specific method for moving analysis files
    to a specific directory structure and rename the file using a uniform rule, if required.
    E.g. "<collection_name>_<analysis_name>_<tag><datestamp>.<original_suffix>"
    
    :param project_igf_id: A project name string
    :param dbsession_class: A database session class
    :param sample_igf_id: A sample name string, default None
    :param experiment_igf_id: An experiment name string, default None
    :param run_igf_id: A run name string, default None 
    :param collection_name: Collection name information for file, default None
    :param collection_type: Collection type information for file, default None
    :param collection_table: Collection table information for file, default None
    :param base_path: A base filepath to move file while loading, default None
    :param rename_file: Rename file based on collection_table type while loading, default True
    :param add_datestamp: Add datestamp while loading the file
    :param analysis_name: Analysis name for the file, required for renaming while loading, default None
    :param tag_name: Additional tag for filename,default None
    :param allowed_collection: List of allowed collection tables
                                 sample
                                 experiment
                                 run
                                 project
    '''
    try:
      self.project_igf_id=project_igf_id
      self.dbsession=dbsession
      self.sample_igf_id=sample_igf_id
      self.experiment_igf_id=experiment_igf_id
      self.run_igf_id=run_igf_id<commit_msg>minor changes to the docstring<commit_after>import os
from igf_data.utils.fileutils import get_datestamp_label
from igf_data.utils.fileutils import preprocess_path_name
from igf_data.utils.fileutils import get_file_extension
from igf_data.utils.fileutils import move_file
from igf_data.igfdb.baseadaptor import BaseAdaptor
from igf_data.igfdb.collectionadaptor import CollectionAdaptor
from igf_data.igfdb.fileadaptor import FileAdaptor

class Analysis_collection_utils:
  def __init__(self,project_igf_id,dbsession_class,base_path=None,sample_igf_id=None,experiment_igf_id=None,
               run_igf_id=None,collection_name=None,collection_type=None,collection_table=None,
               rename_file=True,add_datestamp=True,tag_name=None,
               analysis_name=None, allowed_collection=('sample','experiment','run','project')):
    '''
    A class for dealing with analysis file collection. It has specific method for moving analysis files
    to a specific directory structure and rename the file using a uniform rule, if required.
    E.g. "<collection_name>_<analysis_name>_<tag>_<datestamp>.<original_suffix>"
    
    :param project_igf_id: A project name string
    :param dbsession_class: A database session class
    :param sample_igf_id: A sample name string, default None
    :param experiment_igf_id: An experiment name string, default None
    :param run_igf_id: A run name string, default None 
    :param collection_name: Collection name information for file, default None
    :param collection_type: Collection type information for file, default None
    :param collection_table: Collection table information for file, default None
    :param base_path: A base filepath to move file while loading, default None
    :param rename_file: Rename file based on collection_table type while loading, default True
    :param add_datestamp: Add datestamp while loading the file
    :param analysis_name: Analysis name for the file, required for renaming while loading, default None
    :param tag_name: Additional tag for filename,default None
    :param allowed_collection: List of allowed collection tables
                                 sample
                                 experiment
                                 run
                                 project
    '''
    try:
      self.project_igf_id=project_igf_id
      self.dbsession=dbsession
      self.sample_igf_id=sample_igf_id
      self.experiment_igf_id=experiment_igf_id
      self.run_igf_id=run_igf_id
{'fraction_non_alphanumeric': 0.053923541247484906, 'fraction_numerical': 0.0, 'mean_word_length': 3.7118483412322276, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '122511', 'n_tokens_mistral': 1383, 'n_tokens_neox': 1369, 'n_words': 411}