Commit 601f183b authored by Mikaël Salson's avatar Mikaël Salson

vidjil-to-fasta.py: Percentage on total of reads

This will allow to more reliably add percentages that otherwise would give
meaningless results.

In the test we now have 497 reads out of 786861.
parent dff32570
Pipeline #44157 passed with stages
in 6 minutes and 24 seconds
......@@ -7,4 +7,4 @@ $ Affectation for sequence YYGGGYYACGYAYAGCGGYGYTTYYCCTYTYTGYTYTGCYAAAYAACYYYYTG
1:VDJ 1 95 100 105 107 134
$ Percentage for sequence GGAGTCGGGGGAGGCTTGGTACAGCCTGGCAGGTCCCTGAGACTCTCCTGTGCAGCCTCTGGATTCACCTTTGATGATTATGCCATGCACTGGGTCCGGCAAGCTCCAGGGAAGGGCCTGGAGTGGGTCTCAGGTATTAGTTGGAATAGTGGTAGCATAGGCTATGCGGACTCTGTGAAGGGCCGATTCACCATCTCCAGAGACAACGCCAAGAACTCCCTGTATCTGCAAATGAACAGTCTGAGAGCTGAGGACACGGCCTTGTATTACTGTGCACCCGGAGGTATGGACGTCTGGGGCCAAGGGACCCTGGTCACC
1:IGHV3-9.01 7/CCCGGA/17 IGHJ6.02 .* percentage=0.304534313725
1:IGHV3-9.01 7/CCCGGA/17 IGHJ6.02 .* percentage=0.00066947
......@@ -215,8 +215,7 @@ def write_fuse_to_fasta(data, outfile, used_names, current_filename, options, me
max_sample = max(clone.d['reads'])
#take the index corresponding to the max_sample
index_max_sample = clone.d['reads'].index(max_sample)
germline = clone.d['germline']
reads_total_nb = data.d['reads'].d['germline'][germline][index_max_sample]
reads_total_nb = data.d['reads'].d['segmented'][index_max_sample]
percentage = float(max_sample)/reads_total_nb
if name in used_names:
......
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