Return if the asked program exist in the user path
@param options : the options asked by the user
@param program : the program to test
"""
importos
defis_exe(fpath):
...
...
@@ -186,6 +186,7 @@ def which (program):
returnexe_file
returnNone
defdepts_error(options):
"""
Return the list of dependencies missing to run the program
...
...
@@ -197,6 +198,7 @@ def depts_error(options):
error="Cannot execute %prog, following dependencies are missing :\n"+error+"Please install them before to run!"
returnerror
if__name__=='__main__':
parser=OptionParser(usage="Usage: %prog -f FILE -q qual -a adaptor -o DIRECTORY",description="Delete adaptors in the fasta file.",version=version_string())
...
...
@@ -225,8 +227,7 @@ if __name__ == '__main__':
igroup.add_option("-l","--minlen",dest="minlen",
help="The minimum length after trimming to keep the sequence ",default=150)
@@ -46,54 +46,8 @@ class PyrocleanerAnalyse (Analyse):
@param log_file : the log file path
@return : a log hash map
"""
# complexity_win parameter regexp
complexity_win_regex=re.compile(" - Clean complexity based on a sliding window with a size of (\d+), a step of (\d+) and (\d+) as.*")
# complexity_full parameter regexp
complexity_full_regex=re.compile(" - Clean complexity based on the whole sequence with (\d+) as .*")
# duplicated parameter regexp
duplicated_regex=re.compile(" - Clean duplicated reads using (\d+) as limit for the difference between reads ends to consider them as duplicat.")
# length_std parameter regexp
length_std_regex=re.compile(" - Clean reads shorter than reads length mean minus (\d+) standard deviation and reads longer than reads length mean plus (\d+) standard deviation.")
# length_win parameter regexp
length_win_regex=re.compile(" - Clean reads with a length not in between \[(\d+);(\d+)\].")
# Ns parameters regexp
ns_regex=re.compile(" - Clean reads with a percentage of Ns higher than (\d+)%.")
# pairends parameters regexp
pairends_regex=re.compile(" - Clean pairends reads if the sequence size between the spacer and the read begning/end is higher than (\d+) nucleaotides or if (\d+) nucleotides missmatch with the spacer.\n")
# aggresssive parameters regexp
aggressive_regex=re.compile(" - Clean duplicated reads using (\d+) as limit for the difference between reads ends to consider them as duplicat and keep only one read per cluster.")
# qual parameters regexp
qual_regex=re.compile(" - Clean reads if no bases quality has a score higher than (\d+).")