Commit ba12fa61 authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team
Browse files

controllers/patient.py, modules/defs.py.sample: patient/stats, stats on all locus

parent cde286c6
......@@ -200,10 +200,6 @@ def stats():
# found 10750 50-windows in 13139 reads (99.9% of 13153 reads)
'windows in (?P<seg>\d+) reads \((?P<seg_ratio>.*?) of (?P<reads>\d+) reads\)',
# locus
'log.* TRG.*?->\s*?(?P<TRG_reads>\d+)\s+(?P<TRG_av_len>[0-9.]+)\s+(?P<TRG_clones>\d+)\s+(?P<TRG_av_reads>[0-9.]+)\s*.n',
'log.* IGH.*?->\s*?(?P<IGH_reads>\d+)\s+(?P<IGH_av_len>[0-9.]+)\s+(?P<IGH_clones>\d+)\s+(?P<IGH_av_reads>[0-9.]+)\s*.n',
# segmentation causes
'log.* SEG_[+].*?-> (?P<SEG_plus>.*?).n',
'log.* SEG_[-].*?-> (?P<SEG_minus>.*?).n',
......@@ -213,6 +209,13 @@ def stats():
'"reads" : [[] (?P<main_clone_reads>\d+) ',
]
# stats by locus
for locus in defs.LOCUS:
locus_regex = locus.replace('+', '[+]')
locus_group = locus.replace('+', 'p')
stats_regex += [ 'log.* %(locus)s.*?->\s*?(?P<%(locus_g)s_reads>\d+)\s+(?P<%(locus_g)s_av_len>[0-9.]+)\s+(?P<%(locus_g)s_clones>\d+)\s+(?P<%(locus_g)s_av_reads>[0-9.]+)\s*.n'
% { 'locus': locus_regex, 'locus_g': locus_group } ]
json_paths = {'reads distribution [>= 10%]': 'reads/distribution/0.1',
'reads distribution [>= 1% < 10%]': 'reads/distribution/0.01',
'reads distribution [>= .01% < 1%]': 'reads/distribution/0.001',
......
......@@ -53,3 +53,7 @@ TASK_TIMEOUT = 2 * 60 * 60
### Reverse IP file
REVERSE_IP = '/home/vidjil/ips.txt'
### Locus (should be parsed from germlines.data)
LOCUS = ['TRA', 'TRA+D', 'TRB', 'TRG', 'TRD', 'TRD+',
'IGH', 'IGH+', 'IGK', 'IGK+', 'IGL']
\ No newline at end of file
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