def check_wigs(target_wigs_file):
for line in open(target_wigs_file):
a = line.rstrip().split("\t")
wig_file = a[1]
if not os.path.isfile(wig_file):
print("Cannot find %s" % wig_file, file=sys.stderr)
exit(1)
After Change
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
def check_wigs(target_wigs_file):
target_wigs_df = pd.read_table(target_wigs_file)
for wig_file in target_wigs_df.file:
if not os.path.isfile(wig_file):
print("Cannot find %s" % wig_file, file=sys.stderr)
exit(1)