Mercurial > repos > mheinzl > variant_analyzer2
annotate read2mut.py @ 82:c2e8932b4d8d draft
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
author | mheinzl |
---|---|
date | Wed, 27 Jul 2022 08:59:00 +0000 |
parents | 612c110305db |
children | 8cec772c0bf1 |
rev | line source |
---|---|
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1 #!/usr/bin/env python |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
2 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
3 """read2mut.py |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
4 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
5 Author -- Gundula Povysil |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
6 Contact -- povysil@bioinf.jku.at |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
7 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
8 Looks for reads with mutation at known |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
9 positions and calculates frequencies and stats. |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
10 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
11 ======= ========== ================= ================================ |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
12 Version Date Author Description |
63
f0fc93b7945c
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
62
diff
changeset
|
13 0.2.2 2019-10-27 Gundula Povysil - |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
14 ======= ========== ================= ================================ |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
15 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
16 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
17 USAGE: python read2mut.py --mutFile DCS_Mutations.tabular --bamFile Interesting_Reads.trim.bam |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
18 --inputJson tag_count_dict.json --sscsJson SSCS_counts.json |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
19 --outputFile mutant_reads_summary_short_trim.xlsx --thresh 10 --phred 20 --trim 10 --chimera_correction |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
20 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
21 """ |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
22 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
23 from __future__ import division |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
24 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
25 import argparse |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
26 import csv |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
27 import itertools |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
28 import json |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
29 import operator |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
30 import os |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
31 import re |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
32 import sys |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
33 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
34 import numpy as np |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
35 import pysam |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
36 import xlsxwriter |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
37 from cyvcf2 import VCF |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
38 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
39 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
40 def make_argparser(): |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
41 parser = argparse.ArgumentParser(description='Takes a VCF file with mutations, a BAM file and JSON files as input and prints stats about variants to a user specified output file.') |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
42 parser.add_argument('--mutFile', |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
43 help='VCF file with DCS mutations.') |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
44 parser.add_argument('--bamFile', |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
45 help='BAM file with aligned raw reads of selected tags (FASTQ created by mut2read.py - trimming with Trimmomatic - alignment with bwa).') |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
46 parser.add_argument('--inputJson', |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
47 help='JSON file with data collected by mut2read.py.') |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
48 parser.add_argument('--sscsJson', |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
49 help='JSON file with SSCS counts collected by mut2sscs.py.') |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
50 parser.add_argument('--outputFile', |
12
7a418148319d
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
11
diff
changeset
|
51 help='Output xlsx file with summary of mutations.') |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
52 parser.add_argument('--outputFile_csv', |
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
53 help='Output csv file with summary of mutations.') |
12
7a418148319d
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
11
diff
changeset
|
54 parser.add_argument('--outputFile2', |
7a418148319d
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
11
diff
changeset
|
55 help='Output xlsx file with allele frequencies of mutations.') |
7a418148319d
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
11
diff
changeset
|
56 parser.add_argument('--outputFile3', |
7a418148319d
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
11
diff
changeset
|
57 help='Output xlsx file with examples of the tier classification.') |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
58 parser.add_argument('--thresh', type=int, default=0, |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
59 help='Integer threshold for displaying mutations. Only mutations occuring less than thresh times are displayed. Default of 0 displays all.') |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
60 parser.add_argument('--phred', type=int, default=20, |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
61 help='Integer threshold for Phred score. Only reads higher than this threshold are considered. Default 20.') |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
62 parser.add_argument('--trim', type=int, default=10, |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
63 help='Integer threshold for assigning mutations at start and end of reads to lower tier. Default 10.') |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
64 parser.add_argument('--chimera_correction', action="store_true", |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
65 help='Count chimeric variants and correct the variant frequencies') |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
66 parser.add_argument('--softclipping_dist', type=int, default=15, |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
67 help='Count mutation as an artifact if mutation lies within this parameter away from the softclipping part of the read.') |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
68 parser.add_argument('--reads_threshold', type=float, default=1.0, |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
69 help='Float number which specifies the minimum percentage of softclipped reads in a family to be considered in the softclipping tiers. Default: 1.0, means all reads of a family have to be softclipped.') |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
70 return parser |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
71 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
72 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
73 def safe_div(x, y): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
74 if y == 0: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
75 return None |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
76 return x / y |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
77 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
78 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
79 def read2mut(argv): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
80 parser = make_argparser() |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
81 args = parser.parse_args(argv[1:]) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
82 file1 = args.mutFile |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
83 file2 = args.bamFile |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
84 json_file = args.inputJson |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
85 sscs_json = args.sscsJson |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
86 outfile = args.outputFile |
12
7a418148319d
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
11
diff
changeset
|
87 outfile2 = args.outputFile2 |
7a418148319d
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
11
diff
changeset
|
88 outfile3 = args.outputFile3 |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
89 outputFile_csv = args.outputFile_csv |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
90 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
91 thresh = args.thresh |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
92 phred_score = args.phred |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
93 trim = args.trim |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
94 chimera_correction = args.chimera_correction |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
95 thr = args.softclipping_dist |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
96 threshold_reads = args.reads_threshold |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
97 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
98 if os.path.isfile(file1) is False: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
99 sys.exit("Error: Could not find '{}'".format(file1)) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
100 if os.path.isfile(file2) is False: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
101 sys.exit("Error: Could not find '{}'".format(file2)) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
102 if os.path.isfile(json_file) is False: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
103 sys.exit("Error: Could not find '{}'".format(json_file)) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
104 if thresh < 0: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
105 sys.exit("Error: thresh is '{}', but only non-negative integers allowed".format(thresh)) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
106 if phred_score < 0: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
107 sys.exit("Error: phred is '{}', but only non-negative integers allowed".format(phred_score)) |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
108 if trim < 0: |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
109 sys.exit("Error: trim is '{}', but only non-negative integers allowed".format(thresh)) |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
110 if thr <= 0: |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
111 sys.exit("Error: trim is '{}', but only non-negative integers allowed".format(thr)) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
112 |
2
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
113 # load dicts |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
114 with open(json_file, "r") as f: |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
115 (tag_dict, cvrg_dict, tag_dict_ref) = json.load(f) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
116 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
117 with open(sscs_json, "r") as f: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
118 (mut_pos_dict, ref_pos_dict) = json.load(f) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
119 |
2
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
120 # read bam file |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
121 # pysam.index(file2) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
122 bam = pysam.AlignmentFile(file2, "rb") |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
123 |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
124 # create mut_dict |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
125 mut_dict = {} |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
126 mut_read_pos_dict = {} |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
127 mut_read_dict = {} |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
128 reads_dict = {} |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
129 mut_read_cigar_dict = {} |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
130 real_start_end = {} |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
131 i = 0 |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
132 mut_array = [] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
133 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
134 for count, variant in enumerate(VCF(file1)): |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
135 chrom = variant.CHROM |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
136 stop_pos = variant.start |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
137 ref = variant.REF |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
138 if len(variant.ALT) == 0: |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
139 continue |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
140 else: |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
141 alt = variant.ALT[0] |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
142 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
143 alt = alt.upper() |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
144 ref = ref.upper() |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
145 if "N" in alt: # skip indels with N in alt allele --> it is not an indel but just a mismatch at the position where the N is (checked this in IGV) |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
146 continue |
7
ded0dc6a20d3
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
6
diff
changeset
|
147 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
148 chrom_stop_pos = str(chrom) + "#" + str(stop_pos) + "#" + ref + "#" + alt |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
149 mut_array.append([chrom, stop_pos, ref, alt]) |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
150 i += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
151 mut_dict[chrom_stop_pos] = {} |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
152 mut_read_pos_dict[chrom_stop_pos] = {} |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
153 reads_dict[chrom_stop_pos] = {} |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
154 mut_read_cigar_dict[chrom_stop_pos] = {} |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
155 real_start_end[chrom_stop_pos] = {} |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
156 for pileupcolumn in bam.pileup(chrom, stop_pos - 1, stop_pos + 1, max_depth=1000000000): |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
157 if pileupcolumn.reference_pos == stop_pos: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
158 count_alt = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
159 count_ref = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
160 count_indel = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
161 count_n = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
162 count_other = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
163 count_lowq = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
164 n = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
165 for pileupread in pileupcolumn.pileups: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
166 n += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
167 if not pileupread.is_refskip: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
168 if pileupread.is_del: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
169 p = pileupread.query_position_or_next |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
170 e = p + len(alt) - 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
171 else: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
172 p = pileupread.query_position |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
173 e = p + len(alt) |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
174 s = p |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
175 tag = pileupread.alignment.query_name |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
176 split_cigar = re.split('(\d+)', pileupread.alignment.cigarstring) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
177 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
178 if len(ref) < len(alt): |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
179 if "I" in split_cigar: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
180 all_insertions = [inser_i for inser_i, ins in enumerate(split_cigar) if ins == "I"] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
181 for ai in all_insertions: # if multiple insertions in DCS |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
182 ins_index = [int(ci) for ci in split_cigar[:ai - 1] if ci.isdigit()] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
183 ins_count = split_cigar[ai - 1] # nr of insertions should match with alt allele |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
184 if "I" in split_cigar and sum(ins_index) == p + 1 and int(ins_count) >= len(alt) - 1: # if pe read matches exatcly to insertion |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
185 nuc = pileupread.alignment.query_sequence[s:e] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
186 phred = ord(pileupread.alignment.qual[s]) - 33 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
187 break |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
188 elif "I" in split_cigar and sum(ins_index) == p + 1 and int(ins_count) < len(alt) - 1: # if pe read has shorter insertion -- not alt |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
189 nuc = pileupread.alignment.query_sequence[s:s+int(ins_count)+1] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
190 phred = ord(pileupread.alignment.qual[s]) - 33 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
191 break |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
192 else: # insertion in pe reads but not at the desired position |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
193 nuc = pileupread.alignment.query_sequence[s] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
194 phred = ord(pileupread.alignment.qual[s]) - 33 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
195 elif "D" in split_cigar: # if deletion in pe read, don't count |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
196 all_deletions = [del_i for del_i, dele in enumerate(split_cigar) if dele == "D"] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
197 for di, ai in enumerate(all_deletions): # if multiple insertions in DCS |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
198 if di > 0: # more than 1 deletion, don't count previous deletion to position |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
199 all_deletions_mod = split_cigar[:ai - 1] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
200 prev_del_idx = [all_deletions_mod.index("D") - 1, all_deletions_mod.index("D")] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
201 split_cigar_no_prev = [ad for i, ad in enumerate(all_deletions_mod) if i not in prev_del_idx] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
202 del_index = [int(ci) for ci in split_cigar_no_prev[:ai - 1] if ci.isdigit()] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
203 else: # first deletion in read, sum all previous (mis)matches and insertions to position |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
204 del_index = [int(ci) for ci in split_cigar[:ai - 1] if ci.isdigit()] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
205 if "D" in split_cigar and sum(del_index) == p + 1: # if deletion at that position |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
206 nuc = "D" |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
207 phred = ord(pileupread.alignment.qual[s]) - 33 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
208 break |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
209 else: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
210 nuc = pileupread.alignment.query_sequence[s] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
211 phred = ord(pileupread.alignment.qual[s]) - 33 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
212 else: # insertion in pe reads but not at the desired position |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
213 nuc = pileupread.alignment.query_sequence[s] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
214 phred = ord(pileupread.alignment.qual[s]) - 33 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
215 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
216 elif len(ref) > len(alt): |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
217 ref_positions = pileupread.alignment.get_reference_positions(full_length=True)[s:p + len(ref)] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
218 if "D" in split_cigar: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
219 all_deletions = [del_i for del_i, dele in enumerate(split_cigar) if dele == "D"] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
220 for di, ai in enumerate(all_deletions): # if multiple insertions in DCS |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
221 if di > 0: # more than 1 deletion, don't count previous deletion to position |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
222 all_deletions_mod = split_cigar[:ai - 1] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
223 prev_del_idx = [all_deletions_mod.index("D") - 1, all_deletions_mod.index("D")] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
224 split_cigar_no_prev = [ad for i, ad in enumerate(all_deletions_mod) if i not in prev_del_idx] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
225 del_index = [int(ci) for ci in split_cigar_no_prev[:ai - 1] if ci.isdigit()] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
226 else: # first deletion in read, sum all previous (mis)matches and insertions to position |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
227 del_index = [int(ci) for ci in split_cigar[:ai - 1] if ci.isdigit()] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
228 del_count = split_cigar[ai - 1] # deletion on that position but does not necesserily match in the length |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
229 if "D" in split_cigar and sum(del_index) == p + 1 and int(del_count) >= len(ref) - 1: # if pe read matches exatcly to deletion |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
230 nuc = pileupread.alignment.query_sequence[s:e] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
231 phred = ord(pileupread.alignment.qual[s]) - 33 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
232 if nuc == "": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
233 nuc = str(alt) |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
234 break |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
235 elif "D" in split_cigar and sum(del_index) == p + 1 and int(del_count) < len(ref) - 1: # if pe read has shorter deletion --> not alt |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
236 nuc = str(ref)[:int(del_count)+1] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
237 phred = ord(pileupread.alignment.qual[s]) - 33 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
238 break |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
239 else: # deletion in pe reads but not at the desired position |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
240 nuc = pileupread.alignment.query_sequence[s:s + len(ref)] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
241 phred = ord(pileupread.alignment.qual[s]) - 33 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
242 elif "I" in split_cigar: # if pe read has insertion --> not count |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
243 all_insertions = [inser_i for inser_i, ins in enumerate(split_cigar) if ins == "I"] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
244 for ai in all_insertions: # if multiple insertions in DCS |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
245 ins_index = [int(ci) for ci in split_cigar[:ai - 1] if ci.isdigit()] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
246 ins_count = split_cigar[ai - 1] # nr of insertions should match with alt allele |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
247 if "I" in split_cigar and sum(ins_index) == p + 1: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
248 nuc = "I" |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
249 phred = ord(pileupread.alignment.qual[s]) - 33 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
250 break |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
251 else: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
252 nuc = pileupread.alignment.query_sequence[s] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
253 phred = ord(pileupread.alignment.qual[s]) - 33 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
254 elif len(ref_positions) < len(ref): # DCS has reference but the position is at the very end of the DCS and therefore not the full reference positions are there |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
255 nuc = pileupread.alignment.get_reference_sequence()[s:s + len(ref)] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
256 phred = ord(pileupread.alignment.qual[s]) - 33 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
257 if nuc.upper() == ref[:len(nuc)]: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
258 nuc = str(ref) |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
259 else: # deletion in pe reads but not at the desired position |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
260 nuc = pileupread.alignment.query_sequence[s:s + len(ref)] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
261 phred = ord(pileupread.alignment.qual[s]) - 33 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
262 else: # SNV: query position is None if is_del or is_refskip is set. |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
263 nuc = pileupread.alignment.query_sequence[s] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
264 phred = ord(pileupread.alignment.qual[s]) - 33 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
265 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
266 nuc = nuc.upper() |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
267 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
268 # if read is softclipped, store real position in reference |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
269 if "S" in pileupread.alignment.cigarstring: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
270 # spftclipped at start |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
271 if re.search(r"^[0-9]+S", pileupread.alignment.cigarstring): |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
272 start = pileupread.alignment.reference_start - int(pileupread.alignment.cigarstring.split("S")[0]) |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
273 end = pileupread.alignment.reference_end |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
274 # softclipped at end |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
275 elif re.search(r"S$", pileupread.alignment.cigarstring): |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
276 end = pileupread.alignment.reference_end + int(re.split("[A-Z]", str(pileupread.alignment.cigarstring))[-2]) |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
277 start = pileupread.alignment.reference_start |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
278 else: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
279 end = pileupread.alignment.reference_end |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
280 start = pileupread.alignment.reference_start |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
281 if phred < phred_score: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
282 nuc = "lowQ" |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
283 if tag not in mut_dict[chrom_stop_pos]: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
284 mut_dict[chrom_stop_pos][tag] = {} |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
285 if nuc in mut_dict[chrom_stop_pos][tag]: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
286 mut_dict[chrom_stop_pos][tag][nuc] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
287 else: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
288 mut_dict[chrom_stop_pos][tag][nuc] = 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
289 if tag not in mut_read_pos_dict[chrom_stop_pos]: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
290 mut_read_pos_dict[chrom_stop_pos][tag] = [s + 1] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
291 reads_dict[chrom_stop_pos][tag] = [len(pileupread.alignment.query_sequence)] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
292 mut_read_cigar_dict[chrom_stop_pos][tag] = [pileupread.alignment.cigarstring] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
293 real_start_end[chrom_stop_pos][tag] = [(start, end)] |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
294 else: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
295 mut_read_pos_dict[chrom_stop_pos][tag].append(s + 1) |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
296 reads_dict[chrom_stop_pos][tag].append(len(pileupread.alignment.query_sequence)) |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
297 mut_read_cigar_dict[chrom_stop_pos][tag].append(pileupread.alignment.cigarstring) |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
298 real_start_end[chrom_stop_pos][tag].append((start, end)) |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
299 if nuc == alt: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
300 count_alt += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
301 if tag not in mut_read_dict: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
302 mut_read_dict[tag] = {} |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
303 mut_read_dict[tag][chrom_stop_pos] = (alt, ref) |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
304 else: |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
305 mut_read_dict[tag][chrom_stop_pos] = (alt, ref) |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
306 elif nuc == ref: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
307 count_ref += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
308 elif nuc == "N": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
309 count_n += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
310 elif nuc == "lowQ": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
311 count_lowq += 1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
312 else: |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
313 count_other += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
314 else: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
315 count_indel += 1 |
79
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
316 print("coverage at pos %s = %s, ref = %s, alt = %s, other bases = %s, N = %s, low quality = %s\n" % |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
317 (pileupcolumn.pos, count_ref + count_alt, count_ref, count_alt, count_other, count_n, count_lowq)) |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
318 |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
319 mut_array = np.array(mut_array) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
320 for read in bam.fetch(until_eof=True): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
321 if read.is_unmapped: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
322 pure_tag = read.query_name[:-5] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
323 nuc = "na" |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
324 if pure_tag in tag_dict.keys(): # stored all ref and alt reads --> get only alt reads |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
325 for key in tag_dict[pure_tag].keys(): |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
326 if key not in mut_dict: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
327 mut_dict[key] = {} |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
328 if read.query_name not in mut_dict[key]: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
329 mut_dict[key][read.query_name] = {} |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
330 if nuc in mut_dict[key][read.query_name]: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
331 mut_dict[key][read.query_name][nuc] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
332 else: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
333 mut_dict[key][read.query_name][nuc] = 1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
334 bam.close() |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
335 # create pure_tags_dict |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
336 pure_tags_dict = {} |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
337 pure_tags_dict_ref = {} |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
338 for key1, value1 in sorted(mut_dict.items()): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
339 i = np.where(np.array(['#'.join(str(i) for i in z) |
7
ded0dc6a20d3
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
6
diff
changeset
|
340 for z in zip(mut_array[:, 0], mut_array[:, 1], mut_array[:, 2], mut_array[:, 3])]) == key1)[0][0] |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
341 ref = mut_array[i, 2] |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
342 alt = mut_array[i, 3] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
343 pure_tags_dict[key1] = {} |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
344 pure_tags_dict_ref[key1] = {} |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
345 for key2, value2 in sorted(value1.items()): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
346 for key3, value3 in value2.items(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
347 pure_tag = key2[:-5] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
348 if key3 == alt: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
349 if pure_tag in pure_tags_dict[key1]: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
350 pure_tags_dict[key1][pure_tag] += 1 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
351 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
352 pure_tags_dict[key1][pure_tag] = 1 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
353 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
354 if key3 == ref: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
355 if pure_tag in pure_tags_dict_ref[key1]: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
356 pure_tags_dict_ref[key1][pure_tag] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
357 else: |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
358 pure_tags_dict_ref[key1][pure_tag] = 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
359 |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
360 # create pure_tags_dict_short with thresh |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
361 if thresh > 0: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
362 pure_tags_dict_short = {} |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
363 for key, value in sorted(pure_tags_dict.items()): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
364 if len(value) < thresh: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
365 pure_tags_dict_short[key] = value |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
366 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
367 pure_tags_dict_short = pure_tags_dict |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
368 |
76
56f271641828
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
75
diff
changeset
|
369 csv_data = open(outputFile_csv, "w") |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
370 csv_writer = csv.writer(csv_data, delimiter=",") |
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
371 |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
372 # output summary with threshold |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
373 workbook = xlsxwriter.Workbook(outfile) |
29
b14b69697cf6
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
28
diff
changeset
|
374 workbook2 = xlsxwriter.Workbook(outfile2) |
b14b69697cf6
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
28
diff
changeset
|
375 workbook3 = xlsxwriter.Workbook(outfile3) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
376 ws1 = workbook.add_worksheet("Results") |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
377 ws2 = workbook2.add_worksheet("Allele frequencies") |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
378 ws3 = workbook3.add_worksheet("Tiers") |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
379 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
380 format1 = workbook.add_format({'bg_color': '#BCF5A9'}) # green |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
381 format2 = workbook.add_format({'bg_color': '#FFC7CE'}) # red |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
382 format3 = workbook.add_format({'bg_color': '#FACC2E'}) # yellow |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
383 |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
384 format12 = workbook2.add_format({'bg_color': '#BCF5A9'}) # green |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
385 format22 = workbook2.add_format({'bg_color': '#FFC7CE'}) # red |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
386 format32 = workbook2.add_format({'bg_color': '#FACC2E'}) # yellow |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
387 |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
388 format13 = workbook3.add_format({'bg_color': '#BCF5A9'}) # green |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
389 format23 = workbook3.add_format({'bg_color': '#FFC7CE'}) # red |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
390 format33 = workbook3.add_format({'bg_color': '#FACC2E'}) # yellow |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
391 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
392 header_line = ('variant ID', 'tier', 'allele', 'tag', 'mate', 'read pos.ab', 'read pos.ba', 'read median length.ab', |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
393 'read median length.ba', 'DCS median length', |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
394 'FS.ab', 'FS.ba', 'FSqc.ab', 'FSqc.ba', 'ref.ab', 'ref.ba', 'alt.ab', 'alt.ba', |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
395 'rel. ref.ab', 'rel. ref.ba', 'rel. alt.ab', 'rel. alt.ba', |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
396 'na.ab', 'na.ba', 'lowq.ab', 'lowq.ba', 'trim.ab', 'trim.ba', |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
397 'SSCS alt.ab', 'SSCS alt.ba', 'SSCS ref.ab', 'SSCS ref.ba', |
4
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
3
diff
changeset
|
398 'in phase', 'chimeric tag') |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
399 ws1.write_row(0, 0, header_line) |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
400 csv_writer.writerow(header_line) |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
401 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
402 counter_tier11 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
403 counter_tier12 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
404 counter_tier21 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
405 counter_tier22 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
406 counter_tier23 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
407 counter_tier24 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
408 counter_tier31 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
409 counter_tier32 = 0 |
46
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
45
diff
changeset
|
410 counter_tier25 = 0 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
411 counter_tier4 = 0 |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
412 counter_tier51 = 0 |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
413 counter_tier52 = 0 |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
414 counter_tier53 = 0 |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
415 counter_tier54 = 0 |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
416 counter_tier55 = 0 |
28
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
417 counter_tier6 = 0 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
418 counter_tier7 = 0 |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
419 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
420 row = 1 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
421 tier_dict = {} |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
422 tier_dict_ref = {} |
2
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
423 chimera_dict = {} |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
424 for key1, value1 in sorted(mut_dict.items()): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
425 counts_mut = 0 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
426 chimeric_tag_list = [] |
2
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
427 chimeric_tag = {} |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
428 if (key1 in pure_tags_dict_short.keys()) or (key1 in pure_tags_dict_ref.keys()): # ref or alt |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
429 |
81
612c110305db
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
80
diff
changeset
|
430 # if key1 not in np.array(['#'.join(str(i) for i in z) |
612c110305db
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
80
diff
changeset
|
431 # for z in zip(mut_array[:, 0], mut_array[:, 1], mut_array[:, 2], mut_array[:, 3])]): |
612c110305db
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
80
diff
changeset
|
432 # continue |
79
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
433 |
57
706bf8b59eae
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
56
diff
changeset
|
434 change_tier_after_print = [] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
435 i = np.where(np.array(['#'.join(str(i) for i in z) |
7
ded0dc6a20d3
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
6
diff
changeset
|
436 for z in zip(mut_array[:, 0], mut_array[:, 1], mut_array[:, 2], mut_array[:, 3])]) == key1)[0][0] |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
437 ref = mut_array[i, 2] |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
438 alt = mut_array[i, 3] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
439 dcs_median = cvrg_dict[key1][2] |
77
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
440 whole_array = list(pure_tags_dict_short[key1].keys()) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
441 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
442 tier_dict[key1] = {} |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
443 tier_dict_ref[key1] = {} |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
444 values_tier_dict = [("tier 1.1", 0), ("tier 1.2", 0), ("tier 2.1", 0), ("tier 2.2", 0), ("tier 2.3", 0), ("tier 2.4", 0), ("tier 2.5", 0), |
51
26e53b5b8bcb
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
50
diff
changeset
|
445 ("tier 3.1", 0), ("tier 3.2", 0), ("tier 4", 0), ("tier 5.1", 0), ("tier 5.2", 0), ("tier 5.3", 0), ("tier 5.4", 0), ("tier 5.5", 0), |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
446 ("tier 6", 0), ("tier 7", 0)] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
447 for k, v in values_tier_dict: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
448 tier_dict[key1][k] = v |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
449 tier_dict_ref[key1][k] = v |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
450 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
451 used_keys = [] |
79
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
452 # used_keys_ref = [] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
453 if 'ab' in mut_pos_dict[key1].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
454 sscs_mut_ab = mut_pos_dict[key1]['ab'] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
455 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
456 sscs_mut_ab = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
457 if 'ba' in mut_pos_dict[key1].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
458 sscs_mut_ba = mut_pos_dict[key1]['ba'] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
459 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
460 sscs_mut_ba = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
461 if 'ab' in ref_pos_dict[key1].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
462 sscs_ref_ab = ref_pos_dict[key1]['ab'] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
463 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
464 sscs_ref_ab = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
465 if 'ba' in ref_pos_dict[key1].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
466 sscs_ref_ba = ref_pos_dict[key1]['ba'] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
467 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
468 sscs_ref_ba = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
469 for key2, value2 in sorted(value1.items()): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
470 add_mut14 = "" |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
471 add_mut23 = "" |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
472 if key2[:-5] not in tag_dict.keys() and key2[:-5] not in tag_dict_ref.keys(): # skip reads that have not alt or ref |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
473 continue |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
474 |
79
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
475 if (((key2[:-5] in tag_dict.keys()) and (key2[:-5] in pure_tags_dict_short[key1].keys()) and (key1 in tag_dict[key2[:-5]].keys()) and (key2[:-5] not in used_keys)) or ((key2[:-5] in tag_dict_ref.keys()) and (key2[:-5] in pure_tags_dict_ref[key1].keys()) and (key1 in tag_dict_ref[key2[:-5]].keys()) and (key2[:-5] not in used_keys))): |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
476 if key2[:-5] in tag_dict.keys(): |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
477 variant_type = "alt" |
79
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
478 elif key2[:-5] in tag_dict_ref.keys(): |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
479 variant_type = "ref" |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
480 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
481 if key2[:-5] + '.ab.1' in mut_dict[key1].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
482 total1 = sum(mut_dict[key1][key2[:-5] + '.ab.1'].values()) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
483 if 'na' in mut_dict[key1][key2[:-5] + '.ab.1'].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
484 na1 = mut_dict[key1][key2[:-5] + '.ab.1']['na'] |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
485 # na1f = na1/total1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
486 else: |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
487 # na1 = na1f = 0 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
488 na1 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
489 if 'lowQ' in mut_dict[key1][key2[:-5] + '.ab.1'].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
490 lowq1 = mut_dict[key1][key2[:-5] + '.ab.1']['lowQ'] |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
491 # lowq1f = lowq1 / total1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
492 else: |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
493 # lowq1 = lowq1f = 0 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
494 lowq1 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
495 if ref in mut_dict[key1][key2[:-5] + '.ab.1'].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
496 ref1 = mut_dict[key1][key2[:-5] + '.ab.1'][ref] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
497 ref1f = ref1 / (total1 - na1 - lowq1) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
498 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
499 ref1 = ref1f = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
500 if alt in mut_dict[key1][key2[:-5] + '.ab.1'].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
501 alt1 = mut_dict[key1][key2[:-5] + '.ab.1'][alt] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
502 alt1f = alt1 / (total1 - na1 - lowq1) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
503 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
504 alt1 = alt1f = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
505 total1new = total1 - na1 - lowq1 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
506 if (key2[:-5] + '.ab.1') in mut_read_dict.keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
507 k1 = mut_read_dict[(key2[:-5] + '.ab.1')].keys() |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
508 add_mut1 = len(k1) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
509 if add_mut1 > 1: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
510 for k, v in mut_read_dict[(key2[:-5] + '.ab.1')].items(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
511 if k != key1: |
4
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
3
diff
changeset
|
512 new_mut = str(k).split("#")[0] + "-" + str(int(str(k).split("#")[1]) + 1) + "-" + v[1] + "-" + v[0] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
513 if len(add_mut14) == 0: |
4
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
3
diff
changeset
|
514 add_mut14 = new_mut |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
515 else: |
4
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
3
diff
changeset
|
516 add_mut14 = add_mut14 + ", " + new_mut |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
517 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
518 k1 = [] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
519 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
520 total1 = total1new = na1 = lowq1 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
521 ref1 = alt1 = ref1f = alt1f = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
522 k1 = [] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
523 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
524 if key2[:-5] + '.ab.2' in mut_dict[key1].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
525 total2 = sum(mut_dict[key1][key2[:-5] + '.ab.2'].values()) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
526 if 'na' in mut_dict[key1][key2[:-5] + '.ab.2'].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
527 na2 = mut_dict[key1][key2[:-5] + '.ab.2']['na'] |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
528 # na2f = na2 / total2 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
529 else: |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
530 # na2 = na2f = 0 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
531 na2 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
532 if 'lowQ' in mut_dict[key1][key2[:-5] + '.ab.2'].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
533 lowq2 = mut_dict[key1][key2[:-5] + '.ab.2']['lowQ'] |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
534 # lowq2f = lowq2 / total2 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
535 else: |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
536 # lowq2 = lowq2f = 0 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
537 lowq2 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
538 if ref in mut_dict[key1][key2[:-5] + '.ab.2'].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
539 ref2 = mut_dict[key1][key2[:-5] + '.ab.2'][ref] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
540 ref2f = ref2 / (total2 - na2 - lowq2) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
541 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
542 ref2 = ref2f = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
543 if alt in mut_dict[key1][key2[:-5] + '.ab.2'].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
544 alt2 = mut_dict[key1][key2[:-5] + '.ab.2'][alt] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
545 alt2f = alt2 / (total2 - na2 - lowq2) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
546 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
547 alt2 = alt2f = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
548 total2new = total2 - na2 - lowq2 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
549 if (key2[:-5] + '.ab.2') in mut_read_dict.keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
550 k2 = mut_read_dict[(key2[:-5] + '.ab.2')].keys() |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
551 add_mut2 = len(k2) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
552 if add_mut2 > 1: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
553 for k, v in mut_read_dict[(key2[:-5] + '.ab.2')].items(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
554 if k != key1: |
4
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
3
diff
changeset
|
555 new_mut = str(k).split("#")[0] + "-" + str(int(str(k).split("#")[1]) + 1) + "-" + v[1] + "-" + v[0] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
556 if len(add_mut23) == 0: |
4
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
3
diff
changeset
|
557 add_mut23 = new_mut |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
558 else: |
4
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
3
diff
changeset
|
559 add_mut23 = add_mut23 + ", " + new_mut |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
560 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
561 k2 = [] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
562 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
563 total2 = total2new = na2 = lowq2 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
564 ref2 = alt2 = ref2f = alt2f = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
565 k2 = [] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
566 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
567 if key2[:-5] + '.ba.1' in mut_dict[key1].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
568 total3 = sum(mut_dict[key1][key2[:-5] + '.ba.1'].values()) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
569 if 'na' in mut_dict[key1][key2[:-5] + '.ba.1'].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
570 na3 = mut_dict[key1][key2[:-5] + '.ba.1']['na'] |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
571 # na3f = na3 / total3 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
572 else: |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
573 # na3 = na3f = 0 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
574 na3 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
575 if 'lowQ' in mut_dict[key1][key2[:-5] + '.ba.1'].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
576 lowq3 = mut_dict[key1][key2[:-5] + '.ba.1']['lowQ'] |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
577 # lowq3f = lowq3 / total3 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
578 else: |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
579 # lowq3 = lowq3f = 0 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
580 lowq3 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
581 if ref in mut_dict[key1][key2[:-5] + '.ba.1'].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
582 ref3 = mut_dict[key1][key2[:-5] + '.ba.1'][ref] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
583 ref3f = ref3 / (total3 - na3 - lowq3) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
584 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
585 ref3 = ref3f = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
586 if alt in mut_dict[key1][key2[:-5] + '.ba.1'].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
587 alt3 = mut_dict[key1][key2[:-5] + '.ba.1'][alt] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
588 alt3f = alt3 / (total3 - na3 - lowq3) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
589 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
590 alt3 = alt3f = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
591 total3new = total3 - na3 - lowq3 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
592 if (key2[:-5] + '.ba.1') in mut_read_dict.keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
593 add_mut3 = len(mut_read_dict[(key2[:-5] + '.ba.1')].keys()) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
594 if add_mut3 > 1: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
595 for k, v in mut_read_dict[(key2[:-5] + '.ba.1')].items(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
596 if k != key1 and k not in k2: |
4
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
3
diff
changeset
|
597 new_mut = str(k).split("#")[0] + "-" + str(int(str(k).split("#")[1]) + 1) + "-" + v[1] + "-" + v[0] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
598 if len(add_mut23) == 0: |
4
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
3
diff
changeset
|
599 add_mut23 = new_mut |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
600 else: |
4
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
3
diff
changeset
|
601 add_mut23 = add_mut23 + ", " + new_mut |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
602 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
603 total3 = total3new = na3 = lowq3 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
604 ref3 = alt3 = ref3f = alt3f = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
605 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
606 if key2[:-5] + '.ba.2' in mut_dict[key1].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
607 total4 = sum(mut_dict[key1][key2[:-5] + '.ba.2'].values()) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
608 if 'na' in mut_dict[key1][key2[:-5] + '.ba.2'].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
609 na4 = mut_dict[key1][key2[:-5] + '.ba.2']['na'] |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
610 # na4f = na4 / total4 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
611 else: |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
612 # na4 = na4f = 0 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
613 na4 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
614 if 'lowQ' in mut_dict[key1][key2[:-5] + '.ba.2'].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
615 lowq4 = mut_dict[key1][key2[:-5] + '.ba.2']['lowQ'] |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
616 # lowq4f = lowq4 / total4 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
617 else: |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
618 # lowq4 = lowq4f = 0 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
619 lowq4 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
620 if ref in mut_dict[key1][key2[:-5] + '.ba.2'].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
621 ref4 = mut_dict[key1][key2[:-5] + '.ba.2'][ref] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
622 ref4f = ref4 / (total4 - na4 - lowq4) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
623 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
624 ref4 = ref4f = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
625 if alt in mut_dict[key1][key2[:-5] + '.ba.2'].keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
626 alt4 = mut_dict[key1][key2[:-5] + '.ba.2'][alt] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
627 alt4f = alt4 / (total4 - na4 - lowq4) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
628 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
629 alt4 = alt4f = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
630 total4new = total4 - na4 - lowq4 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
631 if (key2[:-5] + '.ba.2') in mut_read_dict.keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
632 add_mut4 = len(mut_read_dict[(key2[:-5] + '.ba.2')].keys()) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
633 if add_mut4 > 1: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
634 for k, v in mut_read_dict[(key2[:-5] + '.ba.2')].items(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
635 if k != key1 and k not in k1: |
4
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
3
diff
changeset
|
636 new_mut = str(k).split("#")[0] + "-" + str(int(str(k).split("#")[1]) + 1) + "-" + v[1] + "-" + v[0] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
637 if len(add_mut14) == 0: |
4
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
3
diff
changeset
|
638 add_mut14 = new_mut |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
639 else: |
4
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
3
diff
changeset
|
640 add_mut14 = add_mut14 + ", " + new_mut |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
641 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
642 total4 = total4new = na4 = lowq4 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
643 ref4 = alt4 = ref4f = alt4f = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
644 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
645 read_pos1 = read_pos2 = read_pos3 = read_pos4 = -1 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
646 read_len_median1 = read_len_median2 = read_len_median3 = read_len_median4 = 0 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
647 cigars_dcs1 = cigars_dcs2 = cigars_dcs3 = cigars_dcs4 = [] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
648 pos_read1 = pos_read2 = pos_read3 = pos_read4 = [] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
649 end_read1 = end_read2 = end_read3 = end_read4 = [] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
650 if key2[:-5] + '.ab.1' in mut_read_pos_dict[key1].keys(): |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
651 read_pos1 = np.median(np.array(mut_read_pos_dict[key1][key2[:-5] + '.ab.1'])) |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
652 read_len_median1 = np.median(np.array(reads_dict[key1][key2[:-5] + '.ab.1'])) |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
653 cigars_dcs1 = mut_read_cigar_dict[key1][key2[:-5] + '.ab.1'] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
654 pos_read1 = mut_read_pos_dict[key1][key2[:-5] + '.ab.1'] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
655 end_read1 = reads_dict[key1][key2[:-5] + '.ab.1'] |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
656 ref_positions1 = real_start_end[key1][key2[:-5] + '.ab.1'] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
657 if key2[:-5] + '.ab.2' in mut_read_pos_dict[key1].keys(): |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
658 read_pos2 = np.median(np.array(mut_read_pos_dict[key1][key2[:-5] + '.ab.2'])) |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
659 read_len_median2 = np.median(np.array(reads_dict[key1][key2[:-5] + '.ab.2'])) |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
660 cigars_dcs2 = mut_read_cigar_dict[key1][key2[:-5] + '.ab.2'] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
661 pos_read2 = mut_read_pos_dict[key1][key2[:-5] + '.ab.2'] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
662 end_read2 = reads_dict[key1][key2[:-5] + '.ab.2'] |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
663 ref_positions2 = real_start_end[key1][key2[:-5] + '.ab.2'] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
664 if key2[:-5] + '.ba.1' in mut_read_pos_dict[key1].keys(): |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
665 read_pos3 = np.median(np.array(mut_read_pos_dict[key1][key2[:-5] + '.ba.1'])) |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
666 read_len_median3 = np.median(np.array(reads_dict[key1][key2[:-5] + '.ba.1'])) |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
667 cigars_dcs3 = mut_read_cigar_dict[key1][key2[:-5] + '.ba.1'] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
668 pos_read3 = mut_read_pos_dict[key1][key2[:-5] + '.ba.1'] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
669 end_read3 = reads_dict[key1][key2[:-5] + '.ba.1'] |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
670 ref_positions3 = real_start_end[key1][key2[:-5] + '.ba.1'] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
671 if key2[:-5] + '.ba.2' in mut_read_pos_dict[key1].keys(): |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
672 read_pos4 = np.median(np.array(mut_read_pos_dict[key1][key2[:-5] + '.ba.2'])) |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
673 read_len_median4 = np.median(np.array(reads_dict[key1][key2[:-5] + '.ba.2'])) |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
674 cigars_dcs4 = mut_read_cigar_dict[key1][key2[:-5] + '.ba.2'] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
675 pos_read4 = mut_read_pos_dict[key1][key2[:-5] + '.ba.2'] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
676 end_read4 = reads_dict[key1][key2[:-5] + '.ba.2'] |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
677 ref_positions4 = real_start_end[key1][key2[:-5] + '.ba.2'] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
678 |
79
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
679 # if variant_type == "alt": |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
680 used_keys.append(key2[:-5]) |
79
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
681 # elif variant_type == "ref": |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
682 # used_keys_ref.append(key2[:-5]) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
683 counts_mut += 1 |
82
c2e8932b4d8d
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
81
diff
changeset
|
684 |
c2e8932b4d8d
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
81
diff
changeset
|
685 if key2[:-5] == "CTTGAACACGTCAGCATGCATGGAGA": |
c2e8932b4d8d
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
81
diff
changeset
|
686 print(key1, variant_type, (alt1f + alt2f + alt3f + alt4f) > 0.5, (ref1f + ref2f + ref3f + ref4f) > 0.5) |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
687 if (variant_type == "alt" and ((alt1f + alt2f + alt3f + alt4f) > 0.5)) or (variant_type == "ref" and ((ref1f + ref2f + ref3f + ref4f) > 0.5)): |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
688 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
689 tier1ff, tier2ff, tier3ff, tier4ff = alt1f, alt2f, alt3f, alt4f |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
690 tier1ff_trim, tier2ff_trim, tier3ff_trim, tier4ff_trim = alt1f, alt2f, alt3f, alt4f |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
691 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
692 tier1ff, tier2ff, tier3ff, tier4ff = ref1f, ref2f, ref3f, ref4f |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
693 tier1ff_trim, tier2ff_trim, tier3ff_trim, tier4ff_trim = ref1f, ref2f, ref3f, ref4f |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
694 |
76
56f271641828
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
75
diff
changeset
|
695 total1new_trim, total2new_trim, total3new_trim, total4new_trim = total1new, total2new, total3new, total4new |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
696 if total1new == 0: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
697 ref1f = alt1f = None |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
698 alt1ff = -1 |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
699 alt1ff_trim = -1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
700 tier1ff = -1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
701 tier1ff_trim = -1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
702 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
703 alt1ff = alt1f |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
704 alt1ff_trim = alt1f |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
705 tier1ff = tier1ff |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
706 tier1ff_trim = tier1ff_trim |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
707 if total2new == 0: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
708 ref2f = alt2f = None |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
709 alt2ff = -1 |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
710 alt2ff_trim = -1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
711 tier2ff = -1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
712 tier2ff_trim = -1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
713 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
714 alt2ff = alt2f |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
715 alt2ff_trim = alt2f |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
716 tier2ff = tier2ff |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
717 tier2ff_trim = tier2ff_trim |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
718 if total3new == 0: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
719 ref3f = alt3f = None |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
720 alt3ff = -1 |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
721 alt3ff_trim = -1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
722 tier3ff = -1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
723 tier3ff_trim = -1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
724 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
725 alt3ff = alt3f |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
726 alt3ff_trim = alt3f |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
727 tier3ff = tier3ff |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
728 tier3ff_trim = tier3ff_trim |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
729 if total4new == 0: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
730 ref4f = alt4f = None |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
731 alt4ff = -1 |
69
c44475567466
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
68
diff
changeset
|
732 alt4ff_trim = -1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
733 tier4ff = -1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
734 tier4ff_trim = -1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
735 else: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
736 alt4ff = alt4f |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
737 alt4ff_trim = alt4f |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
738 tier4ff = tier4ff |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
739 tier4ff_trim = tier4ff_trim |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
740 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
741 beg1 = beg4 = beg2 = beg3 = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
742 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
743 details1 = (total1, total4, total1new, total4new, ref1, ref4, alt1, alt4, ref1f, ref4f, alt1f, alt4f, na1, na4, lowq1, lowq4, beg1, beg4) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
744 details2 = (total2, total3, total2new, total3new, ref2, ref3, alt2, alt3, ref2f, ref3f, alt2f, alt3f, na2, na3, lowq2, lowq3, beg2, beg3) |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
745 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
746 trimmed = False |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
747 contradictory = False |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
748 softclipped_mutation_allMates = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
749 softclipped_mutation_oneOfTwoMates = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
750 softclipped_mutation_oneOfTwoSSCS = False |
59
0b3df6ea1434
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
58
diff
changeset
|
751 softclipped_mutation_oneOfTwoSSCS_diffMates = False |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
752 softclipped_mutation_oneMate = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
753 softclipped_mutation_oneMateOneSSCS = False |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
754 |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
755 trimmed_actual_high_tier = False |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
756 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
757 dist_start_read1 = dist_start_read2 = dist_start_read3 = dist_start_read4 = [] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
758 dist_end_read1 = dist_end_read2 = dist_end_read3 = dist_end_read4 = [] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
759 ratio_dist_start1 = ratio_dist_start2 = ratio_dist_start3 = ratio_dist_start4 = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
760 ratio_dist_end1 = ratio_dist_end2 = ratio_dist_end3 = ratio_dist_end4 = False |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
761 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
762 # mate 1 - SSCS ab |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
763 softclipped_idx1 = [True if re.search(r"^[0-9]+S", string) or re.search(r"S$", string) else False for string in cigars_dcs1] |
77
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
764 safe_div_result = safe_div(sum(softclipped_idx1), float(len(softclipped_idx1))) |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
765 if (safe_div_result is None): |
77
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
766 ratio1 = False |
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
767 else: |
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
768 ratio1 = safe_div_result >= threshold_reads |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
769 if any(ij is True for ij in softclipped_idx1): |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
770 softclipped_both_ends_idx1 = [True if (re.search(r"^[0-9]+S", string) and re.search(r"S$", string)) else False for string in cigars_dcs1] |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
771 softclipped_start1 = [int(string.split("S")[0]) if re.search(r"^[0-9]+S", string) else -1 for string in cigars_dcs1] |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
772 softclipped_end1 = [int(re.split("[A-Z]", str(string))[-2]) if re.search(r"S$", string) else -1 for string in cigars_dcs1] |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
773 dist_start_read1 = [(pos - soft) if soft != -1 else thr + 1000 for soft, pos in zip(softclipped_start1, pos_read1)] |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
774 dist_end_read1 = [(length_read - pos - soft) if soft != -1 else thr + 1000 for soft, pos, length_read in zip(softclipped_end1, pos_read1, end_read1)] |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
775 # if read at both ends softclipped --> select end with smallest distance between mut position and softclipping |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
776 if any(ij is True for ij in softclipped_both_ends_idx1): |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
777 for nr, indx in enumerate(softclipped_both_ends_idx1): |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
778 if indx: |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
779 if dist_start_read1[nr] <= dist_end_read1[nr]: |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
780 dist_end_read1[nr] = thr + 1000 # use dist of start and set start to very large number |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
781 else: |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
782 dist_start_read1[nr] = thr + 1000 # use dist of end and set start to very large number |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
783 ratio_dist_start1 = safe_div(sum([True if x <= thr else False for x in dist_start_read1]), float(sum(softclipped_idx1))) >= threshold_reads |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
784 ratio_dist_end1 = safe_div(sum([True if x <= thr else False for x in dist_end_read1]), float(sum(softclipped_idx1))) >= threshold_reads |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
785 |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
786 # mate 1 - SSCS ba |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
787 softclipped_idx4 = [True if re.search(r"^[0-9]+S", string) or re.search(r"S$", string) else False for string in cigars_dcs4] |
77
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
788 safe_div_result = safe_div(sum(softclipped_idx4), float(len(softclipped_idx4))) |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
789 if (safe_div_result is None): |
77
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
790 ratio4 = False |
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
791 else: |
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
792 ratio4 = safe_div_result >= threshold_reads |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
793 if any(ij is True for ij in softclipped_idx4): |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
794 softclipped_both_ends_idx4 = [True if (re.search(r"^[0-9]+S", string) and re.search(r"S$", string)) else False for string in cigars_dcs4] |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
795 softclipped_start4 = [int(string.split("S")[0]) if re.search(r"^[0-9]+S", string) else -1 for string in cigars_dcs4] |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
796 softclipped_end4 = [int(re.split("[A-Z]", str(string))[-2]) if re.search(r"S$", string) else -1 for string in cigars_dcs4] |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
797 dist_start_read4 = [(pos - soft) if soft != -1 else thr + 1000 for soft, pos in zip(softclipped_start4, pos_read4)] |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
798 dist_end_read4 = [(length_read - pos - soft) if soft != -1 else thr + 1000 for soft, pos, length_read in zip(softclipped_end4, pos_read4, end_read4)] |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
799 # if read at both ends softclipped --> select end with smallest distance between mut position and softclipping |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
800 if any(ij is True for ij in softclipped_both_ends_idx4): |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
801 for nr, indx in enumerate(softclipped_both_ends_idx4): |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
802 if indx: |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
803 if dist_start_read4[nr] <= dist_end_read4[nr]: |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
804 dist_end_read4[nr] = thr + 1000 # use dist of start and set start to very large number |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
805 else: |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
806 dist_start_read4[nr] = thr + 1000 # use dist of end and set start to very large number |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
807 ratio_dist_start4 = safe_div(sum([True if x <= thr else False for x in dist_start_read4]), float(sum(softclipped_idx4))) >= threshold_reads |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
808 ratio_dist_end4 = safe_div(sum([True if x <= thr else False for x in dist_end_read4]), float(sum(softclipped_idx4))) >= threshold_reads |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
809 |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
810 # mate 2 - SSCS ab |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
811 softclipped_idx2 = [True if re.search(r"^[0-9]+S", string) or re.search(r"S$", string) else False for string in cigars_dcs2] |
77
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
812 safe_div_result = safe_div(sum(softclipped_idx2), float(len(softclipped_idx2))) |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
813 if (safe_div_result is None): |
77
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
814 ratio2 = False |
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
815 else: |
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
816 ratio2 = safe_div_result >= threshold_reads |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
817 if any(ij is True for ij in softclipped_idx2): |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
818 softclipped_both_ends_idx2 = [True if (re.search(r"^[0-9]+S", string) and re.search(r"S$", string)) else False for string in cigars_dcs2] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
819 softclipped_start2 = [int(string.split("S")[0]) if re.search(r"^[0-9]+S", string) else -1 for string in cigars_dcs2] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
820 softclipped_end2 = [int(re.split("[A-Z]", str(string))[-2]) if re.search(r"S$", string) else -1 for string in cigars_dcs2] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
821 dist_start_read2 = [(pos - soft) if soft != -1 else thr + 1000 for soft, pos in zip(softclipped_start2, pos_read2)] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
822 dist_end_read2 = [(length_read - pos - soft) if soft != -1 else thr + 1000 for soft, pos, length_read in zip(softclipped_end2, pos_read2, end_read2)] |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
823 # if read at both ends softclipped --> select end with smallest distance between mut position and softclipping |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
824 if any(ij is True for ij in softclipped_both_ends_idx2): |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
825 for nr, indx in enumerate(softclipped_both_ends_idx2): |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
826 if indx: |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
827 if dist_start_read2[nr] <= dist_end_read2[nr]: |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
828 dist_end_read2[nr] = thr + 1000 # use dist of start and set start to very large number |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
829 else: |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
830 dist_start_read2[nr] = thr + 1000 # use dist of end and set start to very large number |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
831 ratio_dist_start2 = safe_div(sum([True if x <= thr else False for x in dist_start_read2]), float(sum(softclipped_idx2))) >= threshold_reads |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
832 ratio_dist_end2 = safe_div(sum([True if x <= thr else False for x in dist_end_read2]), float(sum(softclipped_idx2))) >= threshold_reads |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
833 |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
834 # mate 2 - SSCS ba |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
835 softclipped_idx3 = [True if re.search(r"^[0-9]+S", string) or re.search(r"S$", string) else False for string in cigars_dcs3] |
77
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
836 safe_div_result = safe_div(sum(softclipped_idx3), float(len(softclipped_idx3))) |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
837 if (safe_div_result is None): |
77
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
838 ratio3 = False |
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
839 else: |
1797e461d674
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
76
diff
changeset
|
840 ratio3 = safe_div_result >= threshold_reads |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
841 if any(ij is True for ij in softclipped_idx3): |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
842 softclipped_both_ends_idx3 = [True if (re.search(r"^[0-9]+S", string) and re.search(r"S$", string)) else False for string in cigars_dcs3] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
843 softclipped_start3 = [int(string.split("S")[0]) if re.search(r"^[0-9]+S", string) else -1 for string in cigars_dcs3] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
844 softclipped_end3 = [int(re.split("[A-Z]", str(string))[-2]) if re.search(r"S$", string) else -1 for string in cigars_dcs3] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
845 dist_start_read3 = [(pos - soft) if soft != -1 else thr + 1000 for soft, pos in zip(softclipped_start3, pos_read3)] |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
846 dist_end_read3 = [(length_read - pos - soft) if soft != -1 else thr + 1000 for soft, pos, length_read in zip(softclipped_end3, pos_read3, end_read3)] |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
847 # if read at both ends softclipped --> select end with smallest distance between mut position and softclipping |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
848 if any(ij is True for ij in softclipped_both_ends_idx3): |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
849 for nr, indx in enumerate(softclipped_both_ends_idx3): |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
850 if indx: |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
851 if dist_start_read3[nr] <= dist_end_read3[nr]: |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
852 dist_end_read3[nr] = thr + 1000 # use dist of start and set start to a larger number than thresh |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
853 else: |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
854 dist_start_read3[nr] = thr + 1000 # use dist of end and set start to very large number |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
855 ratio_dist_start3 = safe_div(sum([True if x <= thr else False for x in dist_start_read3]), float(sum(softclipped_idx3))) >= threshold_reads |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
856 ratio_dist_end3 = safe_div(sum([True if x <= thr else False for x in dist_end_read3]), float(sum(softclipped_idx3))) >= threshold_reads |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
857 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
858 if ((all(float(ij) >= 0.5 for ij in [tier1ff, tier4ff]) & # contradictory variant |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
859 all(float(ij) == 0. for ij in [tier2ff, tier3ff])) | |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
860 (all(float(ij) >= 0.5 for ij in [tier2ff, tier3ff]) & |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
861 all(float(ij) == 0. for ij in [tier1ff, tier4ff]))): |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
862 tier1ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
863 tier4ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
864 tier2ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
865 tier3ff = 0 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
866 trimmed = False |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
867 contradictory = True |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
868 # softclipping tiers |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
869 # information of both mates available --> all reads for both mates and SSCS are softclipped |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
870 elif (ratio1 & ratio4 & ratio2 & ratio3 & |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
871 (ratio_dist_start1 | ratio_dist_end1) & (ratio_dist_start4 | ratio_dist_end4) & (ratio_dist_start2 | ratio_dist_end2) & (ratio_dist_start3 | ratio_dist_end3) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
872 all(float(ij) > 0. for ij in [tier1ff, tier2ff, tier3ff, tier4ff])): # all mates available |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
873 # if distance between softclipping and mutation is at start or end of the read smaller than threshold |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
874 softclipped_mutation_allMates = True |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
875 softclipped_mutation_oneOfTwoMates = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
876 softclipped_mutation_oneOfTwoSSCS = False |
59
0b3df6ea1434
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
58
diff
changeset
|
877 softclipped_mutation_oneOfTwoSSCS_diffMates = False |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
878 softclipped_mutation_oneMate = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
879 softclipped_mutation_oneMateOneSSCS = False |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
880 tier1ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
881 tier4ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
882 tier2ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
883 tier3ff = 0 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
884 trimmed = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
885 contradictory = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
886 # information of both mates available --> only one mate softclipped |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
887 elif (((ratio1 & ratio4 & (ratio_dist_start1 | ratio_dist_end1) & (ratio_dist_start4 | ratio_dist_end4)) | |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
888 (ratio2 & ratio3 & (ratio_dist_start2 | ratio_dist_end2) & (ratio_dist_start3 | ratio_dist_end3))) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
889 all(float(ij) > 0. for ij in [tier1ff, tier2ff, tier3ff, tier4ff])): # all mates available |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
890 # if distance between softclipping and mutation is at start or end of the read smaller than threshold |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
891 min_start1 = min(min([ij[0] for ij in ref_positions1]), min([ij[0] for ij in ref_positions4])) # red |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
892 min_start2 = min(min([ij[0] for ij in ref_positions2]), min([ij[0] for ij in ref_positions3])) # blue |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
893 max_end1 = max(max([ij[1] for ij in ref_positions1]), max([ij[1] for ij in ref_positions4])) # red |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
894 max_end2 = max(max([ij[1] for ij in ref_positions2]), max([ij[1] for ij in ref_positions3])) # blue |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
895 if (min_start1 > min_start2) or (max_end1 > max_end2): # if mate1 is red and mate2 is blue |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
896 softclipped_mutation_oneOfTwoMates = False |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
897 # blue mate at beginning softclipped |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
898 if min_start1 > min_start2: |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
899 n_spacer_barcode = min_start1 - min_start2 |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
900 read_pos2 = read_pos2 - n_spacer_barcode |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
901 read_pos3 = read_pos3 - n_spacer_barcode |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
902 read_len_median2 = read_len_median2 - n_spacer_barcode |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
903 read_len_median3 = read_len_median3 - n_spacer_barcode |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
904 # red mate at end softclipped |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
905 if max_end1 > max_end2: |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
906 n_spacer_barcode = max_end1 - max_end2 |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
907 read_len_median1 = read_len_median1 - n_spacer_barcode |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
908 read_len_median4 = read_len_median4 - n_spacer_barcode |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
909 elif (min_start1 < min_start2) or (max_end1 < max_end2): # if mate1 is blue and mate2 is red |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
910 softclipped_mutation_oneOfTwoMates = False |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
911 if min_start1 < min_start2: |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
912 n_spacer_barcode = min_start2 - min_start1 |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
913 read_pos1 = read_pos1 - n_spacer_barcode |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
914 read_pos4 = read_pos4 - n_spacer_barcode |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
915 read_len_median1 = read_len_median1 - n_spacer_barcode |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
916 read_len_median4 = read_len_median4 - n_spacer_barcode |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
917 if max_end1 < max_end2: # if mate1 ends after mate 2 starts |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
918 n_spacer_barcode = max_end2 - max_end1 |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
919 read_len_median2 = read_len_median2 - n_spacer_barcode |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
920 read_len_median3 = read_len_median3 - n_spacer_barcode |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
921 else: |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
922 softclipped_mutation_oneOfTwoMates = True |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
923 tier1ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
924 tier4ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
925 tier2ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
926 tier3ff = 0 |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
927 trimmed = False |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
928 contradictory = False |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
929 softclipped_mutation_allMates = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
930 softclipped_mutation_oneOfTwoSSCS = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
931 softclipped_mutation_oneMate = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
932 softclipped_mutation_oneMateOneSSCS = False |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
933 |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
934 if softclipped_mutation_oneOfTwoMates is False: # check trimming tier |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
935 if ((read_pos1 >= 0) and ((read_pos1 <= trim) | (abs(read_len_median1 - read_pos1) <= trim))): |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
936 beg1 = total1new |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
937 total1new = 0 |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
938 alt1ff = 0 |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
939 alt1f = 0 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
940 tier1ff = 0 |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
941 trimmed = True |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
942 |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
943 if ((read_pos4 >= 0) and ((read_pos4 <= trim) | (abs(read_len_median4 - read_pos4) <= trim))): |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
944 beg4 = total4new |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
945 total4new = 0 |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
946 alt4ff = 0 |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
947 alt4f = 0 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
948 tier4ff = 0 |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
949 trimmed = True |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
950 |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
951 if ((read_pos2 >= 0) and ((read_pos2 <= trim) | (abs(read_len_median2 - read_pos2) <= trim))): |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
952 beg2 = total2new |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
953 total2new = 0 |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
954 alt2ff = 0 |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
955 alt2f = 0 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
956 tier2ff = 0 |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
957 trimmed = True |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
958 |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
959 if ((read_pos3 >= 0) and ((read_pos3 <= trim) | (abs(read_len_median3 - read_pos3) <= trim))): |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
960 beg3 = total3new |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
961 total3new = 0 |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
962 alt3ff = 0 |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
963 alt3f = 0 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
964 tier3ff = 0 |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
965 trimmed = True |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
966 details1 = (total1, total4, total1new, total4new, ref1, ref4, alt1, alt4, ref1f, ref4f, alt1f, alt4f, na1, na4, lowq1, lowq4, beg1, beg4) |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
967 details2 = (total2, total3, total2new, total3new, ref2, ref3, alt2, alt3, ref2f, ref3f, alt2f, alt3f, na2, na3, lowq2, lowq3, beg2, beg3) |
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
968 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
969 # information of both mates available --> only one mate softclipped |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
970 elif (((ratio1 & (ratio_dist_start1 | ratio_dist_end1)) | (ratio4 & (ratio_dist_start4 | ratio_dist_end4))) & |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
971 ((ratio2 & (ratio_dist_start2 | ratio_dist_end2)) | (ratio3 & (ratio_dist_start3 | ratio_dist_end3))) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
972 all(float(ij) > 0. for ij in [tier1ff, tier2ff, tier3ff, tier4ff])): # all mates available |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
973 # if distance between softclipping and mutation is at start or end of the read smaller than threshold |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
974 softclipped_mutation_allMates = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
975 softclipped_mutation_oneOfTwoMates = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
976 softclipped_mutation_oneOfTwoSSCS = True |
59
0b3df6ea1434
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
58
diff
changeset
|
977 softclipped_mutation_oneOfTwoSSCS_diffMates = False |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
978 softclipped_mutation_oneMate = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
979 softclipped_mutation_oneMateOneSSCS = False |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
980 tier1ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
981 tier4ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
982 tier2ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
983 tier3ff = 0 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
984 trimmed = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
985 contradictory = False |
59
0b3df6ea1434
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
58
diff
changeset
|
986 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
987 # information of one mate available --> all reads of one mate are softclipped |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
988 elif ((ratio1 & ratio4 & (ratio_dist_start1 | ratio_dist_end1) & (ratio_dist_start4 | ratio_dist_end4) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
989 all(float(ij) < 0. for ij in [tier2ff, tier3ff]) & all(float(ij) > 0. for ij in [tier1ff, tier4ff])) | |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
990 (ratio2 & ratio3 & (ratio_dist_start2 | ratio_dist_end2) & (ratio_dist_start3 | ratio_dist_end3) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
991 all(float(ij) < 0. for ij in [tier1ff, tier4ff]) & all(float(ij) > 0. for ij in [tier2ff, tier3ff]))): # all mates available |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
992 # if distance between softclipping and mutation is at start or end of the read smaller than threshold |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
993 softclipped_mutation_allMates = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
994 softclipped_mutation_oneOfTwoMates = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
995 softclipped_mutation_oneOfTwoSSCS = False |
59
0b3df6ea1434
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
58
diff
changeset
|
996 softclipped_mutation_oneOfTwoSSCS_diffMates = False |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
997 softclipped_mutation_oneMate = True |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
998 softclipped_mutation_oneMateOneSSCS = False |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
999 tier1ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1000 tier4ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1001 tier2ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1002 tier3ff = 0 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1003 trimmed = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1004 contradictory = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1005 # information of one mate available --> only one SSCS is softclipped |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1006 elif ((((ratio1 & (ratio_dist_start1 | ratio_dist_end1)) | (ratio4 & (ratio_dist_start4 | ratio_dist_end4))) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1007 (all(float(ij) < 0. for ij in [tier2ff, tier3ff]) & all(float(ij) > 0. for ij in [tier1ff, tier4ff]))) | |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
1008 (((ratio2 & (ratio_dist_start2 | ratio_dist_end2)) | (ratio3 & (ratio_dist_start3 | ratio_dist_end3))) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1009 (all(float(ij) < 0. for ij in [tier1ff, tier4ff]) & all(float(ij) < 0. for ij in [tier2ff, tier3ff])))): # all mates available |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
1010 # if distance between softclipping and mutation is at start or end of the read smaller than threshold |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1011 softclipped_mutation_allMates = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1012 softclipped_mutation_oneOfTwoMates = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1013 softclipped_mutation_oneOfTwoSSCS = False |
59
0b3df6ea1434
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
58
diff
changeset
|
1014 softclipped_mutation_oneOfTwoSSCS_diffMates = False |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1015 softclipped_mutation_oneMate = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1016 softclipped_mutation_oneMateOneSSCS = True |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1017 tier1ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1018 tier4ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1019 tier2ff = 0 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1020 tier3ff = 0 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1021 trimmed = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1022 contradictory = False |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1023 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1024 else: |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1025 if ((read_pos1 >= 0) and ((read_pos1 <= trim) | (abs(read_len_median1 - read_pos1) <= trim))): |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1026 beg1 = total1new |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1027 total1new = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1028 alt1ff = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1029 alt1f = 0 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1030 tier1ff = 0 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1031 trimmed = True |
28
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1032 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1033 if ((read_pos4 >= 0) and ((read_pos4 <= trim) | (abs(read_len_median4 - read_pos4) <= trim))): |
28
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1034 beg4 = total4new |
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1035 total4new = 0 |
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1036 alt4ff = 0 |
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1037 alt4f = 0 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1038 tier4ff = 0 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1039 trimmed = True |
28
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1040 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1041 if ((read_pos2 >= 0) and ((read_pos2 <= trim) | (abs(read_len_median2 - read_pos2) <= trim))): |
28
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1042 beg2 = total2new |
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1043 total2new = 0 |
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1044 alt2ff = 0 |
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1045 alt2f = 0 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1046 tier2ff = 0 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1047 trimmed = True |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
1048 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1049 if ((read_pos3 >= 0) and ((read_pos3 <= trim) | (abs(read_len_median3 - read_pos3) <= trim))): |
28
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1050 beg3 = total3new |
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1051 total3new = 0 |
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1052 alt3ff = 0 |
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1053 alt3f = 0 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1054 tier3ff = 0 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1055 trimmed = True |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1056 details1 = (total1, total4, total1new, total4new, ref1, ref4, alt1, alt4, ref1f, ref4f, alt1f, alt4f, na1, na4, lowq1, lowq4, beg1, beg4) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1057 details2 = (total2, total3, total2new, total3new, ref2, ref3, alt2, alt3, ref2f, ref3f, alt2f, alt3f, na2, na3, lowq2, lowq3, beg2, beg3) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1058 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1059 # assign tiers |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1060 if ((all(int(ij) >= 3 for ij in [total1new, total4new]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1061 all(float(ij) >= 0.75 for ij in [tier1ff, tier4ff])) | |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1062 (all(int(ij) >= 3 for ij in [total2new, total3new]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1063 all(float(ij) >= 0.75 for ij in [tier2ff, tier3ff]))): |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1064 tier = "1.1" |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1065 counter_tier11 += 1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1066 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1067 tier_dict[key1]["tier 1.1"] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1068 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1069 tier_dict_ref[key1]["tier 1.1"] += 1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1070 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1071 elif (all(int(ij) >= 1 for ij in [total1new, total2new, total3new, total4new]) & |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1072 any(int(ij) >= 3 for ij in [total1new, total4new]) & |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1073 any(int(ij) >= 3 for ij in [total2new, total3new]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1074 all(float(ij) >= 0.75 for ij in [tier1ff, tier2ff, tier3ff, tier4ff])): |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1075 tier = "1.2" |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1076 counter_tier12 += 1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1077 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1078 tier_dict[key1]["tier 1.2"] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1079 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1080 tier_dict_ref[key1]["tier 1.2"] += 1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1081 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1082 elif ((all(int(ij) >= 1 for ij in [total1new, total4new]) & |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1083 any(int(ij) >= 3 for ij in [total1new, total4new]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1084 all(float(ij) >= 0.75 for ij in [tier1ff, tier4ff])) | |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1085 (all(int(ij) >= 1 for ij in [total2new, total3new]) & |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1086 any(int(ij) >= 3 for ij in [total2new, total3new]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1087 all(float(ij) >= 0.75 for ij in [tier2ff, tier3ff]))): |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1088 tier = "2.1" |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1089 counter_tier21 += 1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1090 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1091 tier_dict[key1]["tier 2.1"] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1092 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1093 tier_dict_ref[key1]["tier 2.1"] += 1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1094 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1095 elif (all(int(ij) >= 1 for ij in [total1new, total2new, total3new, total4new]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1096 all(float(ij) >= 0.75 for ij in [tier1ff, tier2ff, tier3ff, tier4ff])): |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1097 tier = "2.2" |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1098 counter_tier22 += 1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1099 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1100 tier_dict[key1]["tier 2.2"] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1101 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1102 tier_dict_ref[key1]["tier 2.2"] += 1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1103 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1104 elif ((all(int(ij) >= 1 for ij in [total1new, total4new]) & |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1105 any(int(ij) >= 3 for ij in [total2new, total3new]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1106 all(float(ij) >= 0.75 for ij in [tier1ff, tier4ff]) & |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1107 any(float(ij) >= 0.75 for ij in [tier2ff, tier3ff])) | |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1108 (all(int(ij) >= 1 for ij in [total2new, total3new]) & |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1109 any(int(ij) >= 3 for ij in [total1new, total4new]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1110 all(float(ij) >= 0.75 for ij in [tier2ff, tier3ff]) & |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1111 any(float(ij) >= 0.75 for ij in [tier1ff, tier4ff]))): |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1112 tier = "2.3" |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1113 counter_tier23 += 1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1114 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1115 tier_dict[key1]["tier 2.3"] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1116 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1117 tier_dict_ref[key1]["tier 2.3"] += 1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1118 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1119 elif ((all(int(ij) >= 1 for ij in [total1new, total4new]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1120 all(float(ij) >= 0.75 for ij in [tier1ff, tier4ff])) | |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1121 (all(int(ij) >= 1 for ij in [total2new, total3new]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1122 all(float(ij) >= 0.75 for ij in [tier2ff, tier3ff]))): |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1123 tier = "2.4" |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1124 counter_tier24 += 1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1125 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1126 tier_dict[key1]["tier 2.4"] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1127 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1128 tier_dict_ref[key1]["tier 2.4"] += 1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1129 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1130 elif ((len(pure_tags_dict_short[key1]) > 1) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1131 (all(float(ij) >= 0.5 for ij in [tier1ff, tier4ff]) | |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1132 all(float(ij) >= 0.5 for ij in [tier2ff, tier3ff]))): |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1133 tier = "3.1" |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1134 counter_tier31 += 1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1135 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1136 tier_dict[key1]["tier 3.1"] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1137 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1138 tier_dict_ref[key1]["tier 3.1"] += 1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1139 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1140 elif ((all(int(ij) >= 1 for ij in [total1new, total4new]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1141 all(float(ij) >= 0.5 for ij in [tier1ff, tier4ff])) | |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1142 (all(int(ij) >= 1 for ij in [total2new, total3new]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1143 all(float(ij) >= 0.5 for ij in [tier2ff, tier3ff]))): |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1144 tier = "3.2" |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1145 counter_tier32 += 1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1146 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1147 tier_dict[key1]["tier 3.2"] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1148 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1149 tier_dict_ref[key1]["tier 3.2"] += 1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1150 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1151 elif (trimmed): |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1152 tier = "4" |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1153 counter_tier4 += 1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1154 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1155 tier_dict[key1]["tier 4"] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1156 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1157 tier_dict_ref[key1]["tier 4"] += 1 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1158 |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
1159 # assign tiers |
64
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1160 if ((all(int(ij) >= 3 for ij in [total1new_trim, total4new_trim]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1161 all(float(ij) >= 0.75 for ij in [tier1ff_trim, tier4ff_trim])) | |
64
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1162 (all(int(ij) >= 3 for ij in [total2new_trim, total3new_trim]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1163 all(float(ij) >= 0.75 for ij in [tier2ff_trim, tier3ff_trim]))): |
64
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1164 trimmed_actual_high_tier = True |
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1165 elif (all(int(ij) >= 1 for ij in [total1new_trim, total2new_trim, total3new_trim, total4new_trim]) & |
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1166 any(int(ij) >= 3 for ij in [total1new_trim, total4new_trim]) & |
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1167 any(int(ij) >= 3 for ij in [total2new_trim, total3new_trim]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1168 all(float(ij) >= 0.75 for ij in [tier1ff_trim, tier2ff_trim, tier3ff_trim, tier4ff_trim])): |
65
712a37137b1f
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
64
diff
changeset
|
1169 trimmed_actual_high_tier = True |
712a37137b1f
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
64
diff
changeset
|
1170 elif ((all(int(ij) >= 1 for ij in [total1new_trim, total4new_trim]) & |
712a37137b1f
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
64
diff
changeset
|
1171 any(int(ij) >= 3 for ij in [total1new_trim, total4new_trim]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1172 all(float(ij) >= 0.75 for ij in [tier1ff_trim, tier4ff_trim])) | |
64
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1173 (all(int(ij) >= 1 for ij in [total2new_trim, total3new_trim]) & |
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1174 any(int(ij) >= 3 for ij in [total2new_trim, total3new_trim]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1175 all(float(ij) >= 0.75 for ij in [tier2ff_trim, tier3ff_trim]))): |
64
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1176 trimmed_actual_high_tier = True |
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1177 elif (all(int(ij) >= 1 for ij in [total1new_trim, total2new_trim, total3new_trim, total4new_trim]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1178 all(float(ij) >= 0.75 for ij in [tier1ff_trim, tier2ff_trim, tier3ff_trim, tier4ff_trim])): |
64
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1179 trimmed_actual_high_tier = True |
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1180 elif ((all(int(ij) >= 1 for ij in [total1new_trim, total4new_trim]) & |
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1181 any(int(ij) >= 3 for ij in [total2new_trim, total3new_trim]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1182 all(float(ij) >= 0.75 for ij in [tier1ff_trim, tier4ff_trim]) & |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1183 any(float(ij) >= 0.75 for ij in [tier2ff_trim, tier3ff_trim])) | |
64
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1184 (all(int(ij) >= 1 for ij in [total2new_trim, total3new_trim]) & |
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1185 any(int(ij) >= 3 for ij in [total1new_trim, total4new_trim]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1186 all(float(ij) >= 0.75 for ij in [tier2ff_trim, tier3ff_trim]) & |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1187 any(float(ij) >= 0.75 for ij in [tier1ff_trim, tier4ff_trim]))): |
64
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1188 trimmed_actual_high_tier = True |
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1189 elif ((all(int(ij) >= 1 for ij in [total1new_trim, total4new_trim]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1190 all(float(ij) >= 0.75 for ij in [tier1ff_trim, tier4ff_trim])) | |
64
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1191 (all(int(ij) >= 1 for ij in [total2new_trim, total3new_trim]) & |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1192 all(float(ij) >= 0.75 for ij in [tier2ff_trim, tier3ff_trim]))): |
64
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1193 trimmed_actual_high_tier = True |
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1194 else: |
fd342f5a97d9
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
63
diff
changeset
|
1195 trimmed_actual_high_tier = False |
61
3722268ffac5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
60
diff
changeset
|
1196 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1197 elif softclipped_mutation_allMates: |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1198 tier = "5.1" |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1199 counter_tier51 += 1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1200 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1201 tier_dict[key1]["tier 5.1"] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1202 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1203 tier_dict_ref[key1]["tier 5.1"] += 1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1204 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1205 elif softclipped_mutation_oneOfTwoMates: |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1206 tier = "5.2" |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1207 counter_tier52 += 1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1208 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1209 tier_dict[key1]["tier 5.2"] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1210 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1211 tier_dict_ref[key1]["tier 5.2"] += 1 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1212 |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1213 elif softclipped_mutation_oneOfTwoSSCS: |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1214 tier = "5.3" |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1215 counter_tier53 += 1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1216 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1217 tier_dict[key1]["tier 5.3"] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1218 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1219 tier_dict_ref[key1]["tier 5.3"] += 1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1220 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1221 elif softclipped_mutation_oneMate: |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1222 tier = "5.4" |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1223 counter_tier54 += 1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1224 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1225 tier_dict[key1]["tier 5.4"] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1226 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1227 tier_dict_ref[key1]["tier 5.4"] += 1 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1228 |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1229 elif softclipped_mutation_oneMateOneSSCS: |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1230 tier = "5.5" |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1231 counter_tier55 += 1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1232 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1233 tier_dict[key1]["tier 5.5"] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1234 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1235 tier_dict_ref[key1]["tier 5.5"] += 1 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1236 |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1237 elif (contradictory): |
28
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1238 tier = "6" |
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1239 counter_tier6 += 1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1240 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1241 tier_dict[key1]["tier 6"] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1242 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1243 tier_dict_ref[key1]["tier 6"] += 1 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1244 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1245 else: |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1246 tier = "7" |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1247 counter_tier7 += 1 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1248 if variant_type == "alt": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1249 tier_dict[key1]["tier 7"] += 1 |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1250 elif variant_type == "ref": |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1251 tier_dict_ref[key1]["tier 7"] += 1 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1252 |
7
ded0dc6a20d3
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
6
diff
changeset
|
1253 chrom, pos, ref_a, alt_a = re.split(r'\#', key1) |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1254 var_id = '-'.join([chrom, str(int(pos)+1), ref, alt]) |
2
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1255 |
79
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1256 if variant_type == "alt": |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1257 sample_tag = key2[:-5] |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1258 array2 = np.unique(whole_array) # remove duplicate sequences to decrease running time |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1259 # exclude identical tag from array2, to prevent comparison to itself |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1260 same_tag = np.where(array2 == sample_tag) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1261 index_array2 = np.arange(0, len(array2), 1) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1262 index_withoutSame = np.delete(index_array2, same_tag) # delete identical tag from the data |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1263 array2 = array2[index_withoutSame] |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1264 if len(array2) != 0: # only perform chimera analysis if there is more than 1 variant |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1265 array1_half = sample_tag[0:int(len(sample_tag) / 2)] # mate1 part1 |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1266 array1_half2 = sample_tag[int(len(sample_tag) / 2):int(len(sample_tag))] # mate1 part 2 |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1267 array2_half = np.array([ii[0:int(len(ii) / 2)] for ii in array2]) # mate2 part1 |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1268 array2_half2 = np.array([ii[int(len(ii) / 2):int(len(ii))] for ii in array2]) # mate2 part2 |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1269 min_tags_list_zeros = [] |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1270 chimera_tags = [] |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1271 for mate_b in [False, True]: |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1272 i = 0 # counter, only used to see how many HDs of tags were already calculated |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1273 if mate_b is False: # HD calculation for all a's |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1274 half1_mate1 = array1_half |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1275 half2_mate1 = array1_half2 |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1276 half1_mate2 = array2_half |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1277 half2_mate2 = array2_half2 |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1278 elif mate_b is True: # HD calculation for all b's |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1279 half1_mate1 = array1_half2 |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1280 half2_mate1 = array1_half |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1281 half1_mate2 = array2_half2 |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1282 half2_mate2 = array2_half |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1283 # calculate HD of "a" in the tag to all "a's" or "b" in the tag to all "b's" |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1284 dist = np.array([sum(itertools.imap(operator.ne, half1_mate1, c)) for c in half1_mate2]) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1285 min_index = np.where(dist == dist.min()) # get index of min HD |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1286 # get all "b's" of the tag or all "a's" of the tag with minimum HD |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1287 min_tag_half2 = half2_mate2[min_index] |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1288 min_tag_array2 = array2[min_index] # get whole tag with min HD |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1289 min_value = dist.min() |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1290 # calculate HD of "b" to all "b's" or "a" to all "a's" |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1291 dist_second_half = np.array([sum(itertools.imap(operator.ne, half2_mate1, e)) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1292 for e in min_tag_half2]) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1293 dist2 = dist_second_half.max() |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1294 max_index = np.where(dist_second_half == dist_second_half.max())[0] # get index of max HD |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1295 max_tag = min_tag_array2[max_index] |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1296 # tags which have identical parts: |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1297 if min_value == 0 or dist2 == 0: |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1298 min_tags_list_zeros.append(tag) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1299 chimera_tags.append(max_tag) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1300 i += 1 |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1301 chimera_tags = [x for x in chimera_tags if x != []] |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1302 chimera_tags_new = [] |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1303 for i in chimera_tags: |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1304 if len(i) > 1: |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1305 for t in i: |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1306 chimera_tags_new.append(t) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1307 else: |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1308 chimera_tags_new.extend(i) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1309 chimera = ", ".join(chimera_tags_new) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1310 else: |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1311 chimera_tags_new = [] |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1312 chimera = "" |
2
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1313 else: |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1314 chimera_tags_new = [] |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1315 chimera = "" |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1316 |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1317 if len(chimera_tags_new) > 0: |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1318 chimera_tags_new.append(sample_tag) |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1319 key_chimera = ",".join(sorted(chimera_tags_new)) |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1320 if key_chimera in chimeric_tag.keys(): |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1321 chimeric_tag[key_chimera].append(float(tier)) |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1322 else: |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
1323 chimeric_tag[key_chimera] = [float(tier)] |
2
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1324 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1325 if (read_pos1 == -1): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1326 read_pos1 = read_len_median1 = None |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1327 if (read_pos4 == -1): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1328 read_pos4 = read_len_median4 = None |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1329 if (read_pos2 == -1): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1330 read_pos2 = read_len_median2 = None |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1331 if (read_pos3 == -1): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1332 read_pos3 = read_len_median3 = None |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1333 line = (var_id, tier, variant_type, key2[:-5], 'ab1.ba2', read_pos1, read_pos4, read_len_median1, read_len_median4, dcs_median) + details1 + (sscs_mut_ab, sscs_mut_ba, sscs_ref_ab, sscs_ref_ba, add_mut14, chimera) |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1334 line2 = ("", "", "", key2[:-5], 'ab2.ba1', read_pos2, read_pos3, read_len_median2, read_len_median3, dcs_median) + details2 + (sscs_mut_ab, sscs_mut_ba, sscs_ref_ab, sscs_ref_ba, add_mut23, chimera) |
79
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1335 if tier != "4": |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1336 ws1.write_row(row, 0, line) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1337 csv_writer.writerow(line) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1338 ws1.write_row(row + 1, 0, line2) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1339 csv_writer.writerow(line2) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1340 if variant_type == "alt": |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1341 ws1.conditional_format('M{}:N{}'.format(row + 1, row + 2), {'type': 'formula', 'criteria': '=OR($B${}="1.1", $B${}="1.2")'.format(row + 1, row + 1), 'format': format1, 'multi_range': 'M{}:N{} U{}:V{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1342 ws1.conditional_format('M{}:N{}'.format(row + 1, row + 2), {'type': 'formula', 'criteria': '=OR($B${}="2.1", $B${}="2.2", $B${}="2.3", $B${}="2.4", $B${}="2.5")'.format(row + 1, row + 1, row + 1, row + 1, row + 1), 'format': format3, 'multi_range': 'M{}:N{} U{}:V{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1343 ws1.conditional_format('M{}:N{}'.format(row + 1, row + 2), {'type': 'formula', 'criteria': '=$B${}>="3"'.format(row + 1), 'format': format2, 'multi_range': 'M{}:N{} U{}:V{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1344 elif variant_type == "ref": |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1345 ws1.conditional_format('M{}:N{}'.format(row + 1, row + 2), {'type': 'formula', 'criteria': '=OR($B${}="1.1", $B${}="1.2")'.format(row + 1, row + 1), 'format': format1, 'multi_range': 'M{}:N{} S{}:T{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1346 ws1.conditional_format('M{}:N{}'.format(row + 1, row + 2), {'type': 'formula', 'criteria': '=OR($B${}="2.1", $B${}="2.2", $B${}="2.3", $B${}="2.4", $B${}="2.5")'.format(row + 1, row + 1, row + 1, row + 1, row + 1), 'format': format3, 'multi_range': 'M{}:N{} S{}:T{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1347 ws1.conditional_format('M{}:N{}'.format(row + 1, row + 2), {'type': 'formula', 'criteria': '=$B${}>="3"'.format(row + 1), 'format': format2, 'multi_range': 'M{}:N{} S{}:T{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1348 else: |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1349 change_tier_after_print.append((line, line2, trimmed_actual_high_tier)) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1350 |
11
84a1a3f70407
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
10
diff
changeset
|
1351 row += 3 |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1352 |
2
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1353 if chimera_correction: |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1354 chimeric_dcs_high_tiers = 0 |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1355 chimeric_dcs = 0 |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1356 for keys_chimera in chimeric_tag.keys(): |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1357 tiers = chimeric_tag[keys_chimera] |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1358 chimeric_dcs += len(tiers) - 1 |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1359 high_tiers = sum(1 for t in tiers if t < 3.) |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1360 if high_tiers == len(tiers): |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1361 chimeric_dcs_high_tiers += high_tiers - 1 |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1362 else: |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1363 chimeric_dcs_high_tiers += high_tiers |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1364 chimera_dict[key1] = (chimeric_dcs, chimeric_dcs_high_tiers) |
48
e2a655533077
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
47
diff
changeset
|
1365 |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1366 # write to file |
48
e2a655533077
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
47
diff
changeset
|
1367 # move tier 4 counts to tier 2.5 if there other mutations with tier <= 2.4 |
53
27b00e38e13d
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
52
diff
changeset
|
1368 sum_highTiers = sum([tier_dict[key1][ij] for ij in list(sorted(tier_dict[key1].keys()))[:6]]) |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1369 sum_highTiers_ref = sum([tier_dict_ref[key1][ij] for ij in list(sorted(tier_dict_ref[key1].keys()))[:6]]) |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1370 correct_tier = False |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1371 correct_tier_ref = False |
48
e2a655533077
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
47
diff
changeset
|
1372 if tier_dict[key1]["tier 4"] > 0 and sum_highTiers > 0: |
80
8336a4f2b647
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
79
diff
changeset
|
1373 # tier_dict[key1]["tier 2.5"] = tier_dict[key1]["tier 4"] |
8336a4f2b647
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
79
diff
changeset
|
1374 # tier_dict[key1]["tier 4"] = 0 |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1375 correct_tier = True |
80
8336a4f2b647
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
79
diff
changeset
|
1376 elif tier_dict_ref[key1]["tier 4"] > 0 and sum_highTiers_ref > 0: |
8336a4f2b647
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
79
diff
changeset
|
1377 # tier_dict_ref[key1]["tier 2.5"] = tier_dict_ref[key1]["tier 4"] |
8336a4f2b647
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
79
diff
changeset
|
1378 # tier_dict_ref[key1]["tier 4"] = 0 |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1379 correct_tier_ref = True |
79
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1380 # print(key1, "change tiers from tier 4 to tier 2.5 for {} DCS ...".format(len(change_tier_after_print))) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1381 if len(change_tier_after_print) > 0: |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1382 for sample in change_tier_after_print: |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1383 # row_number = sample[0] |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1384 line1 = sample[0] |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1385 line2 = sample[1] |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1386 actual_high_tier = sample[2] |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1387 current_tier = list(line1)[1] |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1388 if line1[2] == "alt" and correct_tier and (current_tier == "4") and actual_high_tier: |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1389 line1 = list(line1) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1390 line1[1] = "2.5" |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1391 line1 = tuple(line1) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1392 counter_tier25 += 1 |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1393 counter_tier4 -= 1 |
80
8336a4f2b647
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
79
diff
changeset
|
1394 tier_dict[key1]["tier 2.5"] += 1 |
8336a4f2b647
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
79
diff
changeset
|
1395 tier_dict[key1]["tier 4"] -= 1 |
8336a4f2b647
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
79
diff
changeset
|
1396 elif line1[2] == "ref" and correct_tier_ref and (current_tier == "4") and actual_high_tier: |
79
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1397 line1 = list(line1) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1398 line1[1] = "2.5" |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1399 line1 = tuple(line1) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1400 counter_tier25 += 1 |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1401 counter_tier4 -= 1 |
80
8336a4f2b647
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
79
diff
changeset
|
1402 tier_dict_ref[key1]["tier 2.5"] += 1 |
8336a4f2b647
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
79
diff
changeset
|
1403 tier_dict_ref[key1]["tier 4"] -= 1 |
79
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1404 ws1.write_row(row, 0, line1) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1405 csv_writer.writerow(line1) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1406 ws1.write_row(row + 1, 0, line2) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1407 csv_writer.writerow(line2) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1408 if line1[2] == "alt": |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1409 ws1.conditional_format('M{}:N{}'.format(row + 1, row + 2), {'type': 'formula', 'criteria': '=OR($B${}="1.1", $B${}="1.2")'.format(row + 1, row + 1), 'format': format1, 'multi_range': 'M{}:N{} U{}:V{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1410 ws1.conditional_format('M{}:N{}'.format(row + 1, row + 2), {'type': 'formula', 'criteria': '=OR($B${}="2.1", $B${}="2.2", $B${}="2.3", $B${}="2.4", $B${}="2.5")'.format(row + 1, row + 1, row + 1, row + 1, row + 1), 'format': format3, 'multi_range': 'M{}:N{} U{}:V{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1411 ws1.conditional_format('M{}:N{}'.format(row + 1, row + 2), {'type': 'formula', 'criteria': '=$B${}>="3"'.format(row + 1), 'format': format2, 'multi_range': 'M{}:N{} U{}:V{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1412 elif line1[2] == "ref": |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1413 ws1.conditional_format('M{}:N{}'.format(row + 1, row + 2), {'type': 'formula', 'criteria': '=OR($B${}="1.1", $B${}="1.2")'.format(row + 1, row + 1), 'format': format1, 'multi_range': 'M{}:N{} S{}:T{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1414 ws1.conditional_format('M{}:N{}'.format(row + 1, row + 2), {'type': 'formula', 'criteria': '=OR($B${}="2.1", $B${}="2.2", $B${}="2.3", $B${}="2.4", $B${}="2.5")'.format(row + 1, row + 1, row + 1, row + 1, row + 1), 'format': format3, 'multi_range': 'M{}:N{} S{}:T{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1415 ws1.conditional_format('M{}:N{}'.format(row + 1, row + 2), {'type': 'formula', 'criteria': '=$B${}>="3"'.format(row + 1), 'format': format2, 'multi_range': 'M{}:N{} S{}:T{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) |
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1416 row += 3 |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1417 |
2
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1418 # sheet 2 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1419 if chimera_correction: |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1420 header_line2 = ('variant ID', 'cvrg', 'AC alt (all tiers)', 'AF (all tiers)', 'cvrg (tiers 1.1-2.5)', 'AC ref (tiers 1.1-2.5)', 'AC alt (tiers 1.1-2.5)', 'AF (tiers 1.1-2.5)', 'chimera-corrected cvrg (tiers 1.1-2.5)', 'chimeras in AC alt (tiers 1.1-2.5)', 'chimera-corrected AF (tiers 1.1-2.5)', 'AC alt (orginal DCS)', 'AF (original DCS)', |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1421 'tier 1.1 (alt)', 'tier 1.2 (alt)', 'tier 2.1 (alt)', 'tier 2.2 (alt)', 'tier 2.3 (alt)', 'tier 2.4 (alt)', 'tier 2.5 (alt)', |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1422 'tier 3.1 (alt)', 'tier 3.2 (alt)', 'tier 4 (alt)', 'tier 5.1 (alt)', 'tier 5.2 (alt)', 'tier 5.3 (alt)', 'tier 5.4 (alt)', 'tier 5.5 (alt)', 'tier 6 (alt)', 'tier 7 (alt)', |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1423 'tier 1.1 (ref)', 'tier 1.2 (ref)', 'tier 2.1 (ref)', 'tier 2.2 (ref)', 'tier 2.3 (ref)', 'tier 2.4 (ref)', 'tier 2.5 (ref)', |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1424 'tier 3.1 (ref)', 'tier 3.2 (ref)', 'tier 4 (ref)', 'tier 5.1 (ref)', 'tier 5.2 (ref)', 'tier 5.3 (ref)', 'tier 5.4 (ref)', 'tier 5.5 (ref)', 'tier 6 (ref)', 'tier 7 (ref)' |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1425 ) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1426 else: |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1427 header_line2 = ('variant ID', 'cvrg', 'AC alt (all tiers)', 'AF (all tiers)', 'cvrg (tiers 1.1-2.5)', 'AC ref (tiers 1.1-2.5)', 'AC alt (tiers 1.1-2.5)', 'AF (tiers 1.1-2.5)', 'AC alt (orginal DCS)', 'AF (original DCS)', |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1428 'tier 1.1 (alt)', 'tier 1.2 (alt)', 'tier 2.1 (alt)', 'tier 2.2 (alt)', 'tier 2.3 (alt)', 'tier 2.4 (alt)', 'tier 2.5 (alt)', |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1429 'tier 3.1 (alt)', 'tier 3.2 (alt)', 'tier 4 (alt)', 'tier 5.1 (alt)', 'tier 5.2 (alt)', 'tier 5.3 (alt)', 'tier 5.4 (alt)', 'tier 5.5 (alt)', 'tier 6 (alt)', 'tier 7 (alt)', |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1430 'tier 1.1 (ref)', 'tier 1.2 (ref)', 'tier 2.1 (ref)', 'tier 2.2 (ref)', 'tier 2.3 (ref)', 'tier 2.4 (ref)', 'tier 2.5 (ref)', |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1431 'tier 3.1 (ref)', 'tier 3.2 (ref)', 'tier 4 (ref)', 'tier 5.1 (ref)', 'tier 5.2 (ref)', 'tier 5.3 (ref)', 'tier 5.4 (ref)', 'tier 5.5 (ref)', 'tier 6 (ref)', 'tier 7 (ref)' |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1432 ) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1433 ws2.write_row(0, 0, header_line2) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1434 row = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1435 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1436 for key1, value1 in sorted(tier_dict.items()): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1437 if key1 in pure_tags_dict_short.keys(): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1438 i = np.where(np.array(['#'.join(str(i) for i in z) |
7
ded0dc6a20d3
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
6
diff
changeset
|
1439 for z in zip(mut_array[:, 0], mut_array[:, 1], mut_array[:, 2], mut_array[:, 3])]) == key1)[0][0] |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
1440 ref = mut_array[i, 2] |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
1441 alt = mut_array[i, 3] |
7
ded0dc6a20d3
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
6
diff
changeset
|
1442 chrom, pos, ref_a, alt_a = re.split(r'\#', key1) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1443 ref_count = cvrg_dict[key1][0] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1444 alt_count = cvrg_dict[key1][1] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1445 cvrg = ref_count + alt_count |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1446 ref_tiers = tier_dict_ref[key1] |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1447 var_id = '-'.join([chrom, str(int(pos)+1), ref, alt]) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1448 lst = [var_id, cvrg] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1449 used_tiers = [] |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1450 used_tiers_ref = [t for k, t in sorted(ref_tiers.items())] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1451 cum_af = [] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1452 for key2, value2 in sorted(value1.items()): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1453 # calculate cummulative AF |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1454 used_tiers.append(value2) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1455 if len(used_tiers) > 1: |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1456 cum = safe_div(sum(used_tiers), cvrg) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1457 cum_af.append(cum) |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
1458 if sum(used_tiers) == 0: # skip mutations that are filtered by the VA in the first place |
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
1459 continue |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1460 lst.extend([sum(used_tiers), safe_div(sum(used_tiers), cvrg)]) |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1461 lst.extend([(sum(used_tiers_ref[0:7]) + sum(used_tiers[0:7])), sum(used_tiers_ref[0:7]), sum(used_tiers[0:7]), safe_div(sum(used_tiers[0:7]), (sum(used_tiers_ref[0:7]) + sum(used_tiers[0:7])))]) |
2
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1462 if chimera_correction: |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1463 chimeras_all = chimera_dict[key1][1] |
46
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
45
diff
changeset
|
1464 new_alt = sum(used_tiers[0:7]) - chimeras_all |
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
45
diff
changeset
|
1465 fraction_chimeras = safe_div(chimeras_all, float(sum(used_tiers[0:7]))) |
2
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1466 if fraction_chimeras is None: |
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1467 fraction_chimeras = 0. |
79
d7aea14291e8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
78
diff
changeset
|
1468 new_cvrg = (cvrg - sum(used_tiers[-10:])) * (1. - fraction_chimeras) |
67
60e813039aae
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
66
diff
changeset
|
1469 lst.extend([new_cvrg, chimeras_all, safe_div(new_alt, new_cvrg)]) |
2
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1470 lst.extend([alt_count, safe_div(alt_count, cvrg)]) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1471 lst.extend(used_tiers) |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1472 lst.extend(used_tiers_ref) |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1473 # lst.extend(cum_af) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1474 lst = tuple(lst) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1475 ws2.write_row(row + 1, 0, lst) |
41
db3ed9202516
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
40
diff
changeset
|
1476 if chimera_correction: |
78
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1477 ws2.conditional_format('N{}:O{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$N$1="tier 1.1 (alt)"', 'format': format12, 'multi_range': 'N{}:O{} N1:O1 AE{}:AF{} AE1:AF1'.format(row + 2, row + 2, row + 2, row + 2)}) |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1478 ws2.conditional_format('P{}:T{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$P$1="tier 2.1 (alt)"', 'format': format32, 'multi_range': 'P{}:T{} P1:T1 AG{}:AK{} AG1:AK1'.format(row + 2, row + 2, row + 2, row + 2)}) |
fdfe9a919ff7
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
77
diff
changeset
|
1479 ws2.conditional_format('U{}:AD{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$U$1="tier 3.1 (alt)"', 'format': format22, 'multi_range': 'U{}:AD{} U1:AD1 AL{}:AU{} AL1:AU1'.format(row + 2, row + 2, row + 2, row + 2)}) |
41
db3ed9202516
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
40
diff
changeset
|
1480 else: |
82
c2e8932b4d8d
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
81
diff
changeset
|
1481 ws2.conditional_format('K{}:L{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$K$1="tier 1.1 (alt)"', 'format': format12, 'multi_range': 'K{}:L{} K1:L1 AB{}:AC{} AB1:AC1'.format(row + 2, row + 2, row + 2, row + 2)}) |
c2e8932b4d8d
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
81
diff
changeset
|
1482 ws2.conditional_format('M{}:Q{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$M$1="tier 2.1 (alt)"', 'format': format32, 'multi_range': 'M{}:Q{} M1:Q1 AD{}:AH{} AD1:AH1'.format(row + 2, row + 2, row + 2, row + 2)}) |
c2e8932b4d8d
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8-dirty
mheinzl
parents:
81
diff
changeset
|
1483 ws2.conditional_format('R{}:AA{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$R$1="tier 3.1 (alt)"', 'format': format22, 'multi_range': 'R{}:AA{} R1:AA1 AI{}:AR{} AI1:AR1'.format(row + 2, row + 2, row + 2, row + 2)}) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1484 row += 1 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1485 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1486 # sheet 3 |
2
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1487 sheet3 = [("tier 1.1", counter_tier11), ("tier 1.2", counter_tier12), ("tier 2.1", counter_tier21), |
75
6ccff403db8a
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
70
diff
changeset
|
1488 ("tier 2.2", counter_tier22), ("tier 2.3", counter_tier23), ("tier 2.4", counter_tier24), ("tier 2.5", counter_tier25), |
46
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
45
diff
changeset
|
1489 ("tier 3.1", counter_tier31), ("tier 3.2", counter_tier32), ("tier 4", counter_tier4), |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1490 ("tier 5.1", counter_tier51), ("tier 5.2", counter_tier52), |
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1491 ("tier 5.3", counter_tier53), ("tier 5.4", counter_tier54), ("tier 5.5", counter_tier55), ("tier 6", counter_tier6), ("tier 7", counter_tier7)] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1492 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1493 header = ("tier", "count") |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1494 ws3.write_row(0, 0, header) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1495 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1496 for i in range(len(sheet3)): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1497 ws3.write_row(i + 1, 0, sheet3[i]) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1498 ws3.conditional_format('A{}:B{}'.format(i + 2, i + 2), |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1499 {'type': 'formula', |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1500 'criteria': '=OR($A${}="tier 1.1", $A${}="tier 1.2")'.format(i + 2, i + 2), |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1501 'format': format1}) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1502 ws3.conditional_format('A{}:B{}'.format(i + 2, i + 2), |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1503 {'type': 'formula', |
46
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
45
diff
changeset
|
1504 'criteria': '=OR($A${}="tier 2.1", $A${}="tier 2.2", $A${}="tier 2.3", $A${}="tier 2.4", $A${}="tier 2.5")'.format(i + 2, i + 2, i + 2, i + 2, i + 2), |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1505 'format': format3}) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1506 ws3.conditional_format('A{}:B{}'.format(i + 2, i + 2), |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1507 {'type': 'formula', |
30
e7da54e10e2d
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
29
diff
changeset
|
1508 'criteria': '=$A${}>="3"'.format(i + 2), |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1509 'format': format2}) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1510 |
28
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1511 description_tiers = [("Tier 1.1", "both ab and ba SSCS present (>75% of the sites with alternative base) and minimal FS>=3 for both SSCS in at least one mate"), ("", ""), |
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1512 ("Tier 1.2", "both ab and ba SSCS present (>75% of the sites with alt. base) and mate pair validation (min. FS=1) and minimal FS>=3 for at least one of the SSCS"), |
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1513 ("Tier 2.1", "both ab and ba SSCS present (>75% of the sites with alt. base) and minimal FS>=3 for at least one of the SSCS in at least one mate"), |
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1514 ("Tier 2.2", "both ab and ba SSCS present (>75% of the sites with alt. base) and mate pair validation (min. FS=1)"), |
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1515 ("Tier 2.3", "both ab and ba SSCS present (>75% of the sites with alt. base) and minimal FS=1 for both SSCS in one mate and minimal FS>=3 for at least one of the SSCS in the other mate"), |
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1516 ("Tier 2.4", "both ab and ba SSCS present (>75% of the sites with alt. base) and minimal FS=1 for both SSCS in at least one mate"), |
63
f0fc93b7945c
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
62
diff
changeset
|
1517 ("Tier 2.5", "variants at the start or end of the read (ignoring variant position tier 1.1-2.4) and recurring mutation on this position in tier 1.1-2.4"), |
28
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1518 ("Tier 3.1", "both ab and ba SSCS present (>50% of the sites with alt. base) and recurring mutation on this position"), |
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
27
diff
changeset
|
1519 ("Tier 3.2", "both ab and ba SSCS present (>50% of the sites with alt. base) and minimal FS>=1 for both SSCS in at least one mate"), |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1520 ("Tier 4", "variants at the start or end of the reads"), |
59
0b3df6ea1434
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
58
diff
changeset
|
1521 ("Tier 5.1", "variant is close to softclipping in both mates and SSCS"), |
0b3df6ea1434
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
58
diff
changeset
|
1522 ("Tier 5.2", "variant is close to softclipping in one of the mates but both SSCS"), |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1523 ("Tier 5.3", "variant is close to softclipping in one of the SSCS of both mates"), |
59
0b3df6ea1434
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
58
diff
changeset
|
1524 ("Tier 5.4", "variant is close to softclipping in one mate and both SSCS (no information of second mate)"), |
0b3df6ea1434
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
58
diff
changeset
|
1525 ("Tier 5.5", "variant is close to softclipping in one of the SSCS (no information of the second mate)"), |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1526 ("Tier 6", "mates with contradictory information"), |
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1527 ("Tier 7", "remaining variants")] |
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1528 examples_tiers = [[("chr5-11068-C-G", "1.1", "AAAAAGATGCCGACTACCTT", "ab1.ba2", "254", "228", "287", "288", "289", |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1529 "3", "6", "3", "6", "0", "0", "3", "6", "0", "0", "1", "1", "0", "0", "0", "0", "0", "0", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1530 "4081", "4098", "5", "10", "", ""), |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1531 ("", "", "AAAAAGATGCCGACTACCTT", "ab2.ba1", None, None, None, None, |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1532 "289", "0", "0", "0", "0", "0", "0", "0", "0", None, None, None, None, |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1533 "0", "0", "0", "0", "0", "0", "4081", "4098", "5", "10", "", "")], |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1534 [("chr5-11068-C-G", "1.1", "AAAAATGCGTAGAAATATGC", "ab1.ba2", "254", "228", "287", "288", "289", |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1535 "33", "43", "33", "43", "0", "0", "33", "43", "0", "0", "1", "1", "0", "0", "0", "0", "0", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1536 "0", "4081", "4098", "5", "10", "", ""), |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1537 ("", "", "AAAAATGCGTAGAAATATGC", "ab2.ba1", "268", "268", "270", "288", "289", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1538 "11", "34", "10", "27", "0", "0", "10", "27", "0", "0", "1", "1", "0", "0", "1", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1539 "7", "0", "0", "4081", "4098", "5", "10", "", "")], |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1540 [("chr5-10776-G-T", "1.2", "CTATGACCCGTGAGCCCATG", "ab1.ba2", "132", "132", "287", "288", "290", |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1541 "4", "1", "4", "1", "0", "0", "4", "1", "0", "0", "1", "1", "0", "0", "0", "0", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1542 "0", "0", "1", "6", "47170", "41149", "", ""), |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1543 ("", "", "CTATGACCCGTGAGCCCATG", "ab2.ba1", "77", "132", "233", "200", "290", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1544 "4", "1", "4", "1", "0", "0", "4", "1", "0", "0", "1", "1", "0", "0", "0", "0", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1545 "0", "0", "1", "6", "47170", "41149", "", "")], |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1546 [("chr5-11068-C-G", "2.1", "AAAAAAACATCATACACCCA", "ab1.ba2", "246", "244", "287", "288", "289", |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1547 "2", "8", "2", "8", "0", "0", "2", "8", "0", "0", "1", "1", "0", "0", "0", "0", "0", "0", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1548 "4081", "4098", "5", "10", "", ""), |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1549 ("", "", "AAAAAAACATCATACACCCA", "ab2.ba1", None, None, None, None, |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1550 "289", "0", "0", "0", "0", "0", "0", "0", "0", None, None, None, None, "0", "0", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1551 "0", "0", "0", "0", "4081", "4098", "5", "10", "", "")], |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1552 [("chr5-11068-C-G", "2.2", "ATCAGCCATGGCTATTATTG", "ab1.ba2", "72", "72", "217", "288", "289", |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1553 "1", "1", "1", "1", "0", "0", "1", "1", "0", "0", "1", "1", "0", "0", "0", "0", "0", "0", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1554 "4081", "4098", "5", "10", "", ""), |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1555 ("", "", "ATCAGCCATGGCTATTATTG", "ab2.ba1", "153", "164", "217", "260", "289", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1556 "1", "1", "1", "1", "0", "0", "1", "1", "0", "0", "1", "1", "0", "0", "0", "0", "0", "0", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1557 "4081", "4098", "5", "10", "", "")], |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1558 [("chr5-11068-C-G", "2.3", "ATCAATATGGCCTCGCCACG", "ab1.ba2", None, None, None, None, |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1559 "289", "0", "5", "0", "5", "0", "0", "0", "5", None, None, None, "1", "0", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1560 "0", "0", "0", "0", "0", "4081", "4098", "5", "10", "", ""), |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1561 ("", "", "ATCAATATGGCCTCGCCACG", "ab2.ba1", "202", "255", "277", "290", "289", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1562 "1", "3", "1", "3", "0", "0", "1", "3", "0", "0", "1", "1", "0", "0", "0", "0", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1563 "0", "0", "4081", "4098", "5", "10", "", "")], |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1564 [("chr5-11068-C-G", "2.4", "ATCAGCCATGGCTATTTTTT", "ab1.ba2", "72", "72", "217", "288", "289", |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1565 "1", "1", "1", "1", "0", "0", "1", "1", "0", "0", "1", "1", "0", "0", "0", "0", "0", "0", "4081", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1566 "4098", "5", "10", "", ""), |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1567 ("", "", "ATCAGCCATGGCTATTTTTT", "ab2.ba1", "153", "164", "217", "260", "289", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1568 "1", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "1", "1", "0", "0", "0", "0", "4081", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1569 "4098", "5", "10", "", "")], |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1570 [("chr5-11068-C-G", "2.5", "ATTGAAAGAATAACCCACAC", "ab1.ba2", "1", "100", "255", "276", "269", |
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1571 "5", "6", "0", "6", "0", "0", "5", "6", "0", "0", "0", "1", "0", "0", "0", "0", "5", "0", "1", "1", "5348", "5350", "", ""), |
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1572 ("", "", "AAAAAAAGAATAACCCACAC", "ab2.ba1", None, None, None, None, |
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1573 "269", "0", "0", "0", "0", "0", "0", "0", "0", None, None, None, None, "0", |
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1574 "0", "0", "0", "0", "0", "1", "1", "5348", "5350", "", "")], |
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1575 [("chr5-10776-G-T", "3.1", "ATGCCTACCTCATTTGTCGT", "ab1.ba2", "46", "15", "287", "288", "290", |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1576 "3", "3", "3", "2", "3", "1", "0", "1", "1", "0.5", "0", "0.5", "0", "0", "0", "1", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1577 "0", "0", "3", "3", "47170", "41149", "", ""), |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1578 ("", "", "ATGCCTACCTCATTTGTCGT", "ab2.ba1", None, "274", None, |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1579 "288", "290", "0", "3", "0", "2", "0", "1", "0", "1", None, "0.5", None, "0.5", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1580 "0", "0", "0", "1", "0", "0", "3", "3", "47170", "41149", "", "")], |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1581 [("chr5-11315-C-T", "3.2", "ACAACATCACGTATTCAGGT", "ab1.ba2", "197", "197", "240", "255", "271", |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1582 "2", "3", "2", "3", "0", "1", "2", "2", "0", "0.333333333333333", "1", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1583 "0.666666666666667", "0", "0", "0", "0", "0", "0", "1", "1", "6584", "6482", "", ""), |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1584 ("", "", "ACAACATCACGTATTCAGGT", "ab2.ba1", "35", "35", "240", "258", "271", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1585 "2", "3", "2", "3", "0", "1", "2", "2", "0", "0.333333333333333", "1", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1586 "0.666666666666667", "0", "0", "0", "0", "0", "0", "1", "1", "6584", "6482", "", "")], |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1587 [("chr5-13983-G-C", "4", "AAAAAAAGAATAACCCACAC", "ab1.ba2", "1", "100", "255", "276", "269", |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1588 "5", "6", "0", "6", "0", "0", "5", "6", "0", "0", "0", "1", "0", "0", "0", "0", "5", "0", "1", "1", "5348", "5350", "", ""), |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1589 ("", "", "AAAAAAAGAATAACCCACAC", "ab2.ba1", None, None, None, None, |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1590 "269", "0", "0", "0", "0", "0", "0", "0", "0", None, None, None, None, "0", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1591 "0", "0", "0", "0", "0", "1", "1", "5348", "5350", "", "")], |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1592 [("" * 34), ("" * 34)], [("" * 34), ("" * 34)], [("" * 34), ("" * 34)], [("" * 34), ("" * 34)], [("" * 34), ("" * 34)], |
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1593 [("chr5-13963-T-C", "6", "TTTTTAAGAATAACCCACAC", "ab1.ba2", "38", "38", "240", "283", "263", |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1594 "110", "54", "110", "54", "0", "0", "110", "54", "0", "0", "1", "1", "0", "0", "0", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1595 "0", "0", "0", "1", "1", "5348", "5350", "", ""), |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1596 ("", "", "TTTTTAAGAATAACCCACAC", "ab2.ba1", "100", "112", "140", "145", "263", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1597 "7", "12", "7", "12", "7", "12", "0", "0", "1", "1", "0", |
2
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1598 "0", "0", "0", "0", "0", "0", "0", "1", "1", "5348", "5350", "", "")], |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1599 [("chr5-13983-G-C", "7", "ATGTTGTGAATAACCCACAC", "ab1.ba2", None, "186", None, "276", "269", |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1600 "0", "6", "0", "6", "0", "0", "0", "6", "0", "0", "0", "1", "0", "0", "0", "0", "0", |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1601 "0", "1", "1", "5348", "5350", "", ""), |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1602 ("", "", "ATGTTGTGAATAACCCACAC", "ab2.ba1", None, None, None, None, |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1603 "269", "0", "0", "0", "0", "0", "0", "0", "0", None, None, None, None, "0", |
2
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
0
diff
changeset
|
1604 "0", "0", "0", "0", "0", "1", "1", "5348", "5350", "", "")]] |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1605 |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1606 start_row = 20 |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1607 ws3.write(start_row, 0, "Description of tiers with examples") |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1608 ws3.write_row(start_row + 1, 0, header_line) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1609 row = 0 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1610 for i in range(len(description_tiers)): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1611 ws3.write_row(start_row + 2 + row + i + 1, 0, description_tiers[i]) |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1612 ex = examples_tiers[i] |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1613 for k in range(len(ex)): |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1614 ws3.write_row(start_row + 2 + row + i + k + 2, 0, ex[k]) |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1615 ws3.conditional_format('L{}:M{}'.format(start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 3), {'type': 'formula', 'criteria': '=OR($B${}="1.1", $B${}="1.2")'.format(start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 2), 'format': format13, 'multi_range': 'L{}:M{} T{}:U{} B{}'.format(start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 3, start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 3, start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 3)}) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1616 ws3.conditional_format('L{}:M{}'.format(start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 3), |
46
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
45
diff
changeset
|
1617 {'type': 'formula', 'criteria': '=OR($B${}="2.1",$B${}="2.2", $B${}="2.3", $B${}="2.4", $B${}="2.5")'.format(start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 2), |
41
db3ed9202516
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
40
diff
changeset
|
1618 'format': format33, |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1619 'multi_range': 'L{}:M{} T{}:U{} B{}'.format(start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 3, start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 3, start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 3)}) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1620 ws3.conditional_format('L{}:M{}'.format(start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 3), |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1621 {'type': 'formula', |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1622 'criteria': '=$B${}>="3"'.format(start_row + 2 + row + i + k + 2), |
41
db3ed9202516
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
40
diff
changeset
|
1623 'format': format23, |
43
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
42
diff
changeset
|
1624 'multi_range': 'L{}:M{} T{}:U{} B{}'.format(start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 3, start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 3, start_row + 2 + row + i + k + 2, start_row + 2 + row + i + k + 3)}) |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1625 row += 3 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1626 workbook.close() |
6
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
1627 workbook2.close() |
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
5
diff
changeset
|
1628 workbook3.close() |
55
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
54
diff
changeset
|
1629 csv_data.close() |
0
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1630 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1631 |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1632 if __name__ == '__main__': |
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
mheinzl
parents:
diff
changeset
|
1633 sys.exit(read2mut(sys.argv)) |