def slicer(outfile):
    idx_file_path = '/media/secure_volume/index/bioindex.tsv'
    holding_folder_path = '/media/secure_volume/holding_folder/'
    bio_idx_df = pd.read_table(idx_file_path)
    bio_idx_df.set_index('mainid', inplace=True)
    mainid_list = [vol for vol in os.listdir(holding_folder_path) if vol.endswith('.zip')]
    mainid_list_clean = [item[0:(- 4)] for item in mainid_list]
    htid_series = bio_idx_df.htid[mainid_list_clean]
    file_path_list = glob.glob((holding_folder_path + '*.zip'))
    slice_df = pd.DataFrame(htid_series)
    slice_df['path'] = file_path_list
    slice_df['c'] = 0
    slice_df['d'] = 1001
    with open(outfile, 'w') as outf:
        slice_df.to_csv(outfile, sep='\t', header=False, index=False)
    print('Wrote', len(slice_df), 'rows to', outfile)
def slicer(outfile):
    idx_file_path = '/media/secure_volume/index/bioindex.tsv'
    holding_folder_path = '/media/secure_volume/holding_folder/'
    bio_idx_df = pd.read_table(idx_file_path)
    bio_idx_df.set_index('mainid', inplace=True)
    mainid_list = [vol for vol in os.listdir(holding_folder_path) if vol.endswith('.zip')]
    mainid_list_clean = [item[0:(- 4)] for item in mainid_list]
    htid_series = bio_idx_df.htid[mainid_list_clean]
    file_path_list = glob.glob((holding_folder_path + '*.zip'))
    slice_df = pd.DataFrame(htid_series)
    slice_df['path'] = file_path_list
    slice_df['c'] = 0
    slice_df['d'] = 1001
    with open(outfile, 'w') as outf:
        slice_df.to_csv(outfile, sep='\t', header=False, index=False)
    print('Wrote', len(slice_df), 'rows to', outfile)