original_docstring: 
      Create a dataframe of a ACDC patient folder
      :param p:
      :return: df with patient-id, pathology and files
      
docstring: Create a dataframe of a ACDC patient folder
docstring_tokens: Create a dataframe of a ACDC patient folder
code: def describe_acdc_patient_folder(p):
      """
      Create a dataframe of a ACDC patient folder
      :param p:
      :return: df with patient-id, pathology and files
      """
      files = list()
  
      # get patient name
      patient = os.path.basename(os.path.abspath(p))
  
      # get all files for this patient
      # files = sorted(glob.glob(os.path.join(p, '*')))
  
      phases = ['cfg', 'ed', 'ed_gt', 'es', 'es_gt', '4d']
  
      files.append(sorted(glob.glob(os.path.join(p, '*.cfg')))[0])
      files.append(get_phase_file(p, 'ED', False))
      files.append(get_phase_file(p, 'ED', True))
      files.append(get_phase_file(p, 'ES', False))
      files.append(get_phase_file(p, 'ES', True))
      files.append(sorted(glob.glob(os.path.join(p, '*4d.nii.gz')))[0])
  
      assert len(phases) == len(files), 'cant find 6 files in {}'.format(p)
  
      # get pathology from info.cfg file
      pathology = get_pathology_group(p)
  
      # build dataframe with files, pathology, and patient-id
      df = pd.DataFrame()
      df['pathology'] = [pathology] * len(files)
      df['patient'] = [patient] * len(files)
      df['files'] = files
      df['phase'] = phases
      return df
code_tokens: def describe_acdc_patient_folder ( p ) : files = list ( ) patient = os . path . basename ( os . path . abspath ( p ) ) phases = [ 'cfg' , 'ed' , 'ed_gt' , 'es' , 'es_gt' , '4d' ] files . append ( sorted ( glob . glob ( os . path . join ( p , '*.cfg' ) ) ) [ 0 ] ) files . append ( get_phase_file ( p , 'ED' , False ) ) files . append ( get_phase_file ( p , 'ED' , True ) ) files . append ( get_phase_file ( p , 'ES' , False ) ) files . append ( get_phase_file ( p , 'ES' , True ) ) files . append ( sorted ( glob . glob ( os . path . join ( p , '*4d.nii.gz' ) ) ) [ 0 ] ) assert len ( phases ) == len ( files ) , 'cant find 6 files in {}' . format ( p ) pathology = get_pathology_group ( p ) df = pd . DataFrame ( ) df [ 'pathology' ] = [ pathology ] * len ( files ) df [ 'patient' ] = [ patient ] * len ( files ) df [ 'files' ] = files df [ 'phase' ] = phases return df
short_docstring: Create a dataframe of a ACDC patient folder
short_docstring_tokens: Create a dataframe of a ACDC patient folder
comment: """
      Create a dataframe of a ACDC patient folder
      :param p:
      :return: df with patient-id, pathology and files
      """$SEP$# get patient name$SEP$# get all files for this patient$SEP$# files = sorted(glob.glob(os.path.join(p, '*')))$SEP$# get pathology from info.cfg file$SEP$# build dataframe with files, pathology, and patient-id