Commit 241d03ba authored by Celine Noirot's avatar Celine Noirot
Browse files

bug 1 base

parent 369fc86a
......@@ -37,7 +37,6 @@ import seqio as seqio
GRAPH_CLASS_PARTITION = 100
MAX_FRAGMENT_LEN_IN_HISTOGRAM = 5000
ENZYME_PATH=os.path.join(os.path.dirname(os.path.realpath(__file__)),"..","lib","enzyme.txt")
def version_string ():
"""
Return the insilicoRRBSdigestion version
......@@ -261,7 +260,7 @@ def compute_fragment_size_per_range(ranges,fragments_length):
ranges[key]["size"]=0
for i in fragments_length :
for key in ranges.keys():
if i>=ranges[key]["coord"][0] and i<ranges[key]["coord"][1] :
if i>=ranges[key]["coord"][0] and i<=ranges[key]["coord"][1] :
ranges[key]["nb_fragment"]+=1
ranges[key]["size"]+=i
break
......@@ -269,14 +268,12 @@ def compute_fragment_size_per_range(ranges,fragments_length):
if __name__ == "__main__":
# Get available enzyme
all_enzymes = {'None':0}
if os.path.exists(ENZYME_PATH) :
all_enzymes = get_available_enzymes(ENZYME_PATH)
parser = OptionParser(usage="Usage: insilicoRRBS.py -i FILE [options]")
usage = "usage: %prog -i file.fa -o output.stats -c CpGisland.bed"
usage = "usage: %prog -i file.fa -o output_directory -c file.bed"
desc = "The script simulates a complete enzymatic digestion of the genome to\
identify all the potential restriction fragments. Then, for each size\
range (from min to max fragment length of bins size ) it computes different metrics"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment