parameters: (read_file_name)
return_statement: return '.'.join(name_parts)
docstring: This function removes extensions from a file name.
docstring_summary: This function removes extensions from a file name.
docstring_tokens: This function removes extensions from a file name .
function: def strip_read_extensions(read_file_name):
      """
      This function removes extensions from a file name.
      """
      base_name = os.path.basename(read_file_name)
      name_parts = base_name.split('.')
  
      endings_to_trim = ['gz', 'fasta', 'fna', 'fa', 'fas', 'fsa', 'fastq', 'fq']
      while name_parts[-1].lower() in endings_to_trim:
          name_parts = name_parts[:-1]
      return '.'.join(name_parts)
function_tokens: def strip_read_extensions ( read_file_name ) : base_name = os . path . basename ( read_file_name ) name_parts = base_name . split ( '.' ) endings_to_trim = [ 'gz' , 'fasta' , 'fna' , 'fa' , 'fas' , 'fsa' , 'fastq' , 'fq' ] while name_parts [ - 1 ] . lower ( ) in endings_to_trim : name_parts = name_parts [ : - 1 ] return '.' . join ( name_parts )