Mercurial > repos > mheinzl > variant_analyzer2
annotate read2mut.py @ 56:371c09d4050b draft
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
| author | mheinzl | 
|---|---|
| date | Fri, 12 Mar 2021 14:22:03 +0000 | 
| parents | 8fbe6aba07e5 | 
| children | 706bf8b59eae | 
| 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 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 13 0.2.1 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: 
42diff
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: 
54diff
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: 
42diff
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: 
5diff
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: 
5diff
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: 
5diff
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: 
5diff
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: 
11diff
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: 
54diff
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: 
54diff
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: 
11diff
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: 
11diff
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: 
11diff
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: 
11diff
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: 
42diff
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: 
42diff
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: 
5diff
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: 
42diff
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: 
42diff
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: 
42diff
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: 
42diff
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: 
11diff
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: 
11diff
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: 
54diff
changeset | 89 outputFile_csv = args.outputFile_csv | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 90 thresh = args.thresh | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 91 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: 
42diff
changeset | 92 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 | 93 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: 
42diff
changeset | 94 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: 
42diff
changeset | 95 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 | 96 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 97 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 | 98 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 | 99 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 | 100 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 | 101 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 | 102 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 | 103 if thresh < 0: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 104 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 | 105 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 | 106 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: 
42diff
changeset | 107 if trim < 0: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 108 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: 
42diff
changeset | 109 if thr <= 0: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 110 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 | 111 | 
| 2 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 112 # load dicts | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 113 with open(json_file, "r") as f: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 114 (tag_dict, cvrg_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 | 115 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 116 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 | 117 (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 | 118 | 
| 2 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 119 # 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: 
42diff
changeset | 120 # 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 | 121 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 | 122 | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 123 # 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 | 124 mut_dict = {} | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 125 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 | 126 mut_read_dict = {} | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 127 reads_dict = {} | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 128 mut_read_cigar_dict = {} | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 129 i = 0 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 130 mut_array = [] | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 131 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 132 for count, variant in enumerate(VCF(file1)): | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 133 #if count == 2000: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 134 # break | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 135 chrom = variant.CHROM | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 136 stop_pos = variant.start | 
| 7 
ded0dc6a20d3
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
6diff
changeset | 137 #chrom_stop_pos = str(chrom) + "#" + str(stop_pos) | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 138 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: 
42diff
changeset | 139 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: 
42diff
changeset | 140 continue | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 141 else: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 142 alt = variant.ALT[0] | 
| 7 
ded0dc6a20d3
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
6diff
changeset | 143 chrom_stop_pos = str(chrom) + "#" + str(stop_pos) + "#" + ref + "#" + alt | 
| 
ded0dc6a20d3
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
6diff
changeset | 144 | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 145 if len(ref) == len(alt): | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 146 mut_array.append([chrom, stop_pos, ref, alt]) | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 147 i += 1 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 148 mut_dict[chrom_stop_pos] = {} | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 149 mut_read_pos_dict[chrom_stop_pos] = {} | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 150 reads_dict[chrom_stop_pos] = {} | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 151 mut_read_cigar_dict[chrom_stop_pos] = {} | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 152 | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 153 for pileupcolumn in bam.pileup(chrom, stop_pos - 1, stop_pos + 1, max_depth=100000000): | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 154 if pileupcolumn.reference_pos == stop_pos: | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 155 count_alt = 0 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 156 count_ref = 0 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 157 count_indel = 0 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 158 count_n = 0 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 159 count_other = 0 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 160 count_lowq = 0 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 161 n = 0 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 162 #print("unfiltered reads=", pileupcolumn.n, "filtered reads=", len(pileupcolumn.pileups), | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 163 # "difference= ", len(pileupcolumn.pileups) - pileupcolumn.n) | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 164 for pileupread in pileupcolumn.pileups: | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 165 n += 1 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 166 if not pileupread.is_del and not pileupread.is_refskip: | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 167 tag = pileupread.alignment.query_name | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 168 nuc = pileupread.alignment.query_sequence[pileupread.query_position] | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 169 phred = ord(pileupread.alignment.qual[pileupread.query_position]) - 33 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 170 if phred < phred_score: | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 171 nuc = "lowQ" | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 172 if tag not in mut_dict[chrom_stop_pos]: | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 173 mut_dict[chrom_stop_pos][tag] = {} | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 174 if nuc in mut_dict[chrom_stop_pos][tag]: | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 175 mut_dict[chrom_stop_pos][tag][nuc] += 1 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 176 else: | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 177 mut_dict[chrom_stop_pos][tag][nuc] = 1 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 178 if tag not in mut_read_pos_dict[chrom_stop_pos]: | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 179 mut_read_pos_dict[chrom_stop_pos][tag] = [pileupread.query_position + 1] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 180 reads_dict[chrom_stop_pos][tag] = [len(pileupread.alignment.query_sequence)] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 181 mut_read_cigar_dict[chrom_stop_pos][tag] = [pileupread.alignment.cigarstring] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 182 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 183 #alignedRefPositions = pileupread.get_reference_positions()[0] | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 184 else: | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 185 mut_read_pos_dict[chrom_stop_pos][tag].append(pileupread.query_position + 1) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 186 reads_dict[chrom_stop_pos][tag].append(len(pileupread.alignment.query_sequence)) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 187 mut_read_cigar_dict[chrom_stop_pos][tag].append(pileupread.alignment.cigarstring) | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 188 if nuc == alt: | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 189 count_alt += 1 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 190 if tag not in mut_read_dict: | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 191 mut_read_dict[tag] = {} | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 192 mut_read_dict[tag][chrom_stop_pos] = (alt, ref) | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 193 else: | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 194 mut_read_dict[tag][chrom_stop_pos] = (alt, ref) | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 195 elif nuc == ref: | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 196 count_ref += 1 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 197 elif nuc == "N": | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 198 count_n += 1 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 199 elif nuc == "lowQ": | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 200 count_lowq += 1 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 201 else: | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 202 count_other += 1 | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 203 else: | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 204 count_indel += 1 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 205 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 206 #print("coverage at pos %s = %s, ref = %s, alt = %s, other bases = %s, N = %s, indel = %s, low quality = %s\n" % (pileupcolumn.pos, count_ref + count_alt, count_ref, count_alt, count_other, count_n, count_indel, count_lowq)) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 207 #else: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 208 # print("indels are currently not evaluated") | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 209 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 | 210 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 | 211 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 | 212 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 | 213 nuc = "na" | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 214 for key in tag_dict[pure_tag].keys(): | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 215 if key not in mut_dict: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 216 mut_dict[key] = {} | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 217 if read.query_name not in mut_dict[key]: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 218 mut_dict[key][read.query_name] = {} | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 219 if nuc in mut_dict[key][read.query_name]: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 220 mut_dict[key][read.query_name][nuc] += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 221 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 222 mut_dict[key][read.query_name][nuc] = 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 223 bam.close() | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 224 | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 225 # 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 | 226 pure_tags_dict = {} | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 227 for key1, value1 in sorted(mut_dict.items()): | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 228 #if len(np.where(np.array(['#'.join(str(i) for i in z) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 229 # for z in zip(mut_array[:, 0], mut_array[:, 1])]) == key1)[0]) == 0: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 230 # continue | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 231 | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 232 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: 
6diff
changeset | 233 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: 
5diff
changeset | 234 ref = mut_array[i, 2] | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 235 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 | 236 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 | 237 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 | 238 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 | 239 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 | 240 if key3 == alt: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 241 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 | 242 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 | 243 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 244 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 | 245 | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 246 # 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 | 247 if thresh > 0: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 248 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 | 249 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 | 250 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 | 251 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 | 252 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 253 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 | 254 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 255 # whole_array = [] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 256 # for k in pure_tags_dict.values(): | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 257 # if len(k) != 0: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 258 # keys = k.keys() | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 259 # if len(keys) > 1: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 260 # for k1 in keys: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 261 # whole_array.append(k1) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 262 # else: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 263 # whole_array.append(keys[0]) | 
| 28 
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
27diff
changeset | 264 | 
| 55 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 265 csv_data = open(outputFile_csv, "wb") | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 266 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: 
54diff
changeset | 267 | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 268 # 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 | 269 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: 
28diff
changeset | 270 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: 
28diff
changeset | 271 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 | 272 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: 
5diff
changeset | 273 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: 
5diff
changeset | 274 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 | 275 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 276 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 | 277 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 | 278 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 | 279 | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 280 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: 
5diff
changeset | 281 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: 
5diff
changeset | 282 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: 
5diff
changeset | 283 | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 284 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: 
5diff
changeset | 285 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: 
5diff
changeset | 286 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: 
5diff
changeset | 287 | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 288 header_line = ('variant ID', 'tier', 'tag', 'mate', 'read pos.ab', 'read pos.ba', 'read median length.ab', | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 289 '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 | 290 '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 | 291 '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 | 292 '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 | 293 '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: 
3diff
changeset | 294 '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 | 295 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: 
54diff
changeset | 296 csv_writer.writerow(header_line) | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 297 counter_tier11 = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 298 counter_tier12 = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 299 counter_tier21 = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 300 counter_tier22 = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 301 counter_tier23 = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 302 counter_tier24 = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 303 counter_tier31 = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 304 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: 
45diff
changeset | 305 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: 
42diff
changeset | 306 counter_tier4 = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 307 # if chimera_correction: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 308 # counter_tier43 = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 309 counter_tier51 = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 310 counter_tier52 = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 311 counter_tier53 = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 312 counter_tier54 = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 313 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: 
27diff
changeset | 314 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: 
42diff
changeset | 315 counter_tier7 = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 316 | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 317 row = 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 318 tier_dict = {} | 
| 2 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 319 chimera_dict = {} | 
| 48 
e2a655533077
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
47diff
changeset | 320 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 | 321 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 | 322 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: 
42diff
changeset | 323 chimeric_tag_list = [] | 
| 2 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 324 chimeric_tag = {} | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 325 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 | 326 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: 
6diff
changeset | 327 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: 
5diff
changeset | 328 ref = mut_array[i, 2] | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 329 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 | 330 dcs_median = cvrg_dict[key1][2] | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 331 whole_array = 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 | 332 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 333 tier_dict[key1] = {} | 
| 51 
26e53b5b8bcb
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
50diff
changeset | 334 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), | 
| 
26e53b5b8bcb
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
50diff
changeset | 335 ("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: 
42diff
changeset | 336 ("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 | 337 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 | 338 tier_dict[key1][k] = v | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 339 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 340 used_keys = [] | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 341 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 | 342 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 | 343 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 344 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 | 345 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 | 346 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 | 347 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 348 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 | 349 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 | 350 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 | 351 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 352 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 | 353 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 | 354 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 | 355 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 356 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 | 357 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 | 358 add_mut14 = "" | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 359 add_mut23 = "" | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 360 if (key2[:-5] in pure_tags_dict_short[key1].keys()) and (key2[:-5] not in used_keys) and (key1 in tag_dict[key2[:-5]].keys()): | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 361 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 | 362 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 | 363 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 | 364 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: 
42diff
changeset | 365 # 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 | 366 else: | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 367 # 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 | 368 na1 = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 369 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 | 370 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: 
42diff
changeset | 371 # 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 | 372 else: | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 373 # 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 | 374 lowq1 = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 375 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 | 376 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 | 377 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 | 378 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 379 ref1 = ref1f = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 380 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 | 381 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 | 382 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 | 383 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 384 alt1 = alt1f = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 385 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 | 386 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 | 387 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 | 388 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 | 389 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 | 390 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 | 391 if k != key1: | 
| 4 
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
3diff
changeset | 392 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 | 393 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: 
3diff
changeset | 394 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 | 395 else: | 
| 4 
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
3diff
changeset | 396 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 | 397 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 398 k1 = [] | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 399 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 400 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 | 401 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 | 402 k1 = [] | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 403 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 404 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 | 405 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 | 406 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 | 407 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: 
42diff
changeset | 408 # 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 | 409 else: | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 410 # 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 | 411 na2 = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 412 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 | 413 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: 
42diff
changeset | 414 # 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 | 415 else: | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 416 # 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 | 417 lowq2 = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 418 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 | 419 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 | 420 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 | 421 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 422 ref2 = ref2f = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 423 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 | 424 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 | 425 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 | 426 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 427 alt2 = alt2f = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 428 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 | 429 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 | 430 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 | 431 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 | 432 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 | 433 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 | 434 if k != key1: | 
| 4 
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
3diff
changeset | 435 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 | 436 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: 
3diff
changeset | 437 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 | 438 else: | 
| 4 
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
3diff
changeset | 439 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 | 440 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 441 k2 = [] | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 442 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 443 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 | 444 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 | 445 k2 = [] | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 446 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 447 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 | 448 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 | 449 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 | 450 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: 
42diff
changeset | 451 # 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 | 452 else: | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 453 # 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 | 454 na3 = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 455 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 | 456 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: 
42diff
changeset | 457 # 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 | 458 else: | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 459 # 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 | 460 lowq3 = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 461 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 | 462 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 | 463 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 | 464 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 465 ref3 = ref3f = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 466 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 | 467 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 | 468 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 | 469 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 470 alt3 = alt3f = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 471 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 | 472 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 | 473 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 | 474 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 | 475 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 | 476 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: 
3diff
changeset | 477 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 | 478 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: 
3diff
changeset | 479 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 | 480 else: | 
| 4 
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
3diff
changeset | 481 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 | 482 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 483 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 | 484 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 | 485 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 486 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 | 487 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 | 488 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 | 489 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: 
42diff
changeset | 490 # 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 | 491 else: | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 492 # 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 | 493 na4 = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 494 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 | 495 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: 
42diff
changeset | 496 # 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 | 497 else: | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 498 # 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 | 499 lowq4 = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 500 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 | 501 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 | 502 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 | 503 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 504 ref4 = ref4f = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 505 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 | 506 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 | 507 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 | 508 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 509 alt4 = alt4f = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 510 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 | 511 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 | 512 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 | 513 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 | 514 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 | 515 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: 
3diff
changeset | 516 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 | 517 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: 
3diff
changeset | 518 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 | 519 else: | 
| 4 
386438cd4c3b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
3diff
changeset | 520 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 | 521 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 522 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 | 523 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 | 524 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 525 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 | 526 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: 
42diff
changeset | 527 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: 
42diff
changeset | 528 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: 
42diff
changeset | 529 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 | 530 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: 
42diff
changeset | 531 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: 
42diff
changeset | 532 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: 
42diff
changeset | 533 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: 
42diff
changeset | 534 #print(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: 
42diff
changeset | 535 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: 
42diff
changeset | 536 #print(cigars_dcs1) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 537 end_read1 = reads_dict[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 | 538 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: 
42diff
changeset | 539 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: 
42diff
changeset | 540 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: 
42diff
changeset | 541 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: 
42diff
changeset | 542 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: 
42diff
changeset | 543 end_read2 = reads_dict[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 | 544 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: 
42diff
changeset | 545 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: 
42diff
changeset | 546 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: 
42diff
changeset | 547 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: 
42diff
changeset | 548 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: 
42diff
changeset | 549 end_read3 = reads_dict[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 | 550 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: 
42diff
changeset | 551 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: 
42diff
changeset | 552 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: 
42diff
changeset | 553 #print(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: 
42diff
changeset | 554 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: 
42diff
changeset | 555 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 556 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: 
42diff
changeset | 557 #print(cigars_dcs4) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 558 end_read4 = reads_dict[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 | 559 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 560 used_keys.append(key2[:-5]) | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 561 counts_mut += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 562 if (alt1f + alt2f + alt3f + alt4f) > 0.5: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 563 if total1new == 0: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 564 ref1f = alt1f = None | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 565 alt1ff = -1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 566 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 567 alt1ff = alt1f | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 568 if total2new == 0: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 569 ref2f = alt2f = None | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 570 alt2ff = -1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 571 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 572 alt2ff = alt2f | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 573 if total3new == 0: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 574 ref3f = alt3f = None | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 575 alt3ff = -1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 576 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 577 alt3ff = alt3f | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 578 if total4new == 0: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 579 ref4f = alt4f = None | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 580 alt4ff = -1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 581 else: | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 582 alt4ff = alt4f | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 583 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 584 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 | 585 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 586 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 | 587 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: 
5diff
changeset | 588 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 589 trimmed = False | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 590 contradictory = False | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 591 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: 
42diff
changeset | 592 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: 
42diff
changeset | 593 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: 
42diff
changeset | 594 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: 
42diff
changeset | 595 softclipped_mutation_oneMateOneSSCS = False | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 596 print() | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 597 print(key1, cigars_dcs1, cigars_dcs4, cigars_dcs2, cigars_dcs3) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 598 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: 
42diff
changeset | 599 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: 
42diff
changeset | 600 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: 
42diff
changeset | 601 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 | 602 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 603 # 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: 
42diff
changeset | 604 softclipped_idx1 = [True if re.search(r"^[0-9]+S", string) or re.search(r"S$", string) else False for string in cigars_dcs1] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 605 ratio1 = safe_div(sum(softclipped_idx1), float(len(softclipped_idx1))) >= threshold_reads | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 606 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 607 if any(ij is True for ij in softclipped_idx1): | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 608 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] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 609 softclipped_start1 = [int(string.split("S")[0]) if re.search(r"^[0-9]+S", string) else -1 for string in cigars_dcs1] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 610 softclipped_end1 = [int(re.split("[A-Z]", str(string))[-2]) if re.search(r"S$", string) else -1 for string in cigars_dcs1] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 611 dist_start_read1 = [(pos - soft) if soft != -1 else thr + 1000 for soft, pos in zip(softclipped_start1, pos_read1)] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 612 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)] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 613 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 614 # if read at both ends softclipped --> select end with smallest distance between mut position and softclipping | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 615 if any(ij is True for ij in softclipped_both_ends_idx1): | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 616 print(softclipped_both_ends_idx1) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 617 for nr, indx in enumerate(softclipped_both_ends_idx1): | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 618 if indx: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 619 if dist_start_read1[nr] <= dist_end_read1[nr]: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 620 dist_end_read1[nr] = thr + 1000 # use dist of start and set start to very large number | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 621 else: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 622 dist_start_read1[nr] = thr + 1000 # use dist of end and set start to very large number | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 623 ratio_dist_start1 = safe_div(sum([True if x <= thr else False for x in dist_start_read1]), float(sum(softclipped_idx1))) >= threshold_reads | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 624 ratio_dist_end1 = safe_div(sum([True if x <= thr else False for x in dist_end_read1]), float(sum(softclipped_idx1))) >= threshold_reads | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 625 print(key1, "mate1 ab", dist_start_read1, dist_end_read1, cigars_dcs1, ratio1, ratio_dist_start1, ratio_dist_end1) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 626 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 627 # 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: 
42diff
changeset | 628 softclipped_idx4 = [True if re.search(r"^[0-9]+S", string) or re.search(r"S$", string) else False for string in cigars_dcs4] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 629 ratio4 = safe_div(sum(softclipped_idx4), float(len(softclipped_idx4))) >= threshold_reads | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 630 if any(ij is True for ij in softclipped_idx4): | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 631 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] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 632 softclipped_start4 = [int(string.split("S")[0]) if re.search(r"^[0-9]+S", string) else -1 for string in cigars_dcs4] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 633 softclipped_end4 = [int(re.split("[A-Z]", str(string))[-2]) if re.search(r"S$", string) else -1 for string in cigars_dcs4] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 634 dist_start_read4 = [(pos - soft) if soft != -1 else thr + 1000 for soft, pos in zip(softclipped_start4, pos_read4)] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 635 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)] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 636 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 637 # if read at both ends softclipped --> select end with smallest distance between mut position and softclipping | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 638 if any(ij is True for ij in softclipped_both_ends_idx4): | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 639 print(softclipped_both_ends_idx4) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 640 for nr, indx in enumerate(softclipped_both_ends_idx4): | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 641 if indx: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 642 if dist_start_read4[nr] <= dist_end_read4[nr]: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 643 dist_end_read4[nr] = thr + 1000 # use dist of start and set start to very large number | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 644 else: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 645 dist_start_read4[nr] = thr + 1000 # use dist of end and set start to very large number | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 646 ratio_dist_start4 = safe_div(sum([True if x <= thr else False for x in dist_start_read4]), float(sum(softclipped_idx4))) >= threshold_reads | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 647 ratio_dist_end4 = safe_div(sum([True if x <= thr else False for x in dist_end_read4]), float(sum(softclipped_idx4))) >= threshold_reads | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 648 print(key1, "mate1 ba", dist_start_read4, dist_end_read4,cigars_dcs4, 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: 
42diff
changeset | 649 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 650 # 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: 
42diff
changeset | 651 softclipped_idx2 = [True if re.search(r"^[0-9]+S", string) or 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: 
42diff
changeset | 652 #print(sum(softclipped_idx2)) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 653 ratio2 = safe_div(sum(softclipped_idx2), float(len(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: 
42diff
changeset | 654 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: 
42diff
changeset | 655 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: 
42diff
changeset | 656 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: 
42diff
changeset | 657 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: 
42diff
changeset | 658 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: 
42diff
changeset | 659 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)] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 660 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 661 # if read at both ends softclipped --> select end with smallest distance between mut position and softclipping | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 662 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: 
42diff
changeset | 663 print(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: 
42diff
changeset | 664 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: 
42diff
changeset | 665 if indx: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 666 if dist_start_read2[nr] <= dist_end_read2[nr]: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 667 dist_end_read2[nr] = thr + 1000 # use dist of start and set start to very large number | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 668 else: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 669 dist_start_read2[nr] = thr + 1000 # use dist of end and set start to very large number | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 670 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: 
42diff
changeset | 671 #print(ratio_dist_end2) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 672 #print([True if x <= thr else False for x in ratio_dist_end2]) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 673 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: 
42diff
changeset | 674 print(key1, "mate2 ab", dist_start_read2, dist_end_read2,cigars_dcs2, ratio2, ratio_dist_start2, ratio_dist_end2) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 675 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 676 # 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: 
42diff
changeset | 677 softclipped_idx3 = [True if re.search(r"^[0-9]+S", string) or 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: 
42diff
changeset | 678 ratio3 = safe_div(sum(softclipped_idx3), float(len(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: 
42diff
changeset | 679 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: 
42diff
changeset | 680 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: 
42diff
changeset | 681 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: 
42diff
changeset | 682 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: 
42diff
changeset | 683 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: 
42diff
changeset | 684 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)] | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 685 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 686 # if read at both ends softclipped --> select end with smallest distance between mut position and softclipping | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 687 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: 
42diff
changeset | 688 print(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: 
42diff
changeset | 689 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: 
42diff
changeset | 690 if indx: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 691 if dist_start_read3[nr] <= dist_end_read3[nr]: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 692 dist_end_read3[nr] = thr + 1000 # use dist of start and set start to a larger number than thresh | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 693 else: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 694 dist_start_read3[nr] = thr + 1000 # use dist of end and set start to very large number | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 695 #print([True if x <= thr else False for x in dist_start_read3]) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 696 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: 
42diff
changeset | 697 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: 
42diff
changeset | 698 print(key1, "mate2 ba", dist_start_read3, dist_end_read3,cigars_dcs3, ratio3, ratio_dist_start3, ratio_dist_end3) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 699 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 700 if ((all(float(ij) >= 0.5 for ij in [alt1ff, alt4ff]) & # contradictory variant | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 701 all(float(ij) == 0. for ij in [alt2ff, alt3ff])) | | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 702 (all(float(ij) >= 0.5 for ij in [alt2ff, alt3ff]) & | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 703 all(float(ij) == 0. for ij in [alt1ff, alt4ff]))): | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 704 alt1ff = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 705 alt4ff = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 706 alt2ff = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 707 alt3ff = 0 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 708 trimmed = False | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 709 contradictory = True | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 710 # softclipping tiers | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 711 # information of both mates available --> all reads for both mates and SSCS are softclipped | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 712 elif (ratio1 & ratio4 & ratio2 & ratio3 & | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 713 (ratio_dist_start1 | ratio_dist_end1) & (ratio_dist_start4 | ratio_dist_end4) & (ratio_dist_start2 | ratio_dist_end2) & (ratio_dist_start3 | ratio_dist_end3) & | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 714 all(float(ij) > 0. for ij in [alt1ff, alt2ff, alt3ff, alt4ff])): # all mates available | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 715 # if distance between softclipping and mutation is at start or end of the read smaller than threshold | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 716 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: 
42diff
changeset | 717 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: 
42diff
changeset | 718 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: 
42diff
changeset | 719 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: 
42diff
changeset | 720 softclipped_mutation_oneMateOneSSCS = False | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 721 alt1ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 722 alt4ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 723 alt2ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 724 alt3ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 725 trimmed = False | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 726 contradictory = False | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 727 print(key1, "softclipped_mutation_allMates", softclipped_mutation_allMates) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 728 # 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: 
42diff
changeset | 729 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: 
42diff
changeset | 730 (ratio2 & ratio3 & (ratio_dist_start2 | ratio_dist_end2) & (ratio_dist_start3 | ratio_dist_end3))) & | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 731 all(float(ij) > 0. for ij in [alt1ff, alt2ff, alt3ff, alt4ff])): # all mates available | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 732 # if distance between softclipping and mutation is at start or end of the read smaller than threshold | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 733 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: 
42diff
changeset | 734 softclipped_mutation_oneOfTwoMates = True | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 735 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: 
42diff
changeset | 736 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: 
42diff
changeset | 737 softclipped_mutation_oneMateOneSSCS = False | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 738 alt1ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 739 alt4ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 740 alt2ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 741 alt3ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 742 trimmed = False | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 743 contradictory = False | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 744 print(key1, "softclipped_mutation_oneOfTwoMates", softclipped_mutation_oneOfTwoMates) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 745 # 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: 
42diff
changeset | 746 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: 
42diff
changeset | 747 ((ratio2 & (ratio_dist_start2 | ratio_dist_end2)) | (ratio3 & (ratio_dist_start3 | ratio_dist_end3))) & | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 748 all(float(ij) > 0. for ij in [alt1ff, alt2ff, alt3ff, alt4ff])): # all mates available | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 749 # if distance between softclipping and mutation is at start or end of the read smaller than threshold | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 750 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: 
42diff
changeset | 751 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: 
42diff
changeset | 752 softclipped_mutation_oneOfTwoSSCS = True | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 753 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: 
42diff
changeset | 754 softclipped_mutation_oneMateOneSSCS = False | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 755 alt1ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 756 alt4ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 757 alt2ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 758 alt3ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 759 trimmed = False | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 760 contradictory = False | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 761 print(key1, "softclipped_mutation_oneOfTwoSSCS", softclipped_mutation_oneOfTwoSSCS, [alt1ff, alt2ff, alt3ff, alt4ff]) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 762 # 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: 
42diff
changeset | 763 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: 
42diff
changeset | 764 all(float(ij) < 0. for ij in [alt2ff, alt3ff]) & all(float(ij) > 0. for ij in [alt1ff, alt4ff])) | | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 765 (ratio2 & ratio3 & (ratio_dist_start2 | ratio_dist_end2) & (ratio_dist_start3 | ratio_dist_end3) & | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 766 all(float(ij) < 0. for ij in [alt1ff, alt4ff]) & all(float(ij) > 0. for ij in [alt2ff, alt3ff]))): # all mates available | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 767 # if distance between softclipping and mutation is at start or end of the read smaller than threshold | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 768 #if ((((len(dist_start_read1) > 0 | len(dist_end_read1) > 0 ) & all(ij <= thr or nm <= thr for ij, nm in zip(dist_start_read1, dist_end_read1))) & | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 769 # ((len(dist_start_read4) > 0 | len(dist_end_read4) > 0 ) & all(ij <= thr or nm <= thr for ij, nm in zip(dist_start_read4, dist_end_read4)))) | | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 770 # (((len(dist_start_read2) > 0 | len(dist_end_read2) > 0 ) & all(ij <= thr or nm <= thr for ij, nm in zip(dist_start_read2, dist_end_read2))) & | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 771 # ((len(dist_start_read3) > 0 | len(dist_end_read3) > 0 ) & all(ij <= thr or nm <= thr for ij, nm in zip(dist_start_read3, dist_end_read3))))): | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 772 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: 
42diff
changeset | 773 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: 
42diff
changeset | 774 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: 
42diff
changeset | 775 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: 
42diff
changeset | 776 softclipped_mutation_oneMateOneSSCS = False | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 777 alt1ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 778 alt4ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 779 alt2ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 780 alt3ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 781 trimmed = False | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 782 contradictory = False | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 783 print(key1, "softclipped_mutation_oneMate", softclipped_mutation_oneMate) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 784 # 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: 
42diff
changeset | 785 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: 
42diff
changeset | 786 (all(float(ij) < 0. for ij in [alt2ff, alt3ff]) & all(float(ij) > 0. for ij in [alt1ff, alt4ff]))) | | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 787 (((ratio2 & (ratio_dist_start2 | ratio_dist_end2)) | (ratio3 & (ratio_dist_start3 | ratio_dist_end3))) & | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 788 (all(float(ij) < 0. for ij in [alt1ff, alt4ff]) & all(float(ij) < 0. for ij in [alt2ff, alt3ff])))): # all mates available | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 789 # if distance between softclipping and mutation is at start or end of the read smaller than threshold | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 790 #if ((all(ij <= thr or nm <= thr for ij, nm in zip(dist_start_read1, dist_end_read1)) | | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 791 # all(ij <= thr or nm <= thr for ij, nm in zip(dist_start_read4, dist_end_read4))) | | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 792 # (all(ij <= thr or nm <= thr for ij, nm in zip(dist_start_read2, dist_end_read2)) | | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 793 # all(ij <= thr or nm <= thr for ij, nm in zip(dist_start_read3, dist_end_read3)))): | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 794 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: 
42diff
changeset | 795 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: 
42diff
changeset | 796 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: 
42diff
changeset | 797 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: 
42diff
changeset | 798 softclipped_mutation_oneMateOneSSCS = True | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 799 alt1ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 800 alt4ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 801 alt2ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 802 alt3ff = 0 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 803 trimmed = False | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 804 contradictory = False | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 805 print(key1, "softclipped_mutation_oneMateOneSSCS", softclipped_mutation_oneMateOneSSCS) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 806 | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 807 else: | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 808 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 | 809 beg1 = total1new | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 810 total1new = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 811 alt1ff = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 812 alt1f = 0 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 813 trimmed = True | 
| 28 
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
27diff
changeset | 814 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 815 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: 
27diff
changeset | 816 beg4 = total4new | 
| 
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
27diff
changeset | 817 total4new = 0 | 
| 
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
27diff
changeset | 818 alt4ff = 0 | 
| 
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
27diff
changeset | 819 alt4f = 0 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 820 trimmed = True | 
| 28 
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
27diff
changeset | 821 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 822 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: 
27diff
changeset | 823 beg2 = total2new | 
| 
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
27diff
changeset | 824 total2new = 0 | 
| 
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
27diff
changeset | 825 alt2ff = 0 | 
| 
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
27diff
changeset | 826 alt2f = 0 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 827 trimmed = True | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 828 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 829 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: 
27diff
changeset | 830 beg3 = total3new | 
| 
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
27diff
changeset | 831 total3new = 0 | 
| 
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
27diff
changeset | 832 alt3ff = 0 | 
| 
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
27diff
changeset | 833 alt3f = 0 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 834 trimmed = True | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 835 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 | 836 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 | 837 | 
| 46 
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
45diff
changeset | 838 | 
| 48 
e2a655533077
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
47diff
changeset | 839 #sum_highTiers = sum([tier_dict[key1][ij] for ij in tier_dict[key1].keys()[:6]]) | 
| 46 
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
45diff
changeset | 840 | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 841 # assign tiers | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 842 if ((all(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: 
42diff
changeset | 843 all(float(ij) >= 0.75 for ij in [alt1ff, alt4ff])) | | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 844 (all(int(ij) >= 3 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: 
42diff
changeset | 845 all(float(ij) >= 0.75 for ij in [alt2ff, alt3ff]))): | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 846 tier = "1.1" | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 847 counter_tier11 += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 848 tier_dict[key1]["tier 1.1"] += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 849 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 850 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: 
42diff
changeset | 851 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: 
42diff
changeset | 852 any(int(ij) >= 3 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: 
42diff
changeset | 853 all(float(ij) >= 0.75 for ij in [alt1ff, alt2ff, alt3ff, alt4ff])): | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 854 tier = "1.2" | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 855 counter_tier12 += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 856 tier_dict[key1]["tier 1.2"] += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 857 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 858 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: 
42diff
changeset | 859 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: 
42diff
changeset | 860 all(float(ij) >= 0.75 for ij in [alt1ff, alt4ff])) | | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 861 (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: 
42diff
changeset | 862 any(int(ij) >= 3 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: 
42diff
changeset | 863 all(float(ij) >= 0.75 for ij in [alt2ff, alt3ff]))): | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 864 tier = "2.1" | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 865 counter_tier21 += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 866 tier_dict[key1]["tier 2.1"] += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 867 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 868 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: 
42diff
changeset | 869 all(float(ij) >= 0.75 for ij in [alt1ff, alt2ff, alt3ff, alt4ff])): | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 870 tier = "2.2" | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 871 counter_tier22 += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 872 tier_dict[key1]["tier 2.2"] += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 873 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 874 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: 
42diff
changeset | 875 any(int(ij) >= 3 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: 
42diff
changeset | 876 all(float(ij) >= 0.75 for ij in [alt1ff, alt4ff]) & | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 877 any(float(ij) >= 0.75 for ij in [alt2ff, alt3ff])) | | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 878 (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: 
42diff
changeset | 879 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: 
42diff
changeset | 880 all(float(ij) >= 0.75 for ij in [alt2ff, alt3ff]) & | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 881 any(float(ij) >= 0.75 for ij in [alt1ff, alt4ff]))): | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 882 tier = "2.3" | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 883 counter_tier23 += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 884 tier_dict[key1]["tier 2.3"] += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 885 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 886 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: 
42diff
changeset | 887 all(float(ij) >= 0.75 for ij in [alt1ff, alt4ff])) | | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 888 (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: 
42diff
changeset | 889 all(float(ij) >= 0.75 for ij in [alt2ff, alt3ff]))): | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 890 tier = "2.4" | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 891 counter_tier24 += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 892 tier_dict[key1]["tier 2.4"] += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 893 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 894 elif ((len(pure_tags_dict_short[key1]) > 1) & | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 895 (all(float(ij) >= 0.5 for ij in [alt1ff, alt4ff]) | | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 896 all(float(ij) >= 0.5 for ij in [alt2ff, alt3ff]))): | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 897 tier = "3.1" | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 898 counter_tier31 += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 899 tier_dict[key1]["tier 3.1"] += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 900 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 901 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: 
42diff
changeset | 902 all(float(ij) >= 0.5 for ij in [alt1ff, alt4ff])) | | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 903 (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: 
42diff
changeset | 904 all(float(ij) >= 0.5 for ij in [alt2ff, alt3ff]))): | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 905 tier = "3.2" | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 906 counter_tier32 += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 907 tier_dict[key1]["tier 3.2"] += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 908 | 
| 48 
e2a655533077
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
47diff
changeset | 909 #elif (trimmed) and (sum_highTiers > 1): | 
| 
e2a655533077
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
47diff
changeset | 910 # tier = "2.5" | 
| 
e2a655533077
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
47diff
changeset | 911 # counter_tier25 += 1 | 
| 
e2a655533077
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
47diff
changeset | 912 # tier_dict[key1]["tier 2.5"] += 1 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 913 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 914 elif (trimmed): | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 915 tier = "4" | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 916 counter_tier4 += 1 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 917 tier_dict[key1]["tier 4"] += 1 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 918 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 919 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: 
42diff
changeset | 920 tier = "5.1" | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 921 counter_tier51 += 1 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 922 tier_dict[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 | 923 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 924 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: 
42diff
changeset | 925 tier = "5.2" | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 926 counter_tier52 += 1 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 927 tier_dict[key1]["tier 5.2"] += 1 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 928 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 929 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: 
42diff
changeset | 930 tier = "5.3" | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 931 counter_tier53 += 1 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 932 tier_dict[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 | 933 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 934 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: 
42diff
changeset | 935 tier = "5.4" | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 936 counter_tier54 += 1 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 937 tier_dict[key1]["tier 5.4"] += 1 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 938 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 939 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: 
42diff
changeset | 940 tier = "5.5" | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 941 counter_tier55 += 1 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 942 tier_dict[key1]["tier 5.5"] += 1 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 943 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 944 elif (contradictory): | 
| 28 
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
27diff
changeset | 945 tier = "6" | 
| 
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
27diff
changeset | 946 counter_tier6 += 1 | 
| 
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
27diff
changeset | 947 tier_dict[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 | 948 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 949 else: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 950 tier = "7" | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 951 counter_tier7 += 1 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 952 tier_dict[key1]["tier 7"] += 1 | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 953 | 
| 7 
ded0dc6a20d3
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
6diff
changeset | 954 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: 
42diff
changeset | 955 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: 
0diff
changeset | 956 sample_tag = key2[:-5] | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 957 array2 = np.unique(whole_array) # remove duplicate sequences to decrease running time | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 958 # exclude identical tag from array2, to prevent comparison to itself | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 959 same_tag = np.where(array2 == sample_tag) | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 960 index_array2 = np.arange(0, len(array2), 1) | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 961 index_withoutSame = np.delete(index_array2, same_tag) # delete identical tag from the data | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 962 array2 = array2[index_withoutSame] | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 963 if len(array2) != 0: # only perform chimera analysis if there is more than 1 variant | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 964 array1_half = sample_tag[0:int(len(sample_tag) / 2)] # mate1 part1 | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 965 array1_half2 = sample_tag[int(len(sample_tag) / 2):int(len(sample_tag))] # mate1 part 2 | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 966 array2_half = np.array([ii[0:int(len(ii) / 2)] for ii in array2]) # mate2 part1 | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 967 array2_half2 = np.array([ii[int(len(ii) / 2):int(len(ii))] for ii in array2]) # mate2 part2 | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 968 | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 969 min_tags_list_zeros = [] | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 970 chimera_tags = [] | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 971 for mate_b in [False, True]: | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 972 i = 0 # counter, only used to see how many HDs of tags were already calculated | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 973 if mate_b is False: # HD calculation for all a's | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 974 half1_mate1 = array1_half | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 975 half2_mate1 = array1_half2 | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 976 half1_mate2 = array2_half | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 977 half2_mate2 = array2_half2 | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 978 elif mate_b is True: # HD calculation for all b's | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 979 half1_mate1 = array1_half2 | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 980 half2_mate1 = array1_half | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 981 half1_mate2 = array2_half2 | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 982 half2_mate2 = array2_half | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 983 # calculate HD of "a" in the tag to all "a's" or "b" in the tag to all "b's" | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 984 dist = np.array([sum(itertools.imap(operator.ne, half1_mate1, c)) for c in half1_mate2]) | 
| 2 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 985 min_index = np.where(dist == dist.min()) # get index of min HD | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 986 # get all "b's" of the tag or all "a's" of the tag with minimum HD | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 987 min_tag_half2 = half2_mate2[min_index] | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 988 min_tag_array2 = array2[min_index] # get whole tag with min HD | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 989 min_value = dist.min() | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 990 # calculate HD of "b" to all "b's" or "a" to all "a's" | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 991 dist_second_half = np.array([sum(itertools.imap(operator.ne, half2_mate1, e)) | 
| 2 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 992 for e in min_tag_half2]) | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 993 | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 994 dist2 = dist_second_half.max() | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 995 max_index = np.where(dist_second_half == dist_second_half.max())[0] # get index of max HD | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 996 max_tag = min_tag_array2[max_index] | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 997 | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 998 # tags which have identical parts: | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 999 if min_value == 0 or dist2 == 0: | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1000 min_tags_list_zeros.append(tag) | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1001 chimera_tags.append(max_tag) | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1002 # chimeric = True | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1003 # else: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1004 # chimeric = False | 
| 2 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1005 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1006 # if mate_b is False: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1007 # text = "pos {}: sample tag: {}; HD a = {}; HD b' = {}; similar tag(s): {}; chimeric = {}".format(pos, sample_tag, min_value, dist2, list(max_tag), chimeric) | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1008 # else: | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1009 # text = "pos {}: sample tag: {}; HD a' = {}; HD b = {}; similar tag(s): {}; chimeric = {}".format(pos, sample_tag, dist2, min_value, list(max_tag), chimeric) | 
| 2 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1010 i += 1 | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1011 chimera_tags = [x for x in chimera_tags if x != []] | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1012 chimera_tags_new = [] | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1013 for i in chimera_tags: | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1014 if len(i) > 1: | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1015 for t in i: | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1016 chimera_tags_new.append(t) | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1017 else: | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1018 chimera_tags_new.extend(i) | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1019 chimera = ", ".join(chimera_tags_new) | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1020 else: | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1021 chimera_tags_new = [] | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1022 chimera = "" | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1023 | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1024 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: 
0diff
changeset | 1025 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: 
0diff
changeset | 1026 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: 
0diff
changeset | 1027 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: 
0diff
changeset | 1028 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: 
0diff
changeset | 1029 else: | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 1030 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: 
0diff
changeset | 1031 | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1032 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 | 1033 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 | 1034 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 | 1035 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 | 1036 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 | 1037 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 | 1038 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 | 1039 read_pos3 = read_len_median3 = None | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1040 line = (var_id, tier, 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) | 
| 55 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1041 #ws1.write_row(row, 0, line) | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1042 #csv_writer.writerow(line) | 
| 48 
e2a655533077
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
47diff
changeset | 1043 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) | 
| 55 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1044 #ws1.write_row(row + 1, 0, line2) | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1045 #csv_writer.writerow(line2) | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1046 | 
| 55 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1047 #ws1.conditional_format('L{}:M{}'.format(row + 1, row + 2), | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1048 # {'type': 'formula', | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1049 # 'criteria': '=OR($B${}="1.1", $B${}="1.2")'.format(row + 1, row + 1), | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1050 # 'format': format1, | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1051 # 'multi_range': 'L{}:M{} T{}:U{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1052 #ws1.conditional_format('L{}:M{}'.format(row + 1, row + 2), | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1053 # {'type': 'formula', | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1054 # '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), | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1055 # 'format': format3, | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1056 # 'multi_range': 'L{}:M{} T{}:U{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1057 #ws1.conditional_format('L{}:M{}'.format(row + 1, row + 2), | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1058 # {'type': 'formula', | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1059 # 'criteria': '=$B${}>="3"'.format(row + 1), | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1060 # 'format': format2, | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1061 # 'multi_range': 'L{}:M{} T{}:U{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1062 #if trimmed: | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1063 if key1 not in list(change_tier_after_print.keys()): | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1064 change_tier_after_print[key1] = [((row, line, line2))] | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1065 else: | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1066 change_tier_after_print[key1].append(((row, line, line2))) | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1067 | 
| 11 
84a1a3f70407
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
10diff
changeset | 1068 row += 3 | 
| 55 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1069 | 
| 2 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1070 if chimera_correction: | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1071 chimeric_dcs_high_tiers = 0 | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1072 chimeric_dcs = 0 | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1073 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: 
0diff
changeset | 1074 tiers = chimeric_tag[keys_chimera] | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1075 chimeric_dcs += len(tiers) - 1 | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1076 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: 
0diff
changeset | 1077 if high_tiers == len(tiers): | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1078 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: 
0diff
changeset | 1079 else: | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1080 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: 
0diff
changeset | 1081 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: 
47diff
changeset | 1082 | 
| 55 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1083 # write to file | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1084 | 
| 48 
e2a655533077
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
47diff
changeset | 1085 # 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: 
52diff
changeset | 1086 sum_highTiers = sum([tier_dict[key1][ij] for ij in list(sorted(tier_dict[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: 
54diff
changeset | 1087 | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1088 correct_tier = False | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1089 | 
| 48 
e2a655533077
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
47diff
changeset | 1090 if tier_dict[key1]["tier 4"] > 0 and sum_highTiers > 0: | 
| 
e2a655533077
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
47diff
changeset | 1091 tier_dict[key1]["tier 2.5"] = tier_dict[key1]["tier 4"] | 
| 
e2a655533077
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
47diff
changeset | 1092 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: 
54diff
changeset | 1093 correct_tier = True | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1094 | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1095 lines = change_tier_after_print[key1] | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1096 for sample in lines: | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1097 row = sample[0] | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1098 line1 = sample[1] | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1099 line2 = sample[2] | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1100 | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1101 if correct_tier: | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1102 line1 = list(line1) | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1103 line1[1] = "2.5" | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1104 line1 = tuple(line1) | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1105 ws1.write_row(row, 0, line1) | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1106 csv_writer.writerow(line1) | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1107 ws1.write_row(row + 1, 0, line2) | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1108 csv_writer.writerow(line2) | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1109 | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1110 ws1.conditional_format('L{}:M{}'.format(row + 1, row + 2), | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1111 {'type': 'formula', | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1112 'criteria': '=OR($B${}="1.1", $B${}="1.2")'.format(row + 1, row + 1), | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1113 'format': format1, | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1114 'multi_range': 'L{}:M{} T{}:U{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1115 ws1.conditional_format('L{}:M{}'.format(row + 1, row + 2), | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1116 {'type': 'formula', | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1117 '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), | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1118 'format': format3, | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1119 'multi_range': 'L{}:M{} T{}:U{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1120 ws1.conditional_format('L{}:M{}'.format(row + 1, row + 2), | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1121 {'type': 'formula', | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1122 'criteria': '=$B${}>="3"'.format(row + 1), | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1123 'format': format2, | 
| 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1124 'multi_range': 'L{}:M{} T{}:U{} B{}'.format(row + 1, row + 2, row + 1, row + 2, row + 1, row + 2)}) | 
| 50 
b32c973fe8ab
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
49diff
changeset | 1125 | 
| 2 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1126 # sheet 2 | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1127 if chimera_correction: | 
| 55 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1128 header_line2 = ('variant ID', 'cvrg', 'AC alt (all tiers)', 'AF (all tiers)', 'chimeras in AC alt (all tiers)', 'chimera-corrected cvrg', 'chimera-corrected AF (all tiers)', 'cvrg (tiers 1.1-2.5)', 'AC alt (tiers 1.1-2.5)', 'AF (tiers 1.1-2.5)', 'chimeras in AC alt (tiers 1.1-2.5)', 'chimera-corrected cvrg (tiers 1.1-2.5)', 'chimera-corrected AF (tiers 1.1-2.5)', 'AC alt (orginal DCS)', 'AF (original DCS)', | 
| 46 
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
45diff
changeset | 1129 'tier 1.1', 'tier 1.2', 'tier 2.1', 'tier 2.2', 'tier 2.3', 'tier 2.4', 'tier 2.5', | 
| 
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
45diff
changeset | 1130 'tier 3.1', 'tier 3.2', 'tier 4', 'tier 5.1', 'tier 5.2', 'tier 5.3', 'tier 5.4', 'tier 5.5', 'tier 6', 'tier 7', 'AF 1.1-1.2', 'AF 1.1-2.1', 'AF 1.1-2.2', | 
| 55 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1131 'AF 1.1-2.3', 'AF 1.1-2.4', 'AF 1.1-2.5', 'AF 1.1-3.1', 'AF 1.1-3.2', 'AF 1.1-4', 'AF 1.1-5.1', 'AF 1.1-5.2', 'AF 1.1-5.3', 'AF 1.1-5.4', 'AF 1.1-5.5', 'AF 1.1-6', 'AF 1.1-7') | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1132 else: | 
| 55 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1133 header_line2 = ('variant ID', 'cvrg', 'AC alt (all tiers)', 'AF (all tiers)', 'cvrg (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)', | 
| 46 
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
45diff
changeset | 1134 'tier 1.1', 'tier 1.2', 'tier 2.1', 'tier 2.2', 'tier 2.3', 'tier 2.4', 'tier 2.5', | 
| 
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
45diff
changeset | 1135 'tier 3.1', 'tier 3.2', 'tier 4', 'tier 5.1', 'tier 5.2', 'tier 5.3', 'tier 5.4', 'tier 5.5', 'tier 6', 'tier 7', 'AF 1.1-1.2', 'AF 1.1-2.1', 'AF 1.1-2.2', | 
| 55 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1136 'AF 1.1-2.3', 'AF 1.1-2.4', 'AF 1.1-2.5', 'AF 1.1-3.1', 'AF 1.1-3.2', 'AF 1.1-4', 'AF 1.1-5.1', 'AF 1.1-5.2', 'AF 1.1-5.3', 'AF 1.1-5.4', 'AF 1.1-5.5', 'AF 1.1-6', 'AF 1.1-7') | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1137 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1138 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 | 1139 row = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1140 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1141 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 | 1142 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 | 1143 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: 
6diff
changeset | 1144 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: 
5diff
changeset | 1145 ref = mut_array[i, 2] | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 1146 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: 
6diff
changeset | 1147 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 | 1148 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 | 1149 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 | 1150 cvrg = ref_count + alt_count | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1151 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1152 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 | 1153 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 | 1154 used_tiers = [] | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1155 cum_af = [] | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1156 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 | 1157 # calculate cummulative AF | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1158 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 | 1159 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 | 1160 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 | 1161 cum_af.append(cum) | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1162 if sum(used_tiers) == 0: # skip mutations that are filtered by the VA in the first place | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1163 continue | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1164 lst.extend([sum(used_tiers), 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 | 1165 if chimera_correction: | 
| 2 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1166 chimeras_all = chimera_dict[key1][0] | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1167 new_alt = sum(used_tiers) - chimeras_all | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1168 fraction_chimeras = safe_div(chimeras_all, float(sum(used_tiers))) | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1169 if fraction_chimeras is None: | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1170 fraction_chimeras = 0. | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1171 new_cvrg = cvrg * (1. - fraction_chimeras) | 
| 3 
4fc62ab6e9e8
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
2diff
changeset | 1172 lst.extend([chimeras_all, new_cvrg, safe_div(new_alt, new_cvrg)]) | 
| 46 
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
45diff
changeset | 1173 lst.extend([(cvrg - sum(used_tiers[-10:])), sum(used_tiers[0:7]), safe_div(sum(used_tiers[0:7]), (cvrg - sum(used_tiers[-10:])))]) | 
| 2 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1174 if chimera_correction: | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1175 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: 
45diff
changeset | 1176 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: 
45diff
changeset | 1177 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: 
0diff
changeset | 1178 if fraction_chimeras is None: | 
| 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1179 fraction_chimeras = 0. | 
| 46 
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
45diff
changeset | 1180 new_cvrg = (cvrg - sum(used_tiers[-10:])) * (1. - fraction_chimeras) | 
| 3 
4fc62ab6e9e8
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
2diff
changeset | 1181 lst.extend([chimeras_all, new_cvrg, 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: 
0diff
changeset | 1182 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 | 1183 lst.extend(used_tiers) | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1184 lst.extend(cum_af) | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1185 lst = tuple(lst) | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1186 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: 
40diff
changeset | 1187 if chimera_correction: | 
| 
db3ed9202516
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
40diff
changeset | 1188 ws2.conditional_format('P{}:Q{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$P$1="tier 1.1"', 'format': format12, 'multi_range': 'P{}:Q{} P1:Q1'.format(row + 2, row + 2)}) | 
| 46 
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
45diff
changeset | 1189 ws2.conditional_format('R{}:V{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$R$1="tier 2.1"', 'format': format32, 'multi_range': 'R{}:V{} R1:V1'.format(row + 2, row + 2)}) | 
| 
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
45diff
changeset | 1190 ws2.conditional_format('W{}:AF{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$W$1="tier 3.1"', 'format': format22, 'multi_range': 'W{}:AF{} W1:AF1'.format(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: 
40diff
changeset | 1191 else: | 
| 
db3ed9202516
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
40diff
changeset | 1192 ws2.conditional_format('J{}:K{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$J$1="tier 1.1"', 'format': format12, 'multi_range': 'J{}:K{} J1:K1'.format(row + 2, row + 2)}) | 
| 46 
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
45diff
changeset | 1193 ws2.conditional_format('L{}:P{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$L$1="tier 2.1"', 'format': format32, 'multi_range': 'L{}:P{} L1:P1'.format(row + 2, row + 2)}) | 
| 47 
edf8596463a8
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
46diff
changeset | 1194 ws2.conditional_format('Q{}:Z{}'.format(row + 2, row + 2), {'type': 'formula', 'criteria': '=$Q$1="tier 3.1"', 'format': format22, 'multi_range': 'Q{}:Z{} Q1:Z1'.format(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 | 1195 row += 1 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1196 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1197 # sheet 3 | 
| 2 
9d74f30275c6
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
0diff
changeset | 1198 sheet3 = [("tier 1.1", counter_tier11), ("tier 1.2", counter_tier12), ("tier 2.1", counter_tier21), | 
| 46 
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
45diff
changeset | 1199 ("tier 2.2", counter_tier22), ("tier 2.3", counter_tier23), ("tier 2.4", counter_tier24), ("tier 2.5", counter_tier25), | 
| 
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
45diff
changeset | 1200 ("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: 
42diff
changeset | 1201 ("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: 
42diff
changeset | 1202 ("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 | 1203 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1204 header = ("tier", "count") | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1205 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 | 1206 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1207 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 | 1208 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 | 1209 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 | 1210 {'type': 'formula', | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1211 '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: 
42diff
changeset | 1212 'format': format1}) | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1213 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 | 1214 {'type': 'formula', | 
| 46 
f733c425b804
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
45diff
changeset | 1215 '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: 
42diff
changeset | 1216 'format': format3}) | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1217 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 | 1218 {'type': 'formula', | 
| 30 
e7da54e10e2d
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
29diff
changeset | 1219 '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: 
42diff
changeset | 1220 'format': format2}) | 
| 0 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1221 | 
| 28 
afda74e874ac
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
27diff
changeset | 1222 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: 
27diff
changeset | 1223 ("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: 
27diff
changeset | 1224 ("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: 
27diff
changeset | 1225 ("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: 
27diff
changeset | 1226 ("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: 
27diff
changeset | 1227 ("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"), | 
| 56 
371c09d4050b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
55diff
changeset | 1228 ("Tier 2.5", "variants at the start or end of the read 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: 
27diff
changeset | 1229 ("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: 
27diff
changeset | 1230 ("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: 
54diff
changeset | 1231 ("Tier 4", "variants at the start or end of the reads"), | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1232 ("Tier 5.1", "variant is close to softclipping in both mates"), | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1233 ("Tier 5.2", "variant is close to softclipping in one of the mates"), | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1234 ("Tier 5.3", "variant is close to softclipping in one of the SSCS of both mates"), | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1235 ("Tier 5.4", "variant is close to softclipping in one mate (no information of second mate"), | 
| 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1236 ("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: 
54diff
changeset | 1237 ("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: 
54diff
changeset | 1238 ("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: 
54diff
changeset | 1239 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 | 1240 "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 | 1241 "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 | 1242 ("", "", "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 | 1243 "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 | 1244 "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: 
54diff
changeset | 1245 [("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 | 1246 "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 | 1247 "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 | 1248 ("", "", "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 | 1249 "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 | 1250 "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: 
54diff
changeset | 1251 [("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 | 1252 "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 | 1253 "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 | 1254 ("", "", "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 | 1255 "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 | 1256 "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: 
54diff
changeset | 1257 [("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 | 1258 "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 | 1259 "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 | 1260 ("", "", "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 | 1261 "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 | 1262 "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: 
54diff
changeset | 1263 [("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 | 1264 "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 | 1265 "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 | 1266 ("", "", "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 | 1267 "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 | 1268 "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: 
54diff
changeset | 1269 [("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 | 1270 "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 | 1271 "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 | 1272 ("", "", "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 | 1273 "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 | 1274 "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: 
54diff
changeset | 1275 [("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 | 1276 "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 | 1277 "4098", "5", "10", "", ""), | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1278 ("", "", "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 | 1279 "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 | 1280 "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: 
54diff
changeset | 1281 [("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: 
54diff
changeset | 1282 "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: 
54diff
changeset | 1283 ("", "", "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: 
54diff
changeset | 1284 "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: 
54diff
changeset | 1285 "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: 
54diff
changeset | 1286 [("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 | 1287 "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 | 1288 "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 | 1289 ("", "", "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 | 1290 "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 | 1291 "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: 
54diff
changeset | 1292 [("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 | 1293 "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 | 1294 "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 | 1295 ("", "", "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 | 1296 "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 | 1297 "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: 
54diff
changeset | 1298 [("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: 
42diff
changeset | 1299 "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 | 1300 ("", "", "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 | 1301 "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 | 1302 "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: 
54diff
changeset | 1303 [("" * 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: 
54diff
changeset | 1304 [("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 | 1305 "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 | 1306 "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 | 1307 ("", "", "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 | 1308 "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: 
0diff
changeset | 1309 "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: 
54diff
changeset | 1310 [("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 | 1311 "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 | 1312 "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 | 1313 ("", "", "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 | 1314 "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: 
0diff
changeset | 1315 "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 | 1316 | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1317 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 | 1318 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 | 1319 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 | 1320 row = 0 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1321 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 | 1322 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 | 1323 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 | 1324 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 | 1325 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: 
42diff
changeset | 1326 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 | 1327 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: 
45diff
changeset | 1328 {'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: 
40diff
changeset | 1329 'format': format33, | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1330 '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 | 1331 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 | 1332 {'type': 'formula', | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1333 '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: 
40diff
changeset | 1334 'format': format23, | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1335 '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 | 1336 row += 3 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1337 workbook.close() | 
| 6 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 1338 workbook2.close() | 
| 
11a2a34f8a2b
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
5diff
changeset | 1339 workbook3.close() | 
| 55 
8fbe6aba07e5
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
54diff
changeset | 1340 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 | 1341 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1342 | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1343 if __name__ == '__main__': | 
| 
e5953c54cfb5
planemo upload for repository https://github.com/gpovysil/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: diff
changeset | 1344 sys.exit(read2mut(sys.argv)) | 
| 43 
d21960b45a6b
planemo upload for repository https://github.com/Single-Molecule-Genetics/VariantAnalyzerGalaxy/tree/master/tools/variant_analyzer commit ee4a8e6cf290e6c8a4d55f9cd2839d60ab3b11c8
 mheinzl parents: 
42diff
changeset | 1345 | 
