You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check if the provided file exists and has a .bed or .tsv extension.
14
+
"""
15
+
iftype=="bed":
16
+
ifnotos.path.exists(arg):
17
+
parser.error(f"The file '{arg}' does not exist.")
18
+
elifnotarg.endswith('.bed'):
19
+
parser.error(f"The file '{arg}' is not a .bed file.")
20
+
else:
21
+
returnarg
22
+
23
+
iftype=="tsv":
24
+
ifnotos.path.exists(arg):
25
+
parser.error(f"The file '{arg}' does not exist.")
26
+
elifnotarg.endswith('.tsv'):
27
+
parser.error(f"The file '{arg}' is not a .tsv file.")
28
+
else:
29
+
returnarg
30
+
31
+
32
+
#Argument parser for command line interface including necessary file and options
33
+
34
+
parser=argparse.ArgumentParser()
35
+
36
+
parser.add_argument("path_input_bed", type=lambdax: is_valid_file(parser, x, "bed"), help="Path to input bed file")
37
+
parser.add_argument("path_input_tsv", type=lambdax: is_valid_file(parser, x, "tsv"), help="Path to input tsv file")
38
+
parser.add_argument("loci_file", type=lambdax: is_valid_file(parser, x, "bed"), help="Path to Loci file used for straglr analysis")
39
+
parser.add_argument("-o", "--output", type=str, required=True, help="Path to output folder")
40
+
41
+
parser.add_argument("--hist", action="store_true", help="Plots histograms of pathogenic expansions")
42
+
parser.add_argument("--score", action="store_true", help="Expansion in output file is sorted by normalized size difference score")
43
+
44
+
parser.add_argument("--altclust", action="store_true", help="Uses Thomas Clustering")
45
+
46
+
parser.add_argument("--alleles", action="store_true", help="Turns on the allele visualization")
47
+
parser.add_argument("--bam", type=str, help="Location of Bam file of interest")
48
+
parser.add_argument("-c", "--cutoff", type=int, default=2, help="Sets number of reads cutoff when clustering unimodal or bimodal allele read frequencies")
0 commit comments