diff --git a/src/cineca/parallel_reditools.py b/src/cineca/parallel_reditools.py index eccfcf2..0eb9bf9 100755 --- a/src/cineca/parallel_reditools.py +++ b/src/cineca/parallel_reditools.py @@ -165,6 +165,7 @@ def calculate_intervals(total_coverage, coverage_file, region): size = comm.Get_size() options = reditools.parse_options() + # Until tabix can properly index the output, the header is disruptive. options["remove_header"] = True parser = argparse.ArgumentParser(description='REDItools 2.0') @@ -566,7 +567,8 @@ def calculate_intervals(total_coverage, coverage_file, region): if little_file.endswith("groups.txt"): continue print(little_file) - pieces = re.sub("\..*", "", os.path.basename(little_file)).split("#") + # Strip the file ending and split by '#' + pieces = re.sub(r"\.[^\.]*$", "", os.path.basename(little_file)).split("#") pieces.insert(0, little_file) little_files.append(pieces) diff --git a/src/cineca/reditools2_multisample.py b/src/cineca/reditools2_multisample.py index 99d8521..98a7265 100755 --- a/src/cineca/reditools2_multisample.py +++ b/src/cineca/reditools2_multisample.py @@ -144,6 +144,7 @@ def calculate_intervals(total_coverage, coverage_file, region): size = comm.Get_size() options = reditools.parse_options() + # Until tabix can properly index the output, the header is disruptive. options["remove_header"] = True parser = argparse.ArgumentParser(description='REDItools 2.0') @@ -515,7 +516,7 @@ def calculate_intervals(total_coverage, coverage_file, region): if little_file.endswith("groups.txt"): continue print(little_file) - pieces = re.sub("\..*", "", os.path.basename(little_file)).split("#") + pieces = re.sub(r"\.[^\.]*$", "", os.path.basename(little_file)).split("#") pieces.insert(0, little_file) little_files.append(pieces)