Mercurial > repos > artbio > manta
comparison customConfigManta.py @ 5:f55d45b0c6d1 draft
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/manta commit 86427647db100383faa432008b58e768b56ac416"
author | artbio |
---|---|
date | Tue, 09 Jun 2020 06:23:39 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
4:d09254e37c68 | 5:f55d45b0c6d1 |
---|---|
1 import argparse | |
2 | |
3 | |
4 def Parser(): | |
5 the_parser = argparse.ArgumentParser() | |
6 the_parser.add_argument( | |
7 '--minCandidateVariantSize', type=int, default=8, | |
8 help="Run Manta reporting for all SVs/indels at or above this size") | |
9 the_parser.add_argument( | |
10 '--rnaMinCandidateVariantSize', type=int, default=1000, | |
11 help="Separate option (to provide different default) used for \ | |
12 runs in RNA-mode") | |
13 the_parser.add_argument( | |
14 '--minEdgeObservations', type=int, default=3, | |
15 help="Remove all edges from the graph unless they're supported \ | |
16 by this many 'observations'") | |
17 the_parser.add_argument( | |
18 '--graphNodeMaxEdgeCount', type=int, default=10, | |
19 help="If both nodes of an edge have an edge count higher than this, \ | |
20 then skip evaluation of the edge") | |
21 the_parser.add_argument( | |
22 '--minCandidateSpanningCount', type=int, default=3, | |
23 help="Run discovery and candidate reporting for all SVs/indels with \ | |
24 at least this many spanning support observations") | |
25 the_parser.add_argument( | |
26 '--minScoredVariantSize', type=int, default=50, | |
27 help="After candidate identification, only score and report \ | |
28 SVs/indels at or above this size") | |
29 the_parser.add_argument( | |
30 '--minDiploidVariantScore', type=int, default=10, | |
31 help="minimum VCF QUAL score for a variant to be included in \ | |
32 the diploid vcf") | |
33 the_parser.add_argument( | |
34 '--minPassDiploidVariantScore', type=int, default=20, | |
35 help="VCF QUAL score below which a variant is marked as \ | |
36 filtered in the diploid vcf") | |
37 the_parser.add_argument( | |
38 '--minPassDiploidGTScore', type=int, default=15, | |
39 help="minimum genotype quality score below which single samples \ | |
40 are filtered for a variant in the diploid vcf") | |
41 the_parser.add_argument( | |
42 '--minSomaticScore', type=int, default=10, | |
43 help="minimum VCF QUAL score for a variant to be included in the \ | |
44 diploid vcf") | |
45 the_parser.add_argument( | |
46 '--minPassSomaticScore', type=int, default=30, | |
47 help="somatic quality scores below this level are filtered in the \ | |
48 somatic vcf") | |
49 the_parser.add_argument( | |
50 '--enableRemoteReadRetrievalForInsertionsInGermlineCallingModes', | |
51 type=int, default=1, | |
52 help="includes tumor-normal subtraction and tumor-only calling") | |
53 the_parser.add_argument( | |
54 '--enableRemoteReadRetrievalForInsertionsInCancerCallingModes', | |
55 type=int, default=0, | |
56 help="GermlineCallingModes includes all other calling modes") | |
57 the_parser.add_argument( | |
58 '--useOverlapPairEvidence', type=int, default=0, | |
59 help="Set 1 if an overlapping read pair will be considered as \ | |
60 evidence. Set to 0 to skip overlapping read pairs") | |
61 args = the_parser.parse_args() | |
62 return args | |
63 | |
64 | |
65 if __name__ == "__main__": | |
66 args = Parser() | |
67 # recover arguments as a dictionary with keys = argument name and values | |
68 # are argument values | |
69 argsDict = args.__dict__ | |
70 ini_lines = [] | |
71 # implement first, hard-coded ini lines | |
72 ini_lines.append('[manta]') | |
73 ini_lines.append('referenceFasta = /dummy/path/to/genome.fa') | |
74 # implement the rest of the ini lines for the argsDict | |
75 for argument in argsDict: | |
76 ini_lines.append("%s = %s" % (argument, str(argsDict[argument]))) | |
77 # print ini_lines in configManta.py.ini | |
78 handler = open('configManta.py.ini', 'w') | |
79 for line in ini_lines: | |
80 handler.write("%s\n" % line) |