diff --git a/.gitignore b/.gitignore
index f6de2650349862e536b2eeb85d7d8c0275722dcd..95377fd0d7e76e876fa50430be220ece3df6c6c8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,11 @@
-data/*
-results/*
+data*
+results*
 .ropeproject
 src/__pycache__
 *.pyc
 .DS_Store
 *.pyc
-src/rmi_splitter.egg-info
+src/flexi_splitter.egg-info
 src/build/
 src/dist/
+venv
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..993979792c0c7a9b03cc962d4ba8ed673f4ad6c8
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,18 @@
+repos:
+-   repo: https://github.com/pre-commit/pre-commit-hooks
+    rev: v2.3.0
+    hooks:
+    -   id: check-yaml
+    -   id: end-of-file-fixer
+    -   id: trailing-whitespace
+
+-   repo: https://github.com/psf/black
+    rev: 22.10.0
+    hooks:
+    -   id: black
+
+-   repo: https://github.com/pycqa/isort
+    rev: 5.12.0
+    hooks:
+    -   id: isort
+        args: ["--profile", "black"]
diff --git a/README.md b/README.md
index 38af7aa680d262bdd105f217d2c9580e91a321dd..e375929887de743bb253e0a271cb46cf663c3eea 100644
--- a/README.md
+++ b/README.md
@@ -88,7 +88,7 @@ In this example, two barcodes, "BCD1" and "BCD2," are specified. Each barcode co
 - **stop** : position of the last barcode nucleotide in the sequence
 - **header** : A boolean value. In some cases, barcodes are placed in the header of each read. If so, the position of the barcode is relative to the end of the header. For example, start = 1 and stop = 6 means that the barcode is in the last 6 characters of the header
 
-Barcodes sections must contain also samples subsection, listing all existing barcodes sequences. You can name the barcode as you whish but it the name must be unique within the file.  
+Barcodes sections must contain also samples subsection, listing all existing barcodes sequences. You can name the barcode as you whish but it the name must be unique within the file.
 
 ### UMI
 If the barcodes is named 'UMI', there is no 'samples' subsection, as UMI are random and thus unknown. If 'UMI' is spceficied, the sequence is paste at the end of the first field in the header of the reads, separated by '_'. This allows it to be later used with UMItools for demultiplexing. In all cases, barcodes are removed from the sequence of the read.
@@ -99,3 +99,15 @@ In this section, all experimental samples and their barcode combinations are lis
 ## Output
 
 In the output folder, flexi-splitter creates one subfolder per experimental sample. Each folder contains the same number of files as specified with the -f parameter.
+
+## Contributing
+
+Install in development mode:
+
+```console
+$ cd flexi_splitter
+$ python3 -m venv venv
+$ source venv/bin/activate
+$ pip install src/
+$ pre-commit install
+```
diff --git a/src/flexi_splitter/flexi_splitter.py b/src/flexi_splitter/flexi_splitter.py
index 77cd2a5345d1f66eb0eebd99c290a9a51aff59a3..5fbb124b7368c18bad3185c731cf34d67e0edfaa 100644
--- a/src/flexi_splitter/flexi_splitter.py
+++ b/src/flexi_splitter/flexi_splitter.py
@@ -5,14 +5,17 @@ This module provides all the function to split fastq files according to the
 adaptator information provided in a .yaml configuration file
 """
 
+import getopt
 import os
-from contextlib import ExitStack
 import sys
-import getopt
+import time
+from contextlib import ExitStack
 from gzip import open as gzopen
+
 import yaml  # pip install pyyaml
-from utils import suffix_tree
-import time
+from tqdm import tqdm
+
+from flexi_splitter import suffix_tree
 
 
 class Reads:
@@ -55,7 +58,7 @@ class Reads:
         del self.qual
         self.qual = list()
         for base_qual in qual:
-            self.qual.append(ord(base_qual)-64)
+            self.qual.append(ord(base_qual) - 64)
 
     def qual2str(self):
         """
@@ -94,21 +97,21 @@ def load_yaml(path):
 
     params: path
     """
-    with open(path, 'r') as stream:
+    with open(path, "r") as stream:
         try:
             config = yaml.safe_load(stream)
             for adaptator in config:
-                if not adaptator == 'conditions':
-                    config[adaptator]['coords']['start'] = int(
-                        config[adaptator]['coords']['start'] - 1
+                if not adaptator == "conditions":
+                    config[adaptator]["coords"]["start"] = int(
+                        config[adaptator]["coords"]["start"] - 1
                     )
-                    config[adaptator]['coords']['stop'] = int(
-                        config[adaptator]['coords']['stop'] - 1
+                    config[adaptator]["coords"]["stop"] = int(
+                        config[adaptator]["coords"]["stop"] - 1
                     )
-                    config[adaptator]['coords']['reads'] = int(
-                        config[adaptator]['coords']['reads'] - 1
+                    config[adaptator]["coords"]["reads"] = int(
+                        config[adaptator]["coords"]["reads"] - 1
                     )
-            config['conditions']['unassigned'] = None
+            config["conditions"]["unassigned"] = None
             config = update_config(config)
             return config
         except yaml.YAMLError as err:
@@ -121,15 +124,17 @@ def update_config(config):
     Add possition where to remove adaptator requencially
     """
     for adaptator in config:
-        if not adaptator == 'conditions':
-            config[adaptator]['coords']['start_update'] = \
-                config[adaptator]['coords']['start']
-            config[adaptator]['coords']['stop_update'] = \
-                config[adaptator]['coords']['stop']
+        if not adaptator == "conditions":
+            config[adaptator]["coords"]["start_update"] = config[adaptator]["coords"][
+                "start"
+            ]
+            config[adaptator]["coords"]["stop_update"] = config[adaptator]["coords"][
+                "stop"
+            ]
             config = update_positions(
                 config=config,
                 adaptator=adaptator,
-                ntuple=config[adaptator]['coords']['reads']
+                ntuple=config[adaptator]["coords"]["reads"],
             )
     return config
 
@@ -144,45 +149,41 @@ def test_adaptator(config, adaptator, ntuple, verbose=False):
     try:
         if adaptator not in config.keys():
             if verbose:
-                print("error: extract_barcode(), config doesn't contain " +
-                      str(adaptator) +
-                      " adaptator.")
+                print(
+                    "error: extract_barcode(), config doesn't contain "
+                    + str(adaptator)
+                    + " adaptator."
+                )
             raise KeyError
 
-        if 'coords' not in config[adaptator].keys():
+        if "coords" not in config[adaptator].keys():
             if verbose:
-                print("error: extract_barcode(), " +
-                      str(adaptator) +
-                      " has no coords")
+                print("error: extract_barcode(), " + str(adaptator) + " has no coords")
             raise KeyError
 
-        if 'reads' not in config[adaptator]['coords'].keys():
+        if "reads" not in config[adaptator]["coords"].keys():
             if verbose:
-                print("error: extract_barcode(), " +
-                      str(adaptator) +
-                      " has no reads")
+                print("error: extract_barcode(), " + str(adaptator) + " has no reads")
             raise KeyError
 
-        if 'start' not in config[adaptator]['coords'].keys():
+        if "start" not in config[adaptator]["coords"].keys():
             if verbose:
-                print("error: extract_barcode(), " +
-                      str(adaptator) +
-                      " has no start")
+                print("error: extract_barcode(), " + str(adaptator) + " has no start")
             raise KeyError
 
-        if 'stop' not in config[adaptator]['coords'].keys():
+        if "stop" not in config[adaptator]["coords"].keys():
             if verbose:
-                print("error: extract_barcode(), " +
-                      str(adaptator) +
-                      " has no stop")
+                print("error: extract_barcode(), " + str(adaptator) + " has no stop")
             raise KeyError
 
-        if not ntuple == config[adaptator]['coords']['reads']:
+        if not ntuple == config[adaptator]["coords"]["reads"]:
             if verbose:
-                print("error: extract_barcode(), " +
-                      str(adaptator) +
-                      " not present for reads " +
-                      str(ntuple))
+                print(
+                    "error: extract_barcode(), "
+                    + str(adaptator)
+                    + " not present for reads "
+                    + str(ntuple)
+                )
             raise ValueError
 
     except KeyError:
@@ -203,7 +204,7 @@ def extract_pos(config, adaptator, verbose=False):
     params: adaptator
     """
     try:
-        return config[adaptator]['coords']
+        return config[adaptator]["coords"]
     except KeyError:
         if verbose:
             print("error: extract_pos() ")
@@ -223,19 +224,13 @@ def extract_barcode_pos(reads, start, stop, header):
     if header:
         if start == 0:
             seq = reads.header[-stop:]
-            return {'seq': seq, 'qual': [40 for x in range(len(seq))]}
+            return {"seq": seq, "qual": [40 for x in range(len(seq))]}
         seq = reads.header[-stop:-start]
-        return {'seq': seq, 'qual': [40 for x in range(len(seq))]}
+        return {"seq": seq, "qual": [40 for x in range(len(seq))]}
     if start == 0:
-        return {
-            'seq': reads.seq[:stop],
-            'qual': reads.qual[:stop]
-        }
+        return {"seq": reads.seq[:stop], "qual": reads.qual[:stop]}
     stop = stop - 1
-    return {
-        'seq': reads.seq[start:stop],
-        'qual': reads.qual[start:stop]
-    }
+    return {"seq": reads.seq[start:stop], "qual": reads.qual[start:stop]}
 
 
 def extract_barcode(reads, config, adaptator, ntuple, verbose=False):
@@ -247,16 +242,13 @@ def extract_barcode(reads, config, adaptator, ntuple, verbose=False):
     params: adaptator
     """
     if verbose:
-        test_adaptator(config=config,
-                       adaptator=adaptator,
-                       ntuple=ntuple,
-                       verbose=verbose)
-    coords = config[adaptator]['coords']
+        test_adaptator(
+            config=config, adaptator=adaptator, ntuple=ntuple, verbose=verbose
+        )
+    coords = config[adaptator]["coords"]
     return extract_barcode_pos(
-        reads=reads,
-        start=coords['start'],
-        stop=coords['stop'],
-        header=coords['header'])
+        reads=reads, start=coords["start"], stop=coords["stop"], header=coords["header"]
+    )
 
 
 def write_umi_in_header(reads, umi):
@@ -268,7 +260,7 @@ def write_umi_in_header(reads, umi):
     params: adaptator
     """
     header = reads.header.split(" ")
-    header[0] += "_" + str(umi['seq'])
+    header[0] += "_" + str(umi["seq"])
     reads.header = " ".join(header)
     return reads
 
@@ -282,14 +274,20 @@ def list_adaptator_barcode(config, adaptator, ntuple, verbose=False):
     params: adaptator
     """
     barcode_list = dict()
-    if (adaptator not in ["UMI", "conditions"] and
-            config[adaptator]['coords']['reads'] == ntuple):
-        for sample in config[adaptator]['samples']:
-            barcode_list[sample['name']] = sample['seq']
+    if (
+        adaptator not in ["UMI", "conditions"]
+        and config[adaptator]["coords"]["reads"] == ntuple
+    ):
+        for sample in config[adaptator]["samples"]:
+            barcode_list[sample["name"]] = sample["seq"]
         return barcode_list
     if verbose:
-        print("error: list_adaptator_barcode() cannot list barcode for " +
-              str(adaptator) + " with reads " + str(ntuple))
+        print(
+            "error: list_adaptator_barcode() cannot list barcode for "
+            + str(adaptator)
+            + " with reads "
+            + str(ntuple)
+        )
     raise KeyError
 
 
@@ -302,9 +300,9 @@ def list_reads_number(config):
     """
     read_number = 0
     for adaptator in config:
-        if not adaptator == 'conditions':
-            if int(config[adaptator]['coords']['reads']) > read_number:
-                read_number = int(config[adaptator]['coords']['reads'])
+        if not adaptator == "conditions":
+            if int(config[adaptator]["coords"]["reads"]) > read_number:
+                read_number = int(config[adaptator]["coords"]["reads"])
     return read_number + 1
 
 
@@ -317,18 +315,17 @@ def create_barcode_dictionaries(config, mismatch=None):
     """
     adaptators_dict = suffix_tree.Forest(mismatch=mismatch)
     for adaptator in config:
-        if adaptator not in ['UMI', 'conditions']:
-            for barcode in config[adaptator]['samples']:
+        if adaptator not in ["UMI", "conditions"]:
+            for barcode in config[adaptator]["samples"]:
                 adaptators_dict.add_sequence(
                     adaptator=adaptator,
-                    sequence=barcode['seq'],
-                    barcode=barcode['name']
+                    sequence=barcode["seq"],
+                    barcode=barcode["name"],
                 )
     return adaptators_dict
 
 
-def match_barcode(reads, config, adaptator, barcode_dictionary, ntuple,
-                  verbose=False):
+def match_barcode(reads, config, adaptator, barcode_dictionary, ntuple, verbose=False):
     """
     Search barcode suffixtree.
 
@@ -343,31 +340,35 @@ def match_barcode(reads, config, adaptator, barcode_dictionary, ntuple,
             config=config,
             adaptator=adaptator,
             ntuple=ntuple,
-            verbose=verbose
+            verbose=verbose,
         )
         return barcode_dictionary.search_reads(
             adaptator=adaptator,
-            seq=read['seq'],
-            qual=read['qual'],
+            seq=read["seq"],
+            qual=read["qual"],
             cache=True,
-            verbose=verbose
+            verbose=verbose,
         )
     except KeyError:
         if verbose:
-            print("error: match_barcode() \"" +
-                  str(reads.seq) +
-                  "\" not found in \"" +
-                  str(adaptator) +
-                  "\" for reads " +
-                  str(ntuple))
+            print(
+                'error: match_barcode() "'
+                + str(reads.seq)
+                + '" not found in "'
+                + str(adaptator)
+                + '" for reads '
+                + str(ntuple)
+            )
     except IndexError:
         if verbose:
-            print("error: match_barcode() \"" +
-                  str(reads.seq) +
-                  "\" not found in \"" +
-                  str(adaptator) +
-                  "\" for reads " +
-                  str(ntuple))
+            print(
+                'error: match_barcode() "'
+                + str(reads.seq)
+                + '" not found in "'
+                + str(adaptator)
+                + '" for reads '
+                + str(ntuple)
+            )
 
 
 def match_barcodes(reads, config, barcode_dictionary, ntuple, verbose=False):
@@ -380,8 +381,8 @@ def match_barcodes(reads, config, barcode_dictionary, ntuple, verbose=False):
     """
     barode_names = list()
     for adaptator in config:
-        if adaptator not in ['UMI', 'conditions']:
-            if config[adaptator]['coords']['reads'] == ntuple:
+        if adaptator not in ["UMI", "conditions"]:
+            if config[adaptator]["coords"]["reads"] == ntuple:
                 barode_names.append(
                     match_barcode(
                         reads=reads,
@@ -389,7 +390,7 @@ def match_barcodes(reads, config, barcode_dictionary, ntuple, verbose=False):
                         adaptator=adaptator,
                         barcode_dictionary=barcode_dictionary,
                         ntuple=ntuple,
-                        verbose=verbose
+                        verbose=verbose,
                     )
                 )
     return barode_names
@@ -403,13 +404,16 @@ def barcode_to_sample(barcodes, config, bcd_dic_found, verbose=False):
     params: config
     """
     try:
-        return list(config['conditions'].keys())[
-            list(config['conditions'].values()).index(barcodes)]
+        return list(config["conditions"].keys())[
+            list(config["conditions"].values()).index(barcodes)
+        ]
     except ValueError:
         if verbose:
-            print("error: barcode_to_sample() \"" +
-                  str(barcodes) +
-                  "\" is not in the sample list, assigning to \"unassigned\"")
+            print(
+                'error: barcode_to_sample() "'
+                + str(barcodes)
+                + '" is not in the sample list, assigning to "unassigned"'
+            )
         if str(barcodes) in bcd_dic_found:
             bcd_dic_found[str(barcodes)] += 1
         else:
@@ -433,13 +437,15 @@ def assign_reads(reads_list, config, barcode_dictionary, bcd_dic_found, verbose=
             config=config,
             barcode_dictionary=barcode_dictionary,
             ntuple=ntuple,
-            verbose=verbose
+            verbose=verbose,
         )
         ntuple += 1
-    return barcode_to_sample(barcodes=barcode_names,
-                             config=config,
-                             verbose=verbose,
-                             bcd_dic_found=bcd_dic_found)
+    return barcode_to_sample(
+        barcodes=barcode_names,
+        config=config,
+        verbose=verbose,
+        bcd_dic_found=bcd_dic_found,
+    )
 
 
 def remove_barcode_pos(reads, start, stop, header):
@@ -455,10 +461,11 @@ def remove_barcode_pos(reads, start, stop, header):
     if header:
         size = len(reads.header)
         if start == 0:
-            reads.header = reads.header[:(size-stop)]
+            reads.header = reads.header[: (size - stop)]
         else:
-            reads.header = reads.header[:(size-stop)] + \
-                reads.header[(size-start):]
+            reads.header = (
+                reads.header[: (size - stop)] + reads.header[(size - start) :]
+            )
     else:
         if start == 0:
             reads.seq = reads.seq[stop:]
@@ -481,15 +488,16 @@ def remove_barcode(reads, config, adaptator, ntuple, verbose=False):
     params: adaptator
     """
     if verbose:
-        test_adaptator(config=config, adaptator=adaptator, ntuple=ntuple,
-                       verbose=verbose)
-    coords = config[adaptator]['coords']
+        test_adaptator(
+            config=config, adaptator=adaptator, ntuple=ntuple, verbose=verbose
+        )
+    coords = config[adaptator]["coords"]
 
     return remove_barcode_pos(
         reads=reads,
-        start=coords['start_update'],
-        stop=coords['stop_update'],
-        header=coords['header']
+        start=coords["start_update"],
+        stop=coords["stop_update"],
+        header=coords["header"],
     )
 
 
@@ -502,18 +510,19 @@ def update_position(config, adaptator, adapt, adaptator_length, ntuple):
     params: adapt
     params: adaptator_length
     """
-    if (not adapt == 'conditions' and
-            not adapt == adaptator and
-            config[adapt]['coords']['header'] ==
-            config[adaptator]['coords']['header'] and
-            config[adapt]['coords']['reads'] == ntuple):
-        if (config[adapt]['coords']['start'] >
-                config[adaptator]['coords']['start']):
-            config[adapt]['coords']['start_update'] = (
-                config[adapt]['coords']['start'] - adaptator_length
+    if (
+        not adapt == "conditions"
+        and not adapt == adaptator
+        and config[adapt]["coords"]["header"] == config[adaptator]["coords"]["header"]
+        and config[adapt]["coords"]["reads"] == ntuple
+    ):
+        if config[adapt]["coords"]["start"] > config[adaptator]["coords"]["start"]:
+            config[adapt]["coords"]["start_update"] = (
+                config[adapt]["coords"]["start"] - adaptator_length
+            )
+            config[adapt]["coords"]["stop_update"] = (
+                config[adapt]["coords"]["stop"] - adaptator_length
             )
-            config[adapt]['coords']['stop_update'] = (
-                config[adapt]['coords']['stop'] - adaptator_length)
     return config
 
 
@@ -525,17 +534,18 @@ def update_positions(config, adaptator, ntuple):
     params: barcode
     """
     adaptator_length = (
-        config[adaptator]['coords']['stop'] -
-        config[adaptator]['coords']['start']
+        config[adaptator]["coords"]["stop"] - config[adaptator]["coords"]["start"]
     ) + 1
     update_next = False
     for adapt in config:
         if update_next:
-            config = update_position(config=config,
-                                     adaptator=adaptator,
-                                     adapt=adapt,
-                                     adaptator_length=adaptator_length,
-                                     ntuple=ntuple)
+            config = update_position(
+                config=config,
+                adaptator=adaptator,
+                adapt=adapt,
+                adaptator_length=adaptator_length,
+                ntuple=ntuple,
+            )
         if adapt == adaptator:
             update_next = True
     return config
@@ -556,14 +566,16 @@ def remove_barcodes(reads, config, ntuple, verbose=False):
             print("error: remove_barcode(), reads is not of type Reads")
         raise ValueError
     for adaptator in config:
-        if (not adaptator == 'conditions' and
-                ntuple == config[adaptator]['coords']['reads']):
+        if (
+            not adaptator == "conditions"
+            and ntuple == config[adaptator]["coords"]["reads"]
+        ):
             reads = remove_barcode(
                 reads=reads,
                 config=config,
                 adaptator=adaptator,
                 ntuple=ntuple,
-                verbose=verbose
+                verbose=verbose,
             )
     return reads
 
@@ -578,10 +590,9 @@ def write_seq(reads, fout, config, ntuple, verbose=False):
     params: reads int()
     """
     try:
-        remove_barcodes(reads=reads,
-                        config=config,
-                        ntuple=ntuple,
-                        verbose=verbose).write(fout=fout)
+        remove_barcodes(
+            reads=reads, config=config, ntuple=ntuple, verbose=verbose
+        ).write(fout=fout)
     except IOError as err:
         print("error: write_seq() ")
         raise err
@@ -598,21 +609,24 @@ def write_seqs(reads_list, fouts, config, sample, umi_bol, verbose=False):
     """
     ntuple = 0
     if umi_bol:
-        umi = extract_barcode(reads_list[(config['UMI']['coords']['reads'])],
-                              config,
-                              'UMI',
-                              config['UMI']['coords']['reads'],
-                              verbose)
+        umi = extract_barcode(
+            reads_list[(config["UMI"]["coords"]["reads"])],
+            config,
+            "UMI",
+            config["UMI"]["coords"]["reads"],
+            verbose,
+        )
 
     for reads in reads_list:
         if umi_bol:
-            reads = write_umi_in_header(reads=reads,
-                                        umi=umi)
-        write_seq(reads=reads,
-                  fout=fouts[sample][ntuple],
-                  config=config,
-                  ntuple=ntuple,
-                  verbose=verbose)
+            reads = write_umi_in_header(reads=reads, umi=umi)
+        write_seq(
+            reads=reads,
+            fout=fouts[sample][ntuple],
+            config=config,
+            ntuple=ntuple,
+            verbose=verbose,
+        )
         ntuple += 1
 
 
@@ -636,21 +650,16 @@ def read_reads(fins, reads_list, ntuple, line_number):
     return reads_list
 
 
-def parse_ntuples_fastq(ffastqs,
-                        fouts,
-                        config,
-                        ntuple,
-                        umi_bol,
-                        mismatch=None,
-                        verbose=False):
+def parse_ntuples_fastq(
+    ffastqs, fouts, config, ntuple, umi_bol, mismatch=None, verbose=False
+):
     """
     process a fastq files
 
     params: ffastq a buffer of a fastq file
     params: config
     """
-    barcode_dictionary = create_barcode_dictionaries(config=config,
-                                                     mismatch=mismatch)
+    barcode_dictionary = create_barcode_dictionaries(config=config, mismatch=mismatch)
     sequences_number = 0
     line_number = 0
     reads_list = list()
@@ -659,7 +668,13 @@ def parse_ntuples_fastq(ffastqs,
 
     for read in ntuple:
         reads_list.append(Reads())
-    for list_ffastqs in zip(*ffastqs):
+    for list_ffastqs in tqdm(
+        zip(*ffastqs),
+        unit="lines",
+        unit_scale=True,
+        desc="Processing fastq(s)",
+        miniters=1000000,
+    ):
         reads_list = read_reads(
             fins=list_ffastqs,
             ntuple=ntuple,
@@ -667,17 +682,21 @@ def parse_ntuples_fastq(ffastqs,
             line_number=line_number,
         )
         if line_number == 3:
-            sample = assign_reads(reads_list=reads_list,
-                                  config=config,
-                                  barcode_dictionary=barcode_dictionary,
-                                  verbose=verbose,
-                                  bcd_dic_found=Bcd_dic_found)
-            write_seqs(reads_list=reads_list,
-                       fouts=fouts,
-                       config=config,
-                       sample=sample,
-                       umi_bol=umi_bol,
-                       verbose=verbose)
+            sample = assign_reads(
+                reads_list=reads_list,
+                config=config,
+                barcode_dictionary=barcode_dictionary,
+                verbose=verbose,
+                bcd_dic_found=Bcd_dic_found,
+            )
+            write_seqs(
+                reads_list=reads_list,
+                fouts=fouts,
+                config=config,
+                sample=sample,
+                umi_bol=umi_bol,
+                verbose=verbose,
+            )
 
             if sample in Samples:
                 Samples[sample] += 1
@@ -689,13 +708,14 @@ def parse_ntuples_fastq(ffastqs,
             line_number += 1
         sequences_number += 1
 
-    print("\n** Ending splitting at",\
-    time.strftime("%A %d %B %Y %H:%M:%S"),"**")
-    print("\nnumber of processed sequences: " +
-          str(int(sequences_number/4)) +
-          " x " +
-          str(len(ntuple)) +
-          " files : ")
+    print("\n** Ending splitting at", time.strftime("%A %d %B %Y %H:%M:%S"), "**")
+    print(
+        "\nnumber of processed sequences: "
+        + str(int(sequences_number / 4))
+        + " x "
+        + str(len(ntuple))
+        + " files : "
+    )
     for elmts in Samples:
         print(elmts, "\t", Samples[elmts], "reads")
     print("\nunassigned barcodes found : ")
@@ -715,16 +735,20 @@ def out_files(fastqs, condition, results_path):
         fastqs_out = list()
         for fastq in fastqs:
             fastq = os.path.split(fastq)[1]
-            fastqs_out.append(results_path + '/' + condition + '/' + fastq)
+            fastqs_out.append(results_path + "/" + condition + "/" + fastq)
             if os.path.isfile(fastqs_out[-1]):
-                error_msg = ("error: the file " +
-                             fastqs_out[-1] +
-                             " exists, and flexi_splitter is not going to" +
-                             " erase it for you")
-                print("error: the file " +
-                      fastqs_out[-1] +
-                      " exists, and flexi_splitter is not going to erase it" +
-                      " for you")
+                error_msg = (
+                    "error: the file "
+                    + fastqs_out[-1]
+                    + " exists, and flexi_splitter is not going to"
+                    + " erase it for you"
+                )
+                print(
+                    "error: the file "
+                    + fastqs_out[-1]
+                    + " exists, and flexi_splitter is not going to erase it"
+                    + " for you"
+                )
                 raise IOError(error_msg)
         return fastqs_out
     except Exception as err:
@@ -743,21 +767,21 @@ def open_output(fastqs, config, stack, results_path, gzed):
     """
     try:
         fouts = dict()
-        for condition in config['conditions']:
-            condition_path = results_path + '/' + condition
+        for condition in config["conditions"]:
+            condition_path = results_path + "/" + condition
             if not os.path.isdir(condition_path):
                 os.makedirs(condition_path)
-            fastqs_out = out_files(fastqs=fastqs,
-                                   condition=condition,
-                                   results_path=results_path)
+            fastqs_out = out_files(
+                fastqs=fastqs, condition=condition, results_path=results_path
+            )
 
             if gzed:
                 fouts[condition] = [
-                    stack.enter_context(gzopen(fastq, 'wt')) for fastq in fastqs_out
+                    stack.enter_context(gzopen(fastq, "wt")) for fastq in fastqs_out
                 ]
             else:
                 fouts[condition] = [
-                    stack.enter_context(open(fastq, 'w')) for fastq in fastqs_out
+                    stack.enter_context(open(fastq, "w")) for fastq in fastqs_out
                 ]
         return fouts
     except IOError as err:
@@ -778,7 +802,7 @@ def close_output(fouts, config):
     params: results_path
     """
     try:
-        for condition in config['conditions']:
+        for condition in config["conditions"]:
             for fout in fouts[condition]:
                 fout.close()
     except Exception as err:
@@ -786,14 +810,16 @@ def close_output(fouts, config):
         raise err
 
 
-def parse_ntuples_fastqs(fastqs,
-                         config,
-                         results_path,
-                         umi_bol,
-                         verbose=False,
-                         mismatch=None,
-                         ntuple_param=None,
-                         gzed=False):
+def parse_ntuples_fastqs(
+    fastqs,
+    config,
+    results_path,
+    umi_bol,
+    verbose=False,
+    mismatch=None,
+    ntuple_param=None,
+    gzed=False,
+):
     """
     process a list of fastq files
 
@@ -803,30 +829,27 @@ def parse_ntuples_fastqs(fastqs,
     try:
         with ExitStack() as stack:
             if gzed:
-                ffastqs = [
-                    stack.enter_context(
-                        gzopen(fastq, 'rt')) for fastq in fastqs
-                ]
+                ffastqs = [stack.enter_context(gzopen(fastq, "rt")) for fastq in fastqs]
             else:
-                ffastqs = [
-                    stack.enter_context(
-                        open(fastq, 'r')) for fastq in fastqs
-                ]
+                ffastqs = [stack.enter_context(open(fastq, "r")) for fastq in fastqs]
 
-            fouts = open_output(fastqs=fastqs,
-                                config=config,
-                                stack=stack,
-                                results_path=results_path,
-                                gzed=gzed)
-            parse_ntuples_fastq(ffastqs=ffastqs,
-                                fouts=fouts,
-                                config=config,
-                                verbose=verbose,
-                                mismatch=mismatch,
-                                ntuple=range(0, ntuple_param),
-                                umi_bol=umi_bol)
-            close_output(fouts=fouts,
-                         config=config)
+            fouts = open_output(
+                fastqs=fastqs,
+                config=config,
+                stack=stack,
+                results_path=results_path,
+                gzed=gzed,
+            )
+            parse_ntuples_fastq(
+                ffastqs=ffastqs,
+                fouts=fouts,
+                config=config,
+                verbose=verbose,
+                mismatch=mismatch,
+                ntuple=range(0, ntuple_param),
+                umi_bol=umi_bol,
+            )
+            close_output(fouts=fouts, config=config)
     except IOError as err:
         print("error: parse_ntuples_fastqs()")
         print(err)
@@ -836,9 +859,12 @@ def usage():
     """
     Print command line help
     """
-    print('usage : flexi_splitter -f <inputfile1[,inputfile2...,inputfileN]> \
--o <outputfolder> -c <configfile> [OPTIONS]\n')
-    print("mandatory parameters : \n\
+    print(
+        "usage : flexi_splitter -f <inputfile1[,inputfile2...,inputfileN]> \
+-o <outputfolder> -c <configfile> [OPTIONS]\n"
+    )
+    print(
+        "mandatory parameters : \n\
         -f, --fastqs   list of fastq files separated by a comma without \
 whitespace \n\
         -o, --ofolder  path to the output folder. Need to be empty or if not\n\
@@ -850,8 +876,8 @@ whitespace \n\
                        mismatches are allowed (n = adaptor length) \n\
         -n, --ntuple   number of matched files. If not set, flexi_splitter try\n\
                        to guess it from the config file\n\
-        --version      print flexi_splitter version ")
-
+        --version      print flexi_splitter version "
+    )
 
 
 def check_options(argv):
@@ -861,54 +887,63 @@ def check_options(argv):
     version = "1.0.2"
 
     parameters = dict()
-    parameters['verbose'] = False
-    parameters['ntuple'] = None
+    parameters["verbose"] = False
+    parameters["ntuple"] = None
 
     try:
-        opts, args = getopt.getopt(argv, "hvn:f:o:c:m:", ["help",
-                                                          "version",
-                                                          "fastqs=",
-                                                          "ofolder=",
-                                                          "config=",
-                                                          "verbose",
-                                                          "mismatch=",
-                                                          "ofolder=",
-                                                          "ntuple="])
+        opts, args = getopt.getopt(
+            argv,
+            "hvn:f:o:c:m:",
+            [
+                "help",
+                "version",
+                "fastqs=",
+                "ofolder=",
+                "config=",
+                "verbose",
+                "mismatch=",
+                "ofolder=",
+                "ntuple=",
+            ],
+        )
 
     except getopt.GetoptError:
-        print('error: check_options() invalid option')
+        print("error: check_options() invalid option")
         usage()
         raise getopt.GetoptError
 
     for elmts in opts:
-        if elmts[0] in ('-f', '--fastqs'):
-            parameters['inputfiles'] = elmts[1].split(',')
-        elif elmts[0] in ('-o', '--ofolder'):
-            parameters['outputfolder'] = elmts[1]
-        elif elmts[0] in ('-c', '--config'):
-            parameters['config'] = elmts[1]
-        elif elmts[0] in ('-v', '--verbose'):
-            parameters['verbose'] = True
-        elif elmts[0] in ('-m', '--mismatch'):
-            parameters['mismatch'] = elmts[1]
-            print("mismatch allowed : " + parameters['mismatch'])
-        elif elmts[0] in ('-n', '--ntuple'):
-            parameters['ntuple'] = int(elmts[1])
-        elif elmts[0] in ('--version'):
+        if elmts[0] in ("-f", "--fastqs"):
+            parameters["inputfiles"] = elmts[1].split(",")
+        elif elmts[0] in ("-o", "--ofolder"):
+            parameters["outputfolder"] = elmts[1]
+        elif elmts[0] in ("-c", "--config"):
+            parameters["config"] = elmts[1]
+        elif elmts[0] in ("-v", "--verbose"):
+            parameters["verbose"] = True
+        elif elmts[0] in ("-m", "--mismatch"):
+            parameters["mismatch"] = elmts[1]
+            print("mismatch allowed : " + parameters["mismatch"])
+        elif elmts[0] in ("-n", "--ntuple"):
+            parameters["ntuple"] = int(elmts[1])
+        elif elmts[0] in ("--version"):
             print("flexi_splitter", version)
             exit(0)
-        elif elmts[0] in ('-h', '--help'):
+        elif elmts[0] in ("-h", "--help"):
             usage()
             exit(0)
 
-    if (parameters['inputfiles'][0].split('.')[-1] == 'gz' and
-            parameters['inputfiles'][0].split('.')[-2] == 'fastq'):
-        parameters['gzed'] = True
-    elif parameters['inputfiles'][0].split('.')[-1] == 'fastq':
-        parameters['gzed'] = False
+    if (
+        parameters["inputfiles"][0].split(".")[-1] == "gz"
+        and parameters["inputfiles"][0].split(".")[-2] == "fastq"
+    ):
+        parameters["gzed"] = True
+    elif parameters["inputfiles"][0].split(".")[-1] == "fastq":
+        parameters["gzed"] = False
     else:
-        print("Error : unknow file format : " +
-              parameters['inputfiles'][0].split('.')[-1])
+        print(
+            "Error : unknow file format : " + parameters["inputfiles"][0].split(".")[-1]
+        )
         usage()
 
     return parameters
@@ -921,10 +956,7 @@ def check_files(outputfolder, inputfile, configfile):
     print("\n** Checking input and output files **")
     for elmts in inputfile:
         if not os.path.exists(elmts):
-            print("error: check_files() " +
-                  elmts +
-                  " file doesn't exist"
-                  )
+            print("error: check_files() " + elmts + " file doesn't exist")
             usage()
             raise IOError
 
@@ -937,9 +969,9 @@ def check_files(outputfolder, inputfile, configfile):
         usage()
         raise IOError
 
-    print('\nInput file: ', inputfile)
-    print('Output folder: ', outputfolder)
-    print('Config file: ', configfile)
+    print("\nInput file: ", inputfile)
+    print("Output folder: ", outputfolder)
+    print("Config file: ", configfile)
 
 
 def check_configfile(config, umi_bol):
@@ -948,21 +980,20 @@ def check_configfile(config, umi_bol):
     """
     print("\n** Checking config file **")
     try:
-        config['conditions']
+        config["conditions"]
     except KeyError:
-        print("error: check_configfile() no conditions section " +
-              "in the config file")
+        print("error: check_configfile() no conditions section " + "in the config file")
         raise KeyError
 
-    print("found ", len(config)-1, "adatators: ")
+    print("found ", len(config) - 1, "adatators: ")
 
     for adpt in config:
-        if (adpt not in ['UMI', 'conditions']):
+        if adpt not in ["UMI", "conditions"]:
             print("\t" + adpt + " :", len(config[adpt]["samples"]), "barcodes")
-        elif adpt == 'UMI':
-            print("\t" + 'UMI')
+        elif adpt == "UMI":
+            print("\t" + "UMI")
 
-    print("\nfound ", len(config['conditions'])-1, "samples")
+    print("\nfound ", len(config["conditions"]) - 1, "samples")
     print("\nusing UMI : ", umi_bol)
 
 
@@ -985,47 +1016,51 @@ def main(argv=None):
     """
     check_files
     """
-    check_files(outputfolder=parameters['outputfolder'],
-                inputfile=parameters['inputfiles'],
-                configfile=parameters['config'])
+    check_files(
+        outputfolder=parameters["outputfolder"],
+        inputfile=parameters["inputfiles"],
+        configfile=parameters["config"],
+    )
 
     """
     load the config file
     """
-    config = load_yaml(parameters['config'])
+    config = load_yaml(parameters["config"])
 
-    if parameters['ntuple'] is None:
-        parameters['ntuple'] = list_reads_number(config)
+    if parameters["ntuple"] is None:
+        parameters["ntuple"] = list_reads_number(config)
 
     umi_bol = False
     for adpt in config:
-        if adpt == 'UMI':
+        if adpt == "UMI":
             umi_bol = True
 
     """
     test if config file is OK
     """
-    check_configfile(config=config,
-                     umi_bol=umi_bol)
+    check_configfile(config=config, umi_bol=umi_bol)
 
     """
     main function
     """
 
-    if 'mismatch' not in parameters:
-        parameters['mismatch'] = None
+    if "mismatch" not in parameters:
+        parameters["mismatch"] = None
     else:
-        parameters['mismatch'] = int(parameters['mismatch'])
-    print("\n** Starting splitting file  at",\
-    time.strftime("%A %d %B %Y %H:%M:%S"),"**")
-    parse_ntuples_fastqs(fastqs=parameters['inputfiles'],
-                         config=config,
-                         results_path=parameters['outputfolder'],
-                         verbose=parameters['verbose'],
-                         mismatch=parameters['mismatch'],
-                         ntuple_param=parameters['ntuple'],
-                         gzed=parameters['gzed'],
-                         umi_bol=umi_bol)
+        parameters["mismatch"] = int(parameters["mismatch"])
+    print(
+        "\n** Starting splitting file  at", time.strftime("%A %d %B %Y %H:%M:%S"), "**"
+    )
+    parse_ntuples_fastqs(
+        fastqs=parameters["inputfiles"],
+        config=config,
+        results_path=parameters["outputfolder"],
+        verbose=parameters["verbose"],
+        mismatch=parameters["mismatch"],
+        ntuple_param=parameters["ntuple"],
+        gzed=parameters["gzed"],
+        umi_bol=umi_bol,
+    )
 
 
 if __name__ == "__main__":
diff --git a/src/flexi_splitter/utils/suffix_tree.py b/src/flexi_splitter/suffix_tree.py
similarity index 79%
rename from src/flexi_splitter/utils/suffix_tree.py
rename to src/flexi_splitter/suffix_tree.py
index cfe8320a4ca197b6bc015229e7d5c6b2dae6f949..74babeee74ae34e327a74532ba0fad3cd0b84a7b 100644
--- a/src/flexi_splitter/utils/suffix_tree.py
+++ b/src/flexi_splitter/suffix_tree.py
@@ -12,7 +12,7 @@ def error_proba(phred):
     params: phred int()
     return: proba double()
     """
-    return 10 ** ((-phred)/10)
+    return 10 ** ((-phred) / 10)
 
 
 def distance(qual, pos):
@@ -76,8 +76,8 @@ class Node:
         """
         base = seq[pos]
         if base in self.childs:
-            if self[base].barcode is None and len(seq) > pos+1:
-                return self[base].get_barcode(seq=seq, pos=pos+1)
+            if self[base].barcode is None and len(seq) > pos + 1:
+                return self[base].get_barcode(seq=seq, pos=pos + 1)
             if self[base].barcode is not None:
                 return (self[base].barcode, pos, None)
         return (None, pos, self)
@@ -88,8 +88,7 @@ class Node:
         """
         base = list(self.childs.keys())[0]
         if self[base].barcode is None:
-            return (base +
-                    str(self[base]))
+            return base + str(self[base])
         return base
 
 
@@ -137,12 +136,7 @@ class Tree:
         return: cache bool()
         """
         try:
-            self.crawler.search_reads(
-                seq=seq,
-                qual=qual,
-                cache=cache,
-                verbose=verbose
-            )
+            self.crawler.search_reads(seq=seq, qual=qual, cache=cache, verbose=verbose)
             if verbose:
                 print(self.crawler.barcode)
             if self.crawler.barcode is None:
@@ -176,16 +170,21 @@ class TreeCrawler:
         Multiply the barcode search in case of mismatch
         """
         if verbose:
-            print((pos, self.seq[pos], curr_node.base,
-                   list(curr_node.childs.keys()), dist, curr_node.barcode))
-        if len(self.seq) > pos+1:
+            print(
+                (
+                    pos,
+                    self.seq[pos],
+                    curr_node.base,
+                    list(curr_node.childs.keys()),
+                    dist,
+                    curr_node.barcode,
+                )
+            )
+        if len(self.seq) > pos + 1:
             # we search with n mismatch
             for base in curr_node.childs.keys():
                 curr_dist = dist
-                search_result = curr_node[base].get_barcode(
-                    seq=self.seq,
-                    pos=pos + 1
-                )
+                search_result = curr_node[base].get_barcode(seq=self.seq, pos=pos + 1)
                 if search_result[0] is not None:
                     curr_dist += search_result[1] - pos
                     self.dists.append(curr_dist)
@@ -200,7 +199,7 @@ class TreeCrawler:
                         curr_node=curr_node[base],
                         pos=pos + 1,
                         dist=curr_dist,
-                        verbose=verbose
+                        verbose=verbose,
                     )
 
     def search_reads(self, seq, qual, cache=True, verbose=False):
@@ -215,35 +214,31 @@ class TreeCrawler:
         self.qual = qual
         if len(self.seq) != self.tree.size:
             if verbose:
-                print("error: TreeCrawler.search_read() seq size (" +
-                      str(len(self.seq)) +
-                      ") different from tree size (" +
-                      str(self.tree.size) +
-                      ")")
+                print(
+                    "error: TreeCrawler.search_read() seq size ("
+                    + str(len(self.seq))
+                    + ") different from tree size ("
+                    + str(self.tree.size)
+                    + ")"
+                )
             raise IndexError
         if len(self.qual) != self.tree.size:
             if verbose:
-                print("error: TreeCrawler.search_read() qual size (" +
-                      str(len(self.qual)) +
-                      ") different from tree size (" +
-                      str(self.tree.size) +
-                      ")")
+                print(
+                    "error: TreeCrawler.search_read() qual size ("
+                    + str(len(self.qual))
+                    + ") different from tree size ("
+                    + str(self.tree.size)
+                    + ")"
+                )
             raise IndexError
 
-        self.barcode, pos, curr_node = self.tree.root.get_barcode(
-            seq=self.seq,
-            pos=0
-        )
+        self.barcode, pos, curr_node = self.tree.root.get_barcode(seq=self.seq, pos=0)
         if self.barcode is None:
             if self.mismatch is not None:
                 self.mismatch -= 1
             dist = distance(qual=self.qual, pos=pos) + pos
-            self.split_search(
-                curr_node=curr_node,
-                pos=pos,
-                dist=dist,
-                verbose=verbose
-            )
+            self.split_search(curr_node=curr_node, pos=pos, dist=dist, verbose=verbose)
             if verbose:
                 print((self.barcodes, self.dists))
             if self.barcodes:
@@ -251,10 +246,7 @@ class TreeCrawler:
                 min_dist_index = self.dists.index(min_dist)
                 self.barcode = self.barcodes[min_dist_index]
                 if cache:
-                    self.tree.add_sequence(
-                        sequence=self.seq,
-                        barcode=self.barcode
-                    )
+                    self.tree.add_sequence(sequence=self.seq, barcode=self.barcode)
                 if self.mismatch is not None:
                     if self.mismatch < 0:
                         self.barcode = None
@@ -264,6 +256,7 @@ class Forest:
     """
     Forest of suffixtree
     """
+
     def __init__(self, mismatch=None):
         """
         Initialisation of a Forest
@@ -285,13 +278,9 @@ class Forest:
         """
         if adaptator not in self.adaptators:
             self.adaptators[adaptator] = Tree(mismatch=self.mismatch)
-        self.adaptators[adaptator].add_sequence(
-            sequence=sequence,
-            barcode=barcode
-        )
+        self.adaptators[adaptator].add_sequence(sequence=sequence, barcode=barcode)
 
-    def search_reads(self, adaptator, seq, qual,
-                     cache=True, verbose=False):
+    def search_reads(self, adaptator, seq, qual, cache=True, verbose=False):
         """
         Function to search a barcode in the forest
 
@@ -303,10 +292,7 @@ class Forest:
         if adaptator in self.adaptators:
             try:
                 return self.adaptators[adaptator].search_reads(
-                    seq=seq,
-                    qual=qual,
-                    cache=cache,
-                    verbose=verbose
+                    seq=seq, qual=qual, cache=cache, verbose=verbose
                 )
             except IndexError:
                 if verbose:
diff --git a/src/flexi_splitter/tests/__init__.py b/src/flexi_splitter/tests/__init__.py
index 1e9d5162dba6502375d887d54dd372592b9b58a9..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644
--- a/src/flexi_splitter/tests/__init__.py
+++ b/src/flexi_splitter/tests/__init__.py
@@ -1,8 +0,0 @@
-#!/usr/bin/env python3
-# -*-coding:Utf-8 -*
-
-"""
-This module provides unitary tests for the project
-"""
-
-__all__ = ["flexi_splitter_test", "suffix_tree_test", "data_test"]
diff --git a/src/flexi_splitter/tests/flexi_splitter_test.py b/src/flexi_splitter/tests/flexi_splitter_test.py
index 9639d2c08c11b4a5babecef790dab27486fdb8b5..a3c29ce351602851265e0f3929612b1107c2b4ee 100644
--- a/src/flexi_splitter/tests/flexi_splitter_test.py
+++ b/src/flexi_splitter/tests/flexi_splitter_test.py
@@ -8,53 +8,48 @@ This module provides unitary tests for the flexi_splitter project
 import os
 import sys
 
+sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
 
-SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
-sys.path.append(os.path.dirname(SCRIPT_DIR))
 
-import unittest
 import copy
+import unittest
+
 import yaml
-from flexi_splitter import flexi_splitter
 from tests import data_test
 
+from flexi_splitter import flexi_splitter
+
 
 class ReadsClassTest(unittest.TestCase):
     """
     all the tests for the Reads class
     """
+
     def test_init(self):
         """
         all the tests on loading the config yaml file
         """
-        self.assertEqual(
-            str(data_test.Reads_paired_1),
-            data_test.read_paired_1
-        )
+        self.assertEqual(str(data_test.Reads_paired_1), data_test.read_paired_1)
 
     def test_write(self):
         """
         all the tests on loading the config yaml file
         """
-        self.assertEqual(
-            str(data_test.Reads_paired_1),
-            data_test.read_paired_1
-        )
-
+        self.assertEqual(str(data_test.Reads_paired_1), data_test.read_paired_1)
 
 
 class ConfigLoadTest(unittest.TestCase):
     """
     all the tests for the fonctions loading the configuration
     """
+
     def test_loading_file(self):
         """
         all the tests on loading the config yaml file
         """
         self.assertEqual(
-            flexi_splitter.load_yaml(
-                path="flexi_splitter/tests/data/toy_file.yaml"),
-            data_test.CONFIG_TOY
+            flexi_splitter.load_yaml(path="flexi_splitter/tests/data/toy_file.yaml"),
+            data_test.CONFIG_TOY,
         )
 
     def test_loading_file_yamlerror(self):
@@ -63,7 +58,8 @@ class ConfigLoadTest(unittest.TestCase):
         """
         try:
             flexi_splitter.load_yaml(
-                path="flexi_splitter/tests/data/RNA_seq_sub1.fastq")
+                path="flexi_splitter/tests/data/RNA_seq_sub1.fastq"
+            )
         except yaml.YAMLError:
             self.assertEqual(1, 1)
 
@@ -71,18 +67,22 @@ class ConfigLoadTest(unittest.TestCase):
         """
         test on the adaptator position extraction
         """
-        pos_object = {'reads': 0,
-                      'start': 6,
-                      'start_update': 6,
-                      'stop': 13,
-                      'stop_update': 13,
-                      'header': False}
+        pos_object = {
+            "reads": 0,
+            "start": 6,
+            "start_update": 6,
+            "stop": 13,
+            "stop_update": 13,
+            "header": False,
+        }
         self.assertEqual(
             flexi_splitter.extract_pos(
                 config=flexi_splitter.load_yaml(
-                    path="flexi_splitter/tests/data/toy_file.yaml"),
-                adaptator="RT"),
-            pos_object
+                    path="flexi_splitter/tests/data/toy_file.yaml"
+                ),
+                adaptator="RT",
+            ),
+            pos_object,
         )
 
     def test_list_adaptator_barcode(self):
@@ -92,14 +92,13 @@ class ConfigLoadTest(unittest.TestCase):
         self.assertEqual(
             flexi_splitter.list_adaptator_barcode(
                 config=flexi_splitter.load_yaml(
-                    path="flexi_splitter/tests/data/toy_file.yaml"),
+                    path="flexi_splitter/tests/data/toy_file.yaml"
+                ),
                 adaptator="RT",
-                ntuple=0
+                ntuple=0,
             ),
-            {"RT1": "TAGTGCC",
-             "RT2": "GCTACCC",
-             "RT3": "ATCGACC",
-             "RT4": "CGACTCC"})
+            {"RT1": "TAGTGCC", "RT2": "GCTACCC", "RT3": "ATCGACC", "RT4": "CGACTCC"},
+        )
 
     def test_list_adaptator_barcode_error(self):
         """
@@ -108,9 +107,11 @@ class ConfigLoadTest(unittest.TestCase):
         try:
             flexi_splitter.list_adaptator_barcode(
                 config=flexi_splitter.load_yaml(
-                    path="flexi_splitter/tests/data/toy_file.yaml"),
+                    path="flexi_splitter/tests/data/toy_file.yaml"
+                ),
                 adaptator="RT",
-                ntuple=3)
+                ntuple=3,
+            )
         except KeyError:
             self.assertEqual(1, 1)
 
@@ -119,16 +120,16 @@ class ReadsReadTest(unittest.TestCase):
     """
     all the tests for reading the sequences
     """
+
     def test_adaptator_barcode_error(self):
         """
         test barcode error
         """
         try:
             flexi_splitter.test_adaptator(
-                flexi_splitter.load_yaml(
-                    "flexi_splitter/tests/data/toy_file.yaml"),
+                flexi_splitter.load_yaml("flexi_splitter/tests/data/toy_file.yaml"),
                 "PCT",
-                1
+                1,
             )
         except KeyError:
             self.assertEqual(1, 1)
@@ -139,17 +140,7 @@ class ReadsReadTest(unittest.TestCase):
         """
         try:
             flexi_splitter.test_adaptator(
-                {
-                    'RT': {
-                        'coords2': {
-                            'reads': 1,
-                            'stop': 13,
-                            'header': False
-                        }
-                    }
-                },
-                "RT",
-                0
+                {"RT": {"coords2": {"reads": 1, "stop": 13, "header": False}}}, "RT", 0
             )
         except KeyError:
             self.assertEqual(1, 1)
@@ -160,17 +151,7 @@ class ReadsReadTest(unittest.TestCase):
         """
         try:
             flexi_splitter.test_adaptator(
-                {
-                    'RT': {
-                        'coords': {
-                            'reads': 1,
-                            'stop': 13,
-                            'header': False
-                        }
-                    }
-                },
-                "RT",
-                0
+                {"RT": {"coords": {"reads": 1, "stop": 13, "header": False}}}, "RT", 0
             )
         except KeyError:
             self.assertEqual(1, 1)
@@ -181,17 +162,7 @@ class ReadsReadTest(unittest.TestCase):
         """
         try:
             flexi_splitter.test_adaptator(
-                {
-                    'RT': {
-                        'coords': {
-                            'reads': 1,
-                            'start': 6,
-                            'header': False
-                        }
-                    }
-                },
-                "RT",
-                0
+                {"RT": {"coords": {"reads": 1, "start": 6, "header": False}}}, "RT", 0
             )
         except KeyError:
             self.assertEqual(1, 1)
@@ -202,17 +173,7 @@ class ReadsReadTest(unittest.TestCase):
         """
         try:
             flexi_splitter.test_adaptator(
-                {
-                    'RT': {
-                        'coords': {
-                            'start': 6,
-                            'stop': 13,
-                            'header': False
-                        }
-                    }
-                },
-                "RT",
-                0
+                {"RT": {"coords": {"start": 6, "stop": 13, "header": False}}}, "RT", 0
             )
         except KeyError:
             self.assertEqual(1, 1)
@@ -224,17 +185,12 @@ class ReadsReadTest(unittest.TestCase):
         try:
             flexi_splitter.test_adaptator(
                 {
-                    'RT': {
-                        'coords': {
-                            'reads': 1,
-                            'start': 6,
-                            'stop': 13,
-                            'header': False
-                        }
+                    "RT": {
+                        "coords": {"reads": 1, "start": 6, "stop": 13, "header": False}
                     }
                 },
                 "RT",
-                2
+                2,
             )
         except ValueError:
             self.assertEqual(1, 1)
@@ -246,11 +202,9 @@ class ReadsReadTest(unittest.TestCase):
         reads_test = copy.deepcopy(data_test.Reads_single)
         self.assertEqual(
             flexi_splitter.extract_barcode_pos(
-                reads=reads_test,
-                start=0,
-                stop=5,
-                header=False)['seq'],
-            data_test.umi_barcode_single
+                reads=reads_test, start=0, stop=5, header=False
+            )["seq"],
+            data_test.umi_barcode_single,
         )
 
     def test_extract_barcode_pos_header(self):
@@ -260,11 +214,9 @@ class ReadsReadTest(unittest.TestCase):
         reads_test = copy.deepcopy(data_test.Reads_single)
         self.assertEqual(
             flexi_splitter.extract_barcode_pos(
-                reads=reads_test,
-                start=1,
-                stop=3,
-                header=True)['seq'],
-            "AGT"
+                reads=reads_test, start=1, stop=3, header=True
+            )["seq"],
+            "AGT",
         )
 
     def test_extract_barcode_rt_from_pos(self):
@@ -274,11 +226,9 @@ class ReadsReadTest(unittest.TestCase):
         reads_test = copy.deepcopy(data_test.Reads_single)
         self.assertEqual(
             flexi_splitter.extract_barcode_pos(
-                reads=reads_test,
-                start=6,
-                stop=13,
-                header=False)['seq'],
-            data_test.RT_barcode_single
+                reads=reads_test, start=6, stop=13, header=False
+            )["seq"],
+            data_test.RT_barcode_single,
         )
 
     def test_extract_barcode_pcr_from_pos(self):
@@ -287,11 +237,8 @@ class ReadsReadTest(unittest.TestCase):
         """
         reads_test = copy.deepcopy(data_test.Reads_single)
         self.assertEqual(
-            flexi_splitter.extract_barcode_pos(reads_test,
-                                             0,
-                                             5,
-                                             True)['seq'],
-            data_test.PCR_barcode_single
+            flexi_splitter.extract_barcode_pos(reads_test, 0, 5, True)["seq"],
+            data_test.PCR_barcode_single,
         )
 
     def test_extract_barcode_rt(self):
@@ -303,11 +250,13 @@ class ReadsReadTest(unittest.TestCase):
             flexi_splitter.extract_barcode(
                 reads=reads_test,
                 config=flexi_splitter.load_yaml(
-                    path="flexi_splitter/tests/data/toy_file.yaml"),
+                    path="flexi_splitter/tests/data/toy_file.yaml"
+                ),
                 adaptator="RT",
                 ntuple=0,
-                verbose=True)['seq'],
-            data_test.RT_barcode_single
+                verbose=True,
+            )["seq"],
+            data_test.RT_barcode_single,
         )
 
     def test_extract_barcode_pcr(self):
@@ -319,11 +268,12 @@ class ReadsReadTest(unittest.TestCase):
             flexi_splitter.extract_barcode(
                 reads=reads_test,
                 config=flexi_splitter.load_yaml(
-                    path="flexi_splitter/tests/data/toy_file.yaml"),
+                    path="flexi_splitter/tests/data/toy_file.yaml"
+                ),
                 adaptator="PCR",
-                ntuple=0
-            )['seq'],
-            data_test.PCR_barcode_single
+                ntuple=0,
+            )["seq"],
+            data_test.PCR_barcode_single,
         )
 
     def test_extract_barcode_error(self):
@@ -333,8 +283,10 @@ class ReadsReadTest(unittest.TestCase):
         try:
             flexi_splitter.extract_pos(
                 flexi_splitter.load_yaml(
-                    path="flexi_splitter/tests/data/toy_file.yaml"),
-                "PCT")
+                    path="flexi_splitter/tests/data/toy_file.yaml"
+                ),
+                "PCT",
+            )
         except KeyError:
             self.assertEqual(1, 1)
 
@@ -349,16 +301,12 @@ class ModifyReadTest(unittest.TestCase):
         test writting umi in header
         """
         reads_test = copy.deepcopy(data_test.Reads_single)
-        umi = flexi_splitter.extract_barcode(reads=reads_test,
-                              config=data_test.CONFIG_TOY,
-                              adaptator='UMI',
-                              ntuple=0)
+        umi = flexi_splitter.extract_barcode(
+            reads=reads_test, config=data_test.CONFIG_TOY, adaptator="UMI", ntuple=0
+        )
         self.assertEqual(
-            flexi_splitter.write_umi_in_header(
-                reads=reads_test,
-                umi=umi
-            ).header,
-            data_test.Reads_umi_single.header
+            flexi_splitter.write_umi_in_header(reads=reads_test, umi=umi).header,
+            data_test.Reads_umi_single.header,
         )
 
     def test_remove_barcode_umi_pos(self):
@@ -370,27 +318,21 @@ class ModifyReadTest(unittest.TestCase):
         reads_test3 = copy.deepcopy(data_test.Reads_single)
         self.assertEqual(
             flexi_splitter.remove_barcode_pos(
-                reads=reads_test,
-                start=0,
-                stop=5,
-                header=False).seq,
-            data_test.Reads_single_noumi.seq
+                reads=reads_test, start=0, stop=5, header=False
+            ).seq,
+            data_test.Reads_single_noumi.seq,
         )
         self.assertEqual(
             flexi_splitter.remove_barcode_pos(
-                reads=reads_test2,
-                start=0,
-                stop=5,
-                header=False).header,
-            data_test.Reads_single_noumi.header
+                reads=reads_test2, start=0, stop=5, header=False
+            ).header,
+            data_test.Reads_single_noumi.header,
         )
         self.assertEqual(
             flexi_splitter.remove_barcode_pos(
-                reads=reads_test3,
-                start=0,
-                stop=5,
-                header=False).qual,
-            data_test.Reads_single_noumi.qual
+                reads=reads_test3, start=0, stop=5, header=False
+            ).qual,
+            data_test.Reads_single_noumi.qual,
         )
 
     def test_remove_barcode_rt_pos_seq(self):
@@ -400,11 +342,9 @@ class ModifyReadTest(unittest.TestCase):
         reads_test = copy.deepcopy(data_test.Reads_single)
         self.assertEqual(
             flexi_splitter.remove_barcode_pos(
-                reads=reads_test,
-                start=6,
-                stop=13,
-                header=False).seq,
-            data_test.Reads_single_noRT.seq
+                reads=reads_test, start=6, stop=13, header=False
+            ).seq,
+            data_test.Reads_single_noRT.seq,
         )
 
     def test_remove_barcode_rt_pos_description(self):
@@ -414,11 +354,9 @@ class ModifyReadTest(unittest.TestCase):
         reads_test = copy.deepcopy(data_test.Reads_single)
         self.assertEqual(
             flexi_splitter.remove_barcode_pos(
-                reads=reads_test,
-                start=6,
-                stop=13,
-                header=False).header,
-            data_test.Reads_single_noRT.header
+                reads=reads_test, start=6, stop=13, header=False
+            ).header,
+            data_test.Reads_single_noRT.header,
         )
 
     def test_remove_barcode_rt_pos_qual(self):
@@ -428,11 +366,9 @@ class ModifyReadTest(unittest.TestCase):
         reads_test = copy.deepcopy(data_test.Reads_single)
         self.assertEqual(
             flexi_splitter.remove_barcode_pos(
-                reads=reads_test,
-                start=6,
-                stop=13,
-                header=False).qual,
-            data_test.Reads_single_noRT.qual
+                reads=reads_test, start=6, stop=13, header=False
+            ).qual,
+            data_test.Reads_single_noRT.qual,
         )
 
     def test_remove_barcode_pos_header(self):
@@ -442,11 +378,9 @@ class ModifyReadTest(unittest.TestCase):
         reads_test = copy.deepcopy(data_test.Reads_single)
         self.assertEqual(
             flexi_splitter.remove_barcode_pos(
-                reads=reads_test,
-                start=1,
-                stop=3,
-                header=True).header,
-            "K00201:182:HM3TMBBXX:6:2228:17706:1226 1:N:0:NCG"
+                reads=reads_test, start=1, stop=3, header=True
+            ).header,
+            "K00201:182:HM3TMBBXX:6:2228:17706:1226 1:N:0:NCG",
         )
 
     def test_remove_barcode(self):
@@ -456,12 +390,9 @@ class ModifyReadTest(unittest.TestCase):
         reads_test = copy.deepcopy(data_test.Reads_single)
         self.assertEqual(
             flexi_splitter.remove_barcode(
-                reads=reads_test,
-                config=data_test.CONFIG_TOY,
-                adaptator="RT",
-                ntuple=0
+                reads=reads_test, config=data_test.CONFIG_TOY, adaptator="RT", ntuple=0
             ).seq,
-            data_test.Reads_single_noRT.seq
+            data_test.Reads_single_noRT.seq,
         )
 
     def test_update_position(self):
@@ -469,16 +400,18 @@ class ModifyReadTest(unittest.TestCase):
         test update_position function
         """
         config_rt_update = copy.deepcopy(data_test.CONFIG_TOY)
-        config_rt_update['RT']['coords']['start_update'] = 0
-        config_rt_update['RT']['coords']['stop_update'] = 7
+        config_rt_update["RT"]["coords"]["start_update"] = 0
+        config_rt_update["RT"]["coords"]["stop_update"] = 7
         self.maxDiff = None
         self.assertEqual(
-            flexi_splitter.update_position(config = data_test.CONFIG_TOY,
-                                         adaptator = 'UMI',
-                                         adapt = 'RT',
-                                         adaptator_length = 6,
-                                         ntuple = 0),
-            config_rt_update
+            flexi_splitter.update_position(
+                config=data_test.CONFIG_TOY,
+                adaptator="UMI",
+                adapt="RT",
+                adaptator_length=6,
+                ntuple=0,
+            ),
+            config_rt_update,
         )
 
     def test_update_config(self):
@@ -486,17 +419,14 @@ class ModifyReadTest(unittest.TestCase):
         test position update after removing a barcode
         """
         config_rt_update = copy.deepcopy(data_test.CONFIG_TOY)
-        config_rt_update['RT']['coords']['start_update'] = 0
-        config_rt_update['RT']['coords']['stop_update'] = 7
+        config_rt_update["RT"]["coords"]["start_update"] = 0
+        config_rt_update["RT"]["coords"]["stop_update"] = 7
         self.maxDiff = None
         self.assertEqual(
             flexi_splitter.update_positions(
-                config=data_test.CONFIG_TOY,
-                adaptator="UMI",
-                ntuple=0
+                config=data_test.CONFIG_TOY, adaptator="UMI", ntuple=0
             ),
-            flexi_splitter.load_yaml(
-                path="flexi_splitter/tests/data/toy_file.yaml")
+            flexi_splitter.load_yaml(path="flexi_splitter/tests/data/toy_file.yaml"),
         )
 
     def test_update_config2(self):
@@ -504,13 +434,12 @@ class ModifyReadTest(unittest.TestCase):
         test position update after removing a barcode
         """
         config = flexi_splitter.load_yaml(
-            path="flexi_splitter/tests/data/toy_file.yaml")
-        barcode_dic = flexi_splitter.create_barcode_dictionaries(
-            config=config
+            path="flexi_splitter/tests/data/toy_file.yaml"
         )
+        barcode_dic = flexi_splitter.create_barcode_dictionaries(config=config)
         config_rt_update = copy.deepcopy(data_test.CONFIG_TOY)
-        config_rt_update['RT']['coords']['start_update'] = 0
-        config_rt_update['RT']['coords']['stop_update'] = 7
+        config_rt_update["RT"]["coords"]["start_update"] = 0
+        config_rt_update["RT"]["coords"]["stop_update"] = 7
         self.maxDiff = None
         reads_test = copy.deepcopy(data_test.Reads_single)
         reads_test2 = copy.deepcopy(data_test.Reads_single)
@@ -518,20 +447,18 @@ class ModifyReadTest(unittest.TestCase):
             flexi_splitter.match_barcode(
                 reads=reads_test,
                 config=flexi_splitter.update_positions(
-                    config=data_test.CONFIG_TOY,
-                    adaptator="UMI",
-                    ntuple=0
+                    config=data_test.CONFIG_TOY, adaptator="UMI", ntuple=0
                 ),
                 adaptator="PCR",
                 ntuple=0,
-                barcode_dictionary=barcode_dic
+                barcode_dictionary=barcode_dic,
             ),
             flexi_splitter.match_barcode(
                 reads=reads_test2,
                 config=data_test.CONFIG_TOY,
                 adaptator="PCR",
                 ntuple=0,
-                barcode_dictionary=barcode_dic
+                barcode_dictionary=barcode_dic,
             ),
         )
 
@@ -546,8 +473,9 @@ class ModifyReadTest(unittest.TestCase):
                 ntuple=0,
                 config=data_test.CONFIG_TOY,
             ).seq,
-            data_test.Reads_trim_single.seq
+            data_test.Reads_trim_single.seq,
         )
+
     def test_remove_barcodes_full(self):
         """
         test removing rt with config
@@ -559,7 +487,7 @@ class ModifyReadTest(unittest.TestCase):
                 ntuple=0,
                 config=data_test.CONFIG_TOY,
             ).write(sys.stdout),
-            data_test.Reads_fully_trimmed.write(sys.stdout)
+            data_test.Reads_fully_trimmed.write(sys.stdout),
         )
 
 
@@ -567,15 +495,15 @@ class SeachBarcodeTest(unittest.TestCase):
     """
     Tests function that search for barcode in reads
     """
+
     def test_barcode_search(self):
         """
         test search sample from barcode
         """
         config = flexi_splitter.load_yaml(
-            path="flexi_splitter/tests/data/toy_file.yaml")
-        barcode_dic = flexi_splitter.create_barcode_dictionaries(
-            config=config
+            path="flexi_splitter/tests/data/toy_file.yaml"
         )
+        barcode_dic = flexi_splitter.create_barcode_dictionaries(config=config)
         reads_test = copy.deepcopy(data_test.Reads_single)
         self.assertEqual(
             flexi_splitter.match_barcode(
@@ -583,9 +511,9 @@ class SeachBarcodeTest(unittest.TestCase):
                 config=config,
                 adaptator="PCR",
                 ntuple=0,
-                barcode_dictionary=barcode_dic
+                barcode_dictionary=barcode_dic,
             ),
-            "PCR1"
+            "PCR1",
         )
 
     def test_barcode_search_error(self):
@@ -593,10 +521,9 @@ class SeachBarcodeTest(unittest.TestCase):
         test search sample from barcode
         """
         config = flexi_splitter.load_yaml(
-            path="flexi_splitter/tests/data/toy_file.yaml")
-        barcode_dic = flexi_splitter.create_barcode_dictionaries(
-            config=config
+            path="flexi_splitter/tests/data/toy_file.yaml"
         )
+        barcode_dic = flexi_splitter.create_barcode_dictionaries(config=config)
         reads_test = copy.deepcopy(data_test.Reads_single)
         try:
             flexi_splitter.match_barcode(
@@ -605,7 +532,7 @@ class SeachBarcodeTest(unittest.TestCase):
                 adaptator="PCT",
                 ntuple=0,
                 barcode_dictionary=barcode_dic,
-                verbose=True
+                verbose=True,
             )
         except KeyError:
             self.assertEqual(1, 1)
@@ -617,19 +544,18 @@ class SeachBarcodeTest(unittest.TestCase):
         test search sample from list of barcode
         """
         config = flexi_splitter.load_yaml(
-            path="flexi_splitter/tests/data/toy_file.yaml")
-        barcode_dic = flexi_splitter.create_barcode_dictionaries(
-            config=config
+            path="flexi_splitter/tests/data/toy_file.yaml"
         )
+        barcode_dic = flexi_splitter.create_barcode_dictionaries(config=config)
         reads_test = copy.deepcopy(data_test.Reads_single)
         self.assertEqual(
             flexi_splitter.match_barcodes(
                 reads=reads_test,
                 config=config,
                 ntuple=0,
-                barcode_dictionary=barcode_dic
+                barcode_dictionary=barcode_dic,
             ),
-            ['RT1', 'PCR1']
+            ["RT1", "PCR1"],
         )
 
     def test_barcodes_2_sample(self):
@@ -637,14 +563,13 @@ class SeachBarcodeTest(unittest.TestCase):
         test converting barcodes to  sample name
         """
         config = flexi_splitter.load_yaml(
-            path="flexi_splitter/tests/data/toy_file.yaml")
+            path="flexi_splitter/tests/data/toy_file.yaml"
+        )
         self.assertEqual(
             flexi_splitter.barcode_to_sample(
-                barcodes=['RT1', 'PCR1'],
-                config=config,
-                bcd_dic_found={}
+                barcodes=["RT1", "PCR1"], config=config, bcd_dic_found={}
             ),
-            'wt'
+            "wt",
         )
 
     def test_barcodes_2_sample_error(self):
@@ -652,15 +577,13 @@ class SeachBarcodeTest(unittest.TestCase):
         test converting barcodes to  sample name
         """
         config = flexi_splitter.load_yaml(
-            path="flexi_splitter/tests/data/toy_file.yaml")
+            path="flexi_splitter/tests/data/toy_file.yaml"
+        )
         self.assertEqual(
             flexi_splitter.barcode_to_sample(
-                barcodes=['RT3', 'PCR1'],
-                config=config,
-                verbose=True,
-                bcd_dic_found={}
+                barcodes=["RT3", "PCR1"], config=config, verbose=True, bcd_dic_found={}
             ),
-            'unassigned'
+            "unassigned",
         )
 
 
@@ -668,56 +591,34 @@ class HandleFastqTest(unittest.TestCase):
     """
     Tests handling fastq inputs
     """
+
     def test_reads_number(self):
         """
         test computing the list of reads number
         """
         self.assertEqual(
-            flexi_splitter.list_reads_number(
-                config=data_test.CONFIG_TOY_PAIRED
-            ),
-            3
+            flexi_splitter.list_reads_number(config=data_test.CONFIG_TOY_PAIRED), 3
         )
 
     def test_read_reads(self):
         """
-        test
+        test the rest_reads function
         """
         fin = open("flexi_splitter/tests/data/single_read.fastq")
         reads_list = list()
         reads_list.append(flexi_splitter.Reads())
         line_number = 0
-        for line in fin :
-            reads_list = flexi_splitter.read_reads( fins=[line],
-                                                  reads_list=reads_list,
-                                                  ntuple=[0],
-                                                  line_number= line_number
-                          )
-            line_number +=1
-        self.assertEqual(
-            line_number,
-            4
-        )
-        self.assertEqual(
-            reads_list[0].header,
-            data_test.Reads_single.header
-        )
-        self.assertEqual(
-            reads_list[0].seq,
-            data_test.Reads_single.seq
-        )
-        self.assertEqual(
-            reads_list[0].qual,
-            data_test.Reads_single.qual
-        )
-        self.assertEqual(
-            reads_list[0].qual_str,
-            data_test.Reads_single.qual_str
-        )
-        self.assertEqual(
-            str(reads_list[0]),
-            str(data_test.Reads_single)
-        )
+        for line in fin:
+            reads_list = flexi_splitter.read_reads(
+                fins=[line], reads_list=reads_list, ntuple=[0], line_number=line_number
+            )
+            line_number += 1
+        self.assertEqual(line_number, 4)
+        self.assertEqual(reads_list[0].header, data_test.Reads_single.header)
+        self.assertEqual(reads_list[0].seq, data_test.Reads_single.seq)
+        self.assertEqual(reads_list[0].qual, data_test.Reads_single.qual)
+        self.assertEqual(reads_list[0].qual_str, data_test.Reads_single.qual_str)
+        self.assertEqual(str(reads_list[0]), str(data_test.Reads_single))
 
     def test_assign_reads_single(self):
         """
@@ -725,18 +626,20 @@ class HandleFastqTest(unittest.TestCase):
         """
         barcode_dic = flexi_splitter.create_barcode_dictionaries(
             config=flexi_splitter.load_yaml(
-                path="flexi_splitter/tests/data/toy_file.yaml")
+                path="flexi_splitter/tests/data/toy_file.yaml"
+            )
         )
         self.assertEqual(
             flexi_splitter.assign_reads(
                 reads_list=[data_test.Reads_single],
                 config=flexi_splitter.load_yaml(
-                    path="flexi_splitter/tests/data/toy_file.yaml"),
+                    path="flexi_splitter/tests/data/toy_file.yaml"
+                ),
                 barcode_dictionary=barcode_dic,
                 verbose=True,
-                bcd_dic_found={}
+                bcd_dic_found={},
             ),
-            'wt'
+            "wt",
         )
 
     def test_assign_reads_paired(self):
@@ -745,20 +648,24 @@ class HandleFastqTest(unittest.TestCase):
         """
         barcode_dic = flexi_splitter.create_barcode_dictionaries(
             config=flexi_splitter.load_yaml(
-                path="flexi_splitter/tests/data/toy_file_paired.yaml")
+                path="flexi_splitter/tests/data/toy_file_paired.yaml"
+            )
         )
         self.assertEqual(
             flexi_splitter.assign_reads(
-                reads_list=[data_test.Reads_paired_1,
-                            data_test.Reads_paired_2,
-                            data_test.Reads_paired_3],
+                reads_list=[
+                    data_test.Reads_paired_1,
+                    data_test.Reads_paired_2,
+                    data_test.Reads_paired_3,
+                ],
                 config=flexi_splitter.load_yaml(
-                    path="flexi_splitter/tests/data/toy_file_paired.yaml"),
+                    path="flexi_splitter/tests/data/toy_file_paired.yaml"
+                ),
                 barcode_dictionary=barcode_dic,
                 verbose=True,
-                bcd_dic_found={}
+                bcd_dic_found={},
             ),
-            'sample_paired'
+            "sample_paired",
         )
 
     def test_parsing_reads(self):
@@ -766,29 +673,34 @@ class HandleFastqTest(unittest.TestCase):
         test search sample from list of barcode
         """
         flexi_splitter.parse_ntuples_fastqs(
-            fastqs=["flexi_splitter/tests/data/RNA_seq_sub1.fastq",
-                    "flexi_splitter/tests/data/RNA_seq_sub2.fastq",
-                    "flexi_splitter/tests/data/RNA_seq_Index.fastq"],
+            fastqs=[
+                "flexi_splitter/tests/data/RNA_seq_sub1.fastq",
+                "flexi_splitter/tests/data/RNA_seq_sub2.fastq",
+                "flexi_splitter/tests/data/RNA_seq_Index.fastq",
+            ],
             config=flexi_splitter.load_yaml(
-                path="flexi_splitter/tests/data/toy_file_paired.yaml"),
+                path="flexi_splitter/tests/data/toy_file_paired.yaml"
+            ),
             results_path="../results/",
             umi_bol=True,
             ntuple_param=3,
-            verbose=False
+            verbose=False,
         )
         self.assertEqual(1, 1)
 
+
 class ReadsClassTest(unittest.TestCase):
     """
     Tests Reads object
     """
+
     def readReads_header_test(self):
         """
         test assign header
         """
         self.assertEqual(
-        data_test.Reads_single.header,
-        "K00201:182:HM3TMBBXX:6:2228:17706:1226 1:N:0:NCAGTG"
+            data_test.Reads_single.header,
+            "K00201:182:HM3TMBBXX:6:2228:17706:1226 1:N:0:NCAGTG",
         )
 
     def readReads_seq_test(self):
@@ -796,8 +708,8 @@ class ReadsClassTest(unittest.TestCase):
         test assign seq
         """
         self.assertEqual(
-        data_test.Reads_single.seq,
-        "NTTCTCTAGTGCCTCGCCGCTGGTGTAGTGGTATCATGCGAGAAGAGATG"
+            data_test.Reads_single.seq,
+            "NTTCTCTAGTGCCTCGCCGCTGGTGTAGTGGTATCATGCGAGAAGAGATG",
         )
 
     def readReads_qual_str_test(self):
@@ -805,8 +717,8 @@ class ReadsClassTest(unittest.TestCase):
         test assign seq
         """
         self.assertEqual(
-        data_test.Reads_single.qual_str,
-        "#AAFFJJJJJJAAAFFJJJJJJJFFJJJJJJJJJJJJJJFJJJJFFFFJ-"
+            data_test.Reads_single.qual_str,
+            "#AAFFJJJJJJAAAFFJJJJJJJFFJJJJJJJJJJJJJJFJJJJFFFFJ-",
         )
 
     def readReads_str2qual_test(self):
@@ -814,9 +726,61 @@ class ReadsClassTest(unittest.TestCase):
         test assign seq
         """
         self.assertEqual(
-        data_test.Reads_single.qual,
-        [-29, 1, 1, 6, 6, 10, 10, 10, 10, 10, 10, 1, 1, 1, 6, 6, 10, 10, 10, 10, 10, 10, 10, 6, 6, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 6, 10, 10, 10, 10, 6, 6, 6, 6, 10, -19]
-        )
-
-if __name__ == '__main__':
+            data_test.Reads_single.qual,
+            [
+                -29,
+                1,
+                1,
+                6,
+                6,
+                10,
+                10,
+                10,
+                10,
+                10,
+                10,
+                1,
+                1,
+                1,
+                6,
+                6,
+                10,
+                10,
+                10,
+                10,
+                10,
+                10,
+                10,
+                6,
+                6,
+                10,
+                10,
+                10,
+                10,
+                10,
+                10,
+                10,
+                10,
+                10,
+                10,
+                10,
+                10,
+                10,
+                10,
+                6,
+                10,
+                10,
+                10,
+                10,
+                6,
+                6,
+                6,
+                6,
+                10,
+                -19,
+            ],
+        )
+
+
+if __name__ == "__main__":
     unittest.main()
diff --git a/src/flexi_splitter/utils/__init__.py b/src/flexi_splitter/utils/__init__.py
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/src/setup.py b/src/setup.py
index c5cc3a39309210d723a89d2641fe5c9eb932b940..11b564eeff572877f7f2c8fb250cd18bb74a2c8a 100644
--- a/src/setup.py
+++ b/src/setup.py
@@ -9,11 +9,8 @@ with open("../README.md", "r") as fh:
 setuptools.setup(
     name="flexi_splitter",
     version="1.0.2",
-    packages=['flexi_splitter'],
-    install_requires=[
-        'biopython',
-        'pyyaml'
-    ],
+    packages=["flexi_splitter"],
+    install_requires=["biopython", "pyyaml", "tqdm"],
     author="Emmanuel Labaronne, Laurent Modolo",
     author_email="emmanuel.labaronne@ens-lyon.fr",
     description="Sort reads into different fastq files from a barcode list",
@@ -25,11 +22,11 @@ setuptools.setup(
         "License :: OSI Approved :: CEA CNRS Inria Logiciel Libre License, \
 version 2.1 (CeCILL-2.1)",
         "Operating System :: OS Independent",
-        "Development Status :: 4 - Beta"
+        "Development Status :: 4 - Beta",
     ],
-    test_suite='nose.collector',
-    tests_require=['nose'],
+    test_suite="nose.collector",
+    tests_require=["nose"],
     entry_points={
-        'console_scripts': ['flexi_splitter=flexi_splitter.flexi_splitter:main'],
-    }
+        "console_scripts": ["flexi_splitter=flexi_splitter.flexi_splitter:main"],
+    },
 )